Created: 2019/11/02
Component Registration | |||||
Component Name |
Vue.component('my-component-name', { /* ... */ }) The first argument that is component name, all lowercase letters as possible and must contain a hyphen |
||||
Global registration |
Vue.component('my-component-name', { /* ... */ })
|
||||
Local registration |
import ComponentA from './ComponentA.vue' export default { components: { ComponentA }, // ... }
|
||||
Modular system |
|
||||
Prop | |||||
prop的大小写 | |||||
prop类型 | |||||
传递静态或动态prop | |||||
单向数据流 | |||||
prop验证 | |||||
非prop的特性 | |||||
自定义事件 | |||||
插槽 | |||||
动态组件&异步组件 | |||||
处理边界情况 | |||||