随笔 - 193
文章 - 0
评论 - 8
阅读 -
32万
随笔分类 - vue
vue的一些小知识
this.$router.push跳转到当前页 页面没有刷新
摘要:在router-view 中加入 key 就好了,因为在路由页面存在页面缓存。<router-view :key="this.$route.path"></router-view>
阅读全文
vue中提示toFixed不是函数
摘要:转自:https://www.cnblogs.com/WoAiZmm/p/8000409.html
阅读全文
vue中父组件给子组件传值,子组件给父组件传值
摘要:1、父组件传给子组件 父元素中 子元素中(通过props传值) 2、子组件传给父组件 子元素中(this.$emit(传过去的名字,传的参数)) 父元素中 通过changeShow的参数data 把修改的数据传过来
阅读全文
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(){
阅读全文
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 :
阅读全文
vue中alert toast confirm loading 公用
摘要:import Vue from 'vue' import { ToastPlugin, AlertPlugin, ConfirmPlugin, LoadingPlugin } from 'vux' /*import { Promise } from 'es6-promise';*/ Vue.use(
阅读全文
vue 跳外链
摘要:var host = window.location.host;var protocal = window.location.protocolwindow.location.href = protocal+'//'+host+'/store/record/index?type=2'
阅读全文
vue 中使用 Toast弹框
摘要:import { ToastPlugin,ConfirmPlugin,AlertPlugin} from 'vux' Vue.use(ToastPlugin) Vue.use(ConfirmPlugin) Vue.use(AlertPlugin) //公用的弹窗(全局变量)Vue.prototype
阅读全文
vue 添加vux
摘要:1、命令添加vux npm install vux --save 2、在build/webpack.base.conf.js中配置 const vuxLoader = require('vux-loader') const webpackConfig = originalConfig // 原来的
阅读全文