上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 61 下一页
摘要: 我要根据状态判断表格显示input还是label,用了它的autofocus对于这样的来回切换,只有第一次点击有效,后面就不行了,所以改用v-focus自定义指令,问题解决 <div v-if=" 显示输入框 " > <!-- 选中的是当前的格子并且是input类型和可编辑的状态并且是未删除就显示i 阅读全文
posted @ 2020-04-27 10:16 洛晨随风 阅读(3706) 评论(0) 推荐(1)
摘要: //request拦截 service.interceptors.request.use( request => { let { current } = router.history; if ( store.getters["userStore/getToken"] && current.name 阅读全文
posted @ 2020-04-26 18:47 洛晨随风 阅读(1239) 评论(0) 推荐(0)
摘要: 参考: https://www.jb51.net/article/137956.htm 在vue 里面可以定义一个变量 time 大约如下写法: getclick() { if (this.time) { clearTimeout(this.time); } this.time = setTimeo 阅读全文
posted @ 2020-04-22 11:12 洛晨随风 阅读(1992) 评论(0) 推荐(0)
摘要: indexPath:'../publish1',//指定index。html的打包生成路径 assetsDir:'../publish',//指定你的css/js/img/fonts等静态资源文件夹的打包生成路径 阅读全文
posted @ 2020-04-16 23:24 洛晨随风 阅读(2742) 评论(0) 推荐(0)
摘要: 我定义一个user的module import Vue from "vue"; import Vuex from "vuex"; import userStore from "./modules/userStore"; Vue.use(Vuex); const debug = process.env 阅读全文
posted @ 2020-04-16 09:49 洛晨随风 阅读(545) 评论(0) 推荐(0)
摘要: 使用map的简洁写法好像没试出来怎么用,但是常规写法如下: vuex: import Vue from "vue"; import Vuex from "vuex"; import userStore from "./modules/userStore"; Vue.use(Vuex); export 阅读全文
posted @ 2020-04-16 09:46 洛晨随风 阅读(14657) 评论(1) 推荐(0)
摘要: module.exports = { devServer: { //开发环境下设置为编译好以后直接打开浏览器浏览 open: true }, configureWebpack: config => { //调试JS config.devtool = "source-map"; }, css: { / 阅读全文
posted @ 2020-04-02 16:52 洛晨随风 阅读(9180) 评论(0) 推荐(0)
摘要: 以element ui的导航组件为例: 根据router获取当前的url进行判断设置自己的自定义active样式处理,如果有更好的办法,欢迎指出 <template> <el-menu background-color="#545c64" text-color="#fff" > <el-menu-i 阅读全文
posted @ 2020-04-01 19:59 洛晨随风 阅读(594) 评论(0) 推荐(0)
摘要: 直接在子组件使用v-model=“props传递的父属性”是会爆出警告的,也不符合vue 的设计思想,所以可以如下写法: 父组件: <template> <div> <Test1 :curVal="val" @change-val="setVal"/> </div> </template> <scr 阅读全文
posted @ 2020-04-01 16:15 洛晨随风 阅读(779) 评论(0) 推荐(0)
摘要: function GetRandomNum(Min, Max) { var Range = Max - Min; var Rand = Math.random(); return Min + Math.round(Rand * Range); } 阅读全文
posted @ 2020-04-01 16:09 洛晨随风 阅读(695) 评论(0) 推荐(1)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 61 下一页