随笔 - 193  文章 - 0  评论 - 8  阅读 - 32万 

随笔分类 -  vue

vue的一些小知识
this.$router.push跳转到当前页 页面没有刷新
摘要:在router-view 中加入 key 就好了,因为在路由页面存在页面缓存。<router-view :key="this.$route.path"></router-view> 阅读全文
posted @ 2019-06-27 11:43 仔仔爱学习 阅读(12632) 评论(0) 推荐(0) 编辑
vue中提示toFixed不是函数
摘要:转自:https://www.cnblogs.com/WoAiZmm/p/8000409.html 阅读全文
posted @ 2018-01-22 14:59 仔仔爱学习 阅读(4386) 评论(0) 推荐(1) 编辑
vue中父组件给子组件传值,子组件给父组件传值
摘要:1、父组件传给子组件 父元素中 子元素中(通过props传值) 2、子组件传给父组件 子元素中(this.$emit(传过去的名字,传的参数)) 父元素中 通过changeShow的参数data 把修改的数据传过来 阅读全文
posted @ 2018-01-22 10:49 仔仔爱学习 阅读(368) 评论(0) 推荐(0) 编辑
vue中nextTick和$nextTick的差别
摘要:<ul id="demo"> <li v-for="item in list">{{item}}</div> </ul> new Vue({ el:'#demo', data:{ list=[0,1,2,3,4,5,6,7,8,9,10] }, methods:{ push:function(){ 阅读全文
posted @ 2017-11-23 09:13 仔仔爱学习 阅读(5244) 评论(1) 推荐(0) 编辑
vue 小知识
摘要:1、img 的路径 <img :src="item.src"/> 2、背景图片的路径 v-bind:style="{backgroundImage: 'url(' + item.cover + ')'}" 3、判断 <p v-if="item>0"></p> 4、a链接 <router-link : 阅读全文
posted @ 2017-10-10 14:14 仔仔爱学习 阅读(196) 评论(0) 推荐(0) 编辑
vue中alert toast confirm loading 公用
摘要:import Vue from 'vue' import { ToastPlugin, AlertPlugin, ConfirmPlugin, LoadingPlugin } from 'vux' /*import { Promise } from 'es6-promise';*/ Vue.use( 阅读全文
posted @ 2017-09-30 16:40 仔仔爱学习 阅读(3841) 评论(0) 推荐(0) 编辑
vue 跳外链
摘要:var host = window.location.host;var protocal = window.location.protocolwindow.location.href = protocal+'//'+host+'/store/record/index?type=2' 阅读全文
posted @ 2017-09-26 16:47 仔仔爱学习 阅读(1452) 评论(1) 推荐(0) 编辑
vue 中使用 Toast弹框
摘要:import { ToastPlugin,ConfirmPlugin,AlertPlugin} from 'vux' Vue.use(ToastPlugin) Vue.use(ConfirmPlugin) Vue.use(AlertPlugin) //公用的弹窗(全局变量)Vue.prototype 阅读全文
posted @ 2017-09-22 09:30 仔仔爱学习 阅读(17074) 评论(0) 推荐(0) 编辑
vue 添加vux
摘要:1、命令添加vux npm install vux --save 2、在build/webpack.base.conf.js中配置 const vuxLoader = require('vux-loader') const webpackConfig = originalConfig // 原来的 阅读全文
posted @ 2017-09-11 10:19 仔仔爱学习 阅读(3533) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示