上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页
摘要: 阅读全文
posted @ 2022-08-23 14:38 杨建鑫 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 父组件 : <template> <div class="app"> <div class="view"> <!-- include: 组件的名称来自于组件定义时name选项 --> <keep-alive include="home,about"> <component :is="currentT 阅读全文
posted @ 2022-08-23 09:43 杨建鑫 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 父组件 : <template> <div class="app"> <!-- 动态组件 component --> <!-- is中的组件需要来自两个地方: 1.全局注册的组件 2.局部注册的组件 --> <!-- <component :is="tabs[currentIndex]"></com 阅读全文
posted @ 2022-08-23 09:38 杨建鑫 阅读(41) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="app"> <h2 ref="title" class="title" :style="{ color: titleColor }">{{ message }}</h2> <button ref="btn" @click="changeTitle">修改 阅读全文
posted @ 2022-08-23 09:32 杨建鑫 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 1.引入库 在 src/until/event-bus.js import { HYEventBus } from 'hy-event-store' const eventBus = new HYEventBus() export default eventBus 2. 使用 1.发送 <templ 阅读全文
posted @ 2022-08-23 09:24 杨建鑫 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 祖先 : <template> <div class="app"> <home></home> <h2>App: {{ message }}</h2> <button @click="message = 'hello world'">修改message</button> </div> </templ 阅读全文
posted @ 2022-08-23 09:15 杨建鑫 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-08-22 15:00 杨建鑫 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 父组件 : <template> <div class="app"> <tab-control :titles="['衣服', '鞋子', '裤子']" @tab-item-click="tabItemClick"> <template v-slot="props"> <button>{{ prop 阅读全文
posted @ 2022-08-22 14:39 杨建鑫 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 父组件 : <template> <!-- nav-bar只给一个插槽动态传入数据 --> <nav-bar> <template v-slot:[position]> <a href="#">注册</a> </template> </nav-bar> <button @click=" positi 阅读全文
posted @ 2022-08-22 14:31 杨建鑫 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 父组件 : <template> <nav-bar> <template #left> <button>{{ leftText }}</button> </template> <template #center> <span>内容</span> </template> <template v-slo 阅读全文
posted @ 2022-08-22 14:27 杨建鑫 阅读(15) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页