You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
696 B
29 lines
696 B
<template> |
|
<!-- 第三步使用 --> |
|
<ChildComponentA :name="name1"></ChildComponentA> |
|
<ChildComponentB :name="name2"></ChildComponentB> |
|
<ChildComponentC :name="name3"></ChildComponentC> |
|
</template> |
|
|
|
<script> |
|
// 第一步 import |
|
import ChildComponentA from "@/components/ChildComponentA.vue"; |
|
import ChildComponentB from "@/components/ChildComponentB.vue"; |
|
import ChildComponentC from "@/components/ChildComponentC.vue"; |
|
|
|
export default { |
|
// 第二步 注册 |
|
components: {ChildComponentA, ChildComponentB, ChildComponentC}, |
|
data() { |
|
return { |
|
name1: "组件A名称", |
|
name2: "组件B名称", |
|
name3: "组件C名称" |
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style scoped> |
|
|
|
</style>
|
|
|