会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
星雨,恒奋斗,过客
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
下一页
2019年8月9日
vuebase----3.slot插槽
摘要: 1.不具名slot; 2.具名slot; 3.父组件模板的东西在父级作用域内编译,子组件模板的所有东西在子级作用域内编译; 4.编译作用域 5.作用域插槽(数据传递) 6.数据可以动态的改变 App.vue <template> <div id="app"> <img src="./assets/l
阅读全文
posted @ 2019-08-09 22:14 星雨,恒奋斗,过客
阅读(341)
评论(0)
推荐(0)
2019年8月8日
vuebase-2.Props的验证组件的深入
摘要: 1.new实例根目录的数据,其他组件可以随时访问,但是不推荐 2.通过computed方法访问new实例根目录的数据 main.js // The Vue build version to load with the `import` command// (runtime-only or stand
阅读全文
posted @ 2019-08-08 23:19 星雨,恒奋斗,过客
阅读(168)
评论(0)
推荐(0)
2019年8月7日
vuebase-1.Props的验证
摘要: 1.安装vue init webpack vuebase 2.按照描述填写信息;或者yes;no 3.进入项目目录:cd vuebase 3.安装npm : npm i 4.启动项目:npm start 动态或者静态的props props的type的校验 props中的类型是数组或者对象,必须返回
阅读全文
posted @ 2019-08-07 21:05 星雨,恒奋斗,过客
阅读(152)
评论(0)
推荐(0)
2019年8月6日
组件的加载与keep-alive
摘要: 组件的加载与keep-alive keep-alive状态缓存,保持状态 A.组件 <template> <div>vueA{{msg}} <button class="" @click="changeactive" type="button">保持状态</button></div></templa
阅读全文
posted @ 2019-08-06 23:11 星雨,恒奋斗,过客
阅读(187)
评论(0)
推荐(0)
组件传递数据props
摘要: 1.父组件向子组件传递数据通过props; 2.子组件传递父组件数据需要通过自定义事件; $emit("定义事件",数据); 父组件: <!-- 模版 --><template> <!-- 只能存在一个根容器--> <div class="main"><p style="font-weight:bo
阅读全文
posted @ 2019-08-06 21:41 星雨,恒奋斗,过客
阅读(542)
评论(0)
推荐(0)
2019年8月5日
简单的组件
摘要: <!-- 模版 --><template> <!-- 只能存在一个根容器--> <div class="main"><p>learn vues</p> <forma /></div> </template> <script> import forma from './forma' export de
阅读全文
posted @ 2019-08-05 23:40 星雨,恒奋斗,过客
阅读(133)
评论(0)
推荐(0)
表单和侦听器
摘要: 表单输入绑定 修饰符: .lazy .number .trim watch:监听数据变化 计算属性vs监听属性 能用计算属性的,一般都用计算属性,实在不行才用监听属性; <template> <div :class="classdemo">sdfsfs <form action=""> <input
阅读全文
posted @ 2019-08-05 23:23 星雨,恒奋斗,过客
阅读(112)
评论(0)
推荐(0)
class和style的绑定
摘要: 1class的绑定 对象写法 数组写法 <div :class="[activeClass,currentIndex]">style</div> 2.style的绑定 对象写法 <template> <div :class="classdemo">sdfsfs <div class="old" :c
阅读全文
posted @ 2019-08-05 22:34 星雨,恒奋斗,过客
阅读(338)
评论(0)
推荐(0)
每次加载更新新的背景图
摘要: html结构: <div class="main"></div> js:
阅读全文
posted @ 2019-08-05 21:15 星雨,恒奋斗,过客
阅读(170)
评论(0)
推荐(0)
2019年8月4日
vue--计算属性
摘要: 1.计算属性 //如果数据没有被改变,则不会重新计算 //计算属性不加() 计算属性vs方法 我们可以将同一函数定义为一个方法而不是一个计算属性。两种方式的最终结果确实是完全相同的。然而,不同的是计算属性是基于它们的响应式依赖进行缓存的。只在相关响应式依赖发生改变时它们才会重新求值。这就意味着只要
阅读全文
posted @ 2019-08-04 23:14 星雨,恒奋斗,过客
阅读(153)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
下一页
公告