摘要: 1 课件 & vue组件生命周期图 2 初始项目 3 组件生命周期 3-1 组件创建阶段:beforeCreate() 3-2 组件创建阶段:created() 模板结构尚未生成,即dom尚不可用 3-3 两个黄色背景菱形判断框(no,仅el无template) + 两个绿色背景处理框(no,编译e 阅读全文
posted @ 2021-11-21 15:51 yub4by 阅读(32) 评论(0) 推荐(0)
摘要: 1 vue编译器 import Vue from 'vue' import App from './App.vue' //导入需要被全局注册的组件 import Count from '@/components/Count.vue' Vue.component('MyCount', Count) V 阅读全文
posted @ 2021-11-21 15:48 yub4by 阅读(50) 评论(0) 推荐(0)
摘要: 1 课件 2 组件样式冲突问题 3 scoped的底层实现原理 4 scoped属性 <template> <div class="left-container"> <h3>Left 组件</h3> <hr> <!-- <MyCount></MyCount> --> <!-- <MyCount in 阅读全文
posted @ 2021-11-21 14:58 yub4by 阅读(44) 评论(0) 推荐(0)
摘要: 1 组件left和组件right中的子组件count互不影响、单行代码函数简写 <template> <div> <h5>Count组件</h5> <!-- <MyCount></MyCount> 不可以在自己中调用自己,会报错 --> <p>count的值是:{{count}}</p> <butt 阅读全文
posted @ 2021-11-21 11:12 yub4by 阅读(52) 评论(0) 推荐(0)