
Vue
十一迪迪
stay hungry stay young
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Vue的计算属性computed
computed <div id="app"> <p>{{ num }}</p> <p>{{ cnum }}</p> <button @click="change">加1</button> </div><script src="js/vue.js"></script> <script> new原创 2020-07-21 11:47:03 · 239 阅读 · 0 评论 -
Vue 插槽 slot的简单实用
插槽就是子组件中的提供给父组件使用的一个占位符,用<slot></slot> 表示,父组件可以在这个占位符中填充任何模板代码,如 HTML、组件等,填充的内容会替换子组件的<slot></slot>标签。参考资料:vue_插槽的理解和使用...原创 2020-07-21 10:37:12 · 214 阅读 · 0 评论 -
Vue组件间传值
props实例一 通过props向子组件传递数据 <div id="app"> <component1 :cnum="num"></component1> </div> <template id="comp1"> <h1>{{ cnum }}</h1> </template><script src="js/vue.js"></sc原创 2020-07-19 23:30:35 · 167 阅读 · 0 评论 -
Vue组件注册与组件的特性
全局组件 <div id="app"> <my-component></my-component> </div> <div id="app2"> <my-component></my-component> </div> //全局组件 Vue.component('my-component', { template: `原创 2020-07-19 20:33:20 · 317 阅读 · 0 评论 -
整理了几种 Vue.set() 的使用情况
<div id="app"> <button @click="change()">修改</button> <p>{{ arr }}</p> <p>{{ user }}</p> <p>{{ userInfo }}</p></div><script src="js/vue.js"></script>原创 2020-07-19 14:27:57 · 283 阅读 · 0 评论 -
Vue 内部指令整理
Vue指令文本显示隐藏1. v-show2. v-if v-else循环3. v-for在上篇文章《Vue入门 文本输出》中介绍的 v-text 和 v-html 是Vue指令中的其中两个,接下来继续学习Vue的其他指令。文本显示隐藏1. v-show <div id="app"> <div v-show="isShow">The example of "v-show"</div> <div v-if="isIf">The原创 2020-07-19 13:07:48 · 803 阅读 · 0 评论 -
Vue入门 文本输出
Vue入门文本输出的三种方式1. 大括号{{}}2. v-text 和 v-html文本输出的三种方式1. 大括号{{}}<div id="app"> {{msg}}</div><div id="app2"> {{msg}}</div><script src="js/vue.js"></script> <script> new Vue({ el:原创 2020-07-18 12:44:48 · 1917 阅读 · 0 评论 -
Vue.js not detected 解决办法
问题描述:在谷歌安装了Vuejs Devtools扩展程序,但是运行自己写的页面,vue图标没有亮起来,控制台也没有Vue选项,悬浮右上角Vue Devtools小图标显示“Vue.js not detected”。检查检查Vuejs devtools扩展程序是否已经生效,检查方法如下:打开一个使用vue的网站,随便在网上找一个或者直接点开这个手机搜狐网 https://m.sohu.com/limit/如果你的vue图标变亮了就说明扩展程序生效的,所以可能是浏览器设置问题导致图标不会亮找原创 2020-05-12 12:29:24 · 25722 阅读 · 8 评论