![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习随笔
新秋八日
这个作者很懒,什么都没留下…
展开
-
Vue生命周期与网络请求
私有钩子指令在Vue实例中添加directives:{ //私有钩子指令 'fontweight':{ bind:function(el,binding){ el.style.fontWeight = binding.value } }, //简写版本 //这个function等同于把代码写到bind和update中 ...原创 2019-08-09 16:13:55 · 666 阅读 · 0 评论 -
Vue的组件
组件1使用Vue.extend来创建全局组件,在script中 Vue.extend({ template:'<h3>aaa</h3>' //html结构 })2.使用Vue.component(‘name’,extend({}))Vue.component('组件名',extend({})),也可以这样写,只能包含一个根元素,如果组件使用了驼峰名...原创 2019-08-11 16:01:44 · 94 阅读 · 0 评论 -
Vue中的路由
Vue中的路由1.先导入vue-router包<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>2.在中创建路由对象var routerObj = new VueRouter({ //routes表示路由匹配规则 routes: [ //每个路由规则都是...原创 2019-08-12 16:06:33 · 101 阅读 · 0 评论