vue
道可小花
这个作者很懒,什么都没留下…
展开
-
9.directive自定义vue指令
v-slice:11表示"11"表示传的参数为11".number"表示修饰符html:部分<div id="app"> <!-- :11表示传的参数 .number表示修饰符 --> <input type="text" v-slice:11.number="content...原创 2019-08-27 18:09:39 · 91 阅读 · 0 评论 -
17组件间通信
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-...原创 2019-08-29 23:57:05 · 60 阅读 · 0 评论 -
20v-slot指令插槽
slot作用是让组件可以正常的填写内容css部分 <style> .my-button { box-sizing: border-box; cursor: pointer; background: #fff; border: 1px solid #dcdfe6; color: #606266; tex...原创 2019-08-30 14:10:47 · 109 阅读 · 0 评论 -
40 sinon spy间谍函数
sinon辅助我们进行前端测试。安装:npm install sinon -D引入: import sinon from ‘sinon’;spy 间谍函数const spy = sinon.spy();使用方法spy.called; 表示函数是否被调用,返回布尔值spy.callCount; 函数被调用的次数spy.calledOnce; 函数只被调...原创 2019-09-08 20:47:08 · 1071 阅读 · 0 评论