We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acb18a8 commit e7cec78Copy full SHA for e7cec78
examples/00-vue-analysis/10-lifecycle.html
@@ -10,7 +10,7 @@ <h1>10-lifecycle</h1>
10
<script>
11
// 示例参看 examples/vue-cli-vue2.6-project 工程!
12
// 相关注释也在工程中注明了!
13
-
+ // 1.通过分析可以知道,在 created 钩子函数中可以访问到数据,在 mounted 钩子函数中可以访问到 DOM,在 destroy 钩子函数中可以做一些定时器销毁工作
14
</script>
15
</body>
16
</html>
examples/vue-cli-vue2.6-project/src/components/HelloWorld.vue
@@ -1,5 +1,6 @@
1
<template>
2
<div class="hello">
3
+ <MyTitle />
4
<h1>{{ msg }}</h1>
5
<h1>{{ desc }}</h1>
6
<p>
@@ -88,8 +89,13 @@
88
89
</template>
90
91
92
+import MyTitle from './MyTitle.vue'
93
+
94
export default {
95
name: "HelloWorld",
96
+ components: {
97
+ MyTitle
98
+ },
99
props: {
100
msg: String,
101
},
0 commit comments