随笔分类 - Vue.js
摘要:Module build failed: SyntaxError: E:/.../index.js: Unexpected token (6:8) 4 | const routerLazyLoad = filename => { 5 | return () =>> 6 | import ( | ^
阅读全文
摘要:<ul class="flex fwrap space-between"> <li v-for="(item,index) in course" :key="index"> //todo </li> <li v-show="course.length%4!=0" v-for="(item1,inde
阅读全文
摘要:key值冲突 解决办法: :key=" index + '^-^' "
阅读全文
摘要:/** * http响应拦截器 */ import axios from 'axios' import { Toast, Indicator } from 'mint-ui' //Toast提示 import router from '../router' //路由 ///request拦截器 axios.interceptors.request.use(req => { //向请求头添加toke
阅读全文
摘要:router.beforeEach((to, from, next) => { //拦截指定路由 if(to.path === '/home'){ //todo }else{ scrollTo(0, 0); next(); } })
阅读全文
摘要:https://lbs.qq.com/webservice_v1/guide-suggestion.html 1. 通过jsonp方式使用 2. 如果遇到报错"请求来源未被授权, 此次请求来源域名:",不要设置域名白名单
阅读全文
摘要:<div class="cart" v-show="cart"> <div class="cart-content"> <img :src="imgUrl" /> </div> </div> //显示并切换卡片内容showcart(i) { //解决不了问题 //this.imgUrl = '';
阅读全文
摘要:设置div的contenteditable属性为true可以模仿富文本
阅读全文
摘要:npm install portfinder@1.0.21
阅读全文
摘要:在build/utils.js文件中添加publicPath:'../../'
阅读全文
摘要:Vue.use(Lazyload, { error: require('./assets/img/noimg.jpg') })
阅读全文
摘要:npm install better-scroll --save <template> <div class="box"> <div class="person-wrap" ref="personWrap"> <ul class="person-list" ref="li1"> <li class="person-item" :class="{'current':currentIndex inde
阅读全文
摘要:1. vue内置组件transition 元素出现和消失都呈现动画 2. animate.css插件 参照https://github.com/daneden/animate.css 加入类名时呈现动画 3. wow.js 需引入animate,滚动到元素的位置展现动画 4. 原生css动画
阅读全文
摘要:安装 引入 注意 引入组件后,我们需要重新将项目打包一下(npm run build) 微信小程序开发工具中的打开es6转es5(不然会报错的) 全局引入"usingComponents"与window同级(报错:无效的 appJSON["window"]["usingComponents"])
阅读全文
摘要:由于 JavaScript 的限制,Vue 不能检测以下数组的变动:
阅读全文
摘要:不要在选项属性或回调上使用箭头函数 因为箭头函数并没有 this,this会作为变量一直向上级词法作用域查找,直至找到为止
阅读全文
摘要:当 v-bind:style 使用需要添加浏览器引擎前缀的 CSS 属性时,如 transform,Vue.js 会自动侦测并添加相应的前缀。
阅读全文
摘要:ip地址错误 如果用的是wifi则查看无线局域网ipv4 在config/index.js中
阅读全文

浙公网安备 33010602011771号