上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: Vue 中 extend // 必选参数to的类型,可选参数from的类型 冒号后是函数返回值的类型 export function extend (to: Object, _from: ?Object): Object { for (const key in _from) { to[key] = 阅读全文
posted @ 2020-07-22 10:30 荣光无限 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 大部分场景都是超过一行就显示... <template> <div class="other-product-item item-name" :title="item.name">{{item.name}}</div> <div class="other-product-item item-name 阅读全文
posted @ 2020-07-22 10:26 荣光无限 阅读(7939) 评论(2) 推荐(0) 编辑
摘要: 使用2个style的方式不够优雅,可以使用下面方式做样式穿透 .normal-field /deep/ .el-form-item { margin-bottom: 0px; } .normal-field /deep/ .el-form-item__label { color: #939393; 阅读全文
posted @ 2020-07-22 10:20 荣光无限 阅读(4000) 评论(0) 推荐(0) 编辑
摘要: 概述 除了正常运行模式,ECMAscript 5添加了第二种运行模式:'严格模式'。顾名思义,这种模式使得Javascript在更严格的条件下运行。 目的 1: 消除Javascript语法的一些不合理不严谨的地方,减少怪异行为 2: 消除代码运行的不安全之处, 保证代码运行的安全 3: 提高编译器 阅读全文
posted @ 2020-07-22 10:18 荣光无限 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 二者最好只选择一个来进行对文件的打包,防止有冲突出现导致图片加载失败 如果相对不同大小的问题选择不同的loader,可以在url-loader的fallback属性指定不满足条件时的loader { test: /\.(png|jpg|gif|jpeg)$/, use: [ { loader: 'u 阅读全文
posted @ 2020-07-22 10:06 荣光无限 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 有时候弹窗或者一些特殊的区域需要自定义一些html元素来显示(snabbdom) const h = this.$createElement this.$msgbox({ title: '提示', message: h('p', null, [ h('p', null, 'YYYYYYYYYYYYY 阅读全文
posted @ 2020-07-21 23:57 荣光无限 阅读(1937) 评论(0) 推荐(0) 编辑
摘要: 在不用VueCli创建项目的时候,手写引入vue的时候,配置webpack的时候发现了这个问题 webpack vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin 这是因 阅读全文
posted @ 2020-07-21 23:54 荣光无限 阅读(3650) 评论(0) 推荐(0) 编辑
摘要: 🚀 内联模板不会把子组件的内容分发渲染到父组件中 🚀 而是需要在父组件中实现其内容的渲染 父组件 <template> <div> <template-inline inline-template> <!-- 🚀只能有一个根元素 --> <div> <div>{{msg}}</div> <!- 阅读全文
posted @ 2020-07-21 23:52 荣光无限 阅读(3447) 评论(0) 推荐(0) 编辑
摘要: 🚀 Vue.use Vue.use 的作用是安装插件 Vue.use 接收一个参数 如果这个参数是函数的话,Vue.use 直接调用这个函数注册组件 如果这个参数是对象的话,Vue.use 将调用 install 方法来注册组件 * 官方文档: * Vue.use 用于安装 Vue.js 插件。 阅读全文
posted @ 2020-07-21 23:48 荣光无限 阅读(492) 评论(0) 推荐(0) 编辑
摘要: 😜 主要是思路,自己定义组件的时候可以借鉴 😜 🚀 Vue-router的 类图 name options: ==> 记录构造函数中传入的对象,在 new VueRouter的时候传了一个对象( routes :路由规则) data: ==> 有个属性 current (记录当前路由地址的), 阅读全文
posted @ 2020-07-21 23:44 荣光无限 阅读(939) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 下一页