上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 26 下一页
摘要: 自定义一个全局Loading组件,并使用:总结目录:|-components |-loading |-index.js 导出组件,并且install |-loading.vue 定义Loading组件 1.components/loading/index.js 2.components/loadin 阅读全文
posted @ 2018-02-28 18:25 AlanTao 阅读(2370) 评论(0) 推荐(0)
摘要: 一.安装sass依赖包 二.修改 style标签添加lang属性 三.npm编译 四.如果失败 则打开build文件夹下面的webpack.base.config.js添加 阅读全文
posted @ 2018-02-28 15:20 AlanTao 阅读(252) 评论(0) 推荐(0)
摘要: 一.UI组件 目的: 提高开发效率, 别人提供好一切, 拿过来直接用饿了么团队开源一个基于vue组件库 Element-UI ==> pc端 文档: http://element-cn.eleme.io/#/zh-CN/component/installation 二.安装模板 1.安装elemen 阅读全文
posted @ 2018-02-28 15:11 AlanTao 阅读(15955) 评论(0) 推荐(0)
摘要: 一.NPM安装的jQuery 使用vue-cli构建的vue项目,需要修改的是build/webpack.base.conf.js 1.添加引入webpack,后面的plugins那里需要 2.增加一个plugins 参考: https://segmentfault.com/a/1190000007 阅读全文
posted @ 2018-02-27 17:52 AlanTao 阅读(711) 评论(0) 推荐(0)
摘要: 一.vue路由https://router.vuejs.org/zh-cn/1.bower下载vue-routervue的里的链接 1.引入vue与vue-router HTML vue.js 二.vue路由嵌套 三.有参数的路由, $route.params 四.路由实例方法 阅读全文
posted @ 2018-02-27 11:30 AlanTao 阅读(1150) 评论(0) 推荐(0)
摘要: 一.vue-loader与vue-router配合 二.生成vue-webpack模板 三.生成路由实例 src/App.vue src/main.js src/router.config.js (路由控制) components/Home.vue components/News.vue 阅读全文
posted @ 2018-02-27 11:25 AlanTao 阅读(2950) 评论(0) 推荐(0)
摘要: 1.使用VS Code 出现如下问题,如图 Vue 2.2.0+的版本里,当在组件中使用v-for时,key是必须的。 2.更改vetur配置 vscode->文件->首选项->用户设置 找到 "vetur.validation.template" 改为false 阅读全文
posted @ 2018-02-26 15:21 AlanTao 阅读(496) 评论(0) 推荐(0)
摘要: 一.使用<transition name="fade"></transition>标签 name="fade", 是创建个fade的类名写在css中 CSS: 在进入/离开的过渡中,会有 6 个 class 切换。 v-enter:定义进入过渡的开始状态。在元素被插入时生效,在下一个帧移除。 v-e 阅读全文
posted @ 2018-02-26 11:45 AlanTao 阅读(711) 评论(0) 推荐(0)
摘要: 一.父组件传递数据给子组件 1.父组件App.vue 2.子组件Menu.vue想要拿到父组件数据: 使用props["parentDate"] components/Menu.vue 二.子组件更改父组件的数据 vue2.0子组件不能更改父组件的数据, 如果想的话,父组件传个对象给子组件父组件每次 阅读全文
posted @ 2018-02-24 14:24 AlanTao 阅读(423) 评论(0) 推荐(0)
摘要: 1.beforeCreate // 组件实例刚刚被创建2.created // 实例已经创建完成3.beforeMount // 模板编译之前4.mounted // 模板编译完成5.beforeUpdate // 组件更新之前6.updated // 组件更新之后7.beforeDestroy / 阅读全文
posted @ 2018-02-24 14:19 AlanTao 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 26 下一页