File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,9 @@ Vue.component(Button.name, Button);
7070
7171Vue .config .productionTip = false ;
7272
73- /* eslint-disable no-new */
7473new Vue ({
75- el: " #app" ,
76- components: { App },
77- template: " <App/>"
78- });
74+ render : h => h (App)
75+ }).$mount (" #app" );
7976```
8077
8178修改 ` src/App.vue ` 的 template 内容。
@@ -85,7 +82,6 @@ new Vue({
8582 < div id= " app" >
8683 < img src= " ./assets/logo.png" >
8784 < a- button type= " primary" > Button>< / a- button>
88- < router- view/ >
8985 < / div>
9086< / template>
9187...
@@ -161,15 +157,12 @@ $ yarn add babel-plugin-import --dev
161157
162158 Vue.config.productionTip = false
163159
164- /* eslint-disable no-new */
165160 new Vue({
166- el: '#app',
167- components: { App },
168- template: '<App/>'
169- })
161+ render: h => h(App)
162+ }).$mount("#app");
170163```
171164
172- 最后重启 ` npm run dev ` 访问页面,antd 组件的 js 和 css 代码都会按需加载,你在控制台也不会看到这样的[ 警告信息] ( https://zos.alipayobjects.com/rmsportal/vgcHJRVZFmPjAawwVoXK.png ) 。关于按需加载的原理和其他方式可以阅读[ 这里] ( /docs/vue/getting-started-cn/#按需加载 ) 。
165+ 最后重启 ` npm run serve ` 访问页面,antd 组件的 js 和 css 代码都会按需加载,你在控制台也不会看到这样的[ 警告信息] ( https://zos.alipayobjects.com/rmsportal/vgcHJRVZFmPjAawwVoXK.png ) 。关于按需加载的原理和其他方式可以阅读[ 这里] ( /docs/vue/getting-started-cn/#按需加载 ) 。
173166
174167### 自定义主题
175168
You can’t perform that action at this time.
0 commit comments