随笔分类 - vue-基础day01
摘要:非父子组件传值 1、新建一个js文件(vueEvent.js) 引入vue 实例化vue 最后暴露这个实例 2、在要广播的地方引入刚才定义的实例 3、通过 VueEvent.$emit('名称',‘数据’); 4、在接受数据的地方 通过$on 接受广播的数据 非父子传值 home组件传给News组件
阅读全文
摘要:M model V view MVVM model改变会影响视图view,view视图改变反过来影响 model
阅读全文
摘要:``` Document 内容 ``` 
阅读全文
摘要:``` Document {{msg}} 输入新值->value-> msg发生变化--> 数据msg = e.target.value --> --> ``` ...
阅读全文
摘要:``` Document 内容 --> 内容 --> --> --> 内容 左边 ```  in data中的对象per" v->键值对中的值value k->key 3. v-for="(v,k,i) in data中的对象per" v->键值对中的值value k->key i->索引--> {{v}} -->...
阅读全文
摘要:``` Document 索引 --> {{v}} ---------111--------------- {{v}}---{{i}} ---------222-------------- {{b}}---{...
阅读全文
摘要:``` Document 索引 --> {{v}} ---------111--------------- {{v}}---{{i}} ---------222-------------- {{b}}---{...
阅读全文
摘要:``` Document 1 内容: 内容 2 100: {{'100'}} 3 v-text: 4 v-html: asdasdsad 5 v-html: 6 {{str}} 7 v-...
阅读全文
摘要:``` Document 内容 --> 点击 内容 插入元素 false->移除 v-show true->display不为none false->dislplay为none --> v-...
阅读全文
摘要:``` Document 内容 ``` 
阅读全文
摘要:``` Document {{msg}} --> b ? 10:20 --> 18?'成年':'未成年'}} --> ```
阅读全文
摘要:``` Document {{count}} --> {{fn1()}} --> --> 按钮1 --> 按钮1 --> ```
阅读全文
摘要:``` Document {{msg}} --> {{count}} ```
阅读全文
摘要:``` Document {{str}} ```
阅读全文
摘要:``` Document {{msg}} {{msg}} {{msg}} {{msg}} --> ```
阅读全文

浙公网安备 33010602011771号