
VUE
Vue.js
01_Carrortwhisker
My future in your hands so i'm beggin.
展开
-
JS批量处理对象内有相同字段的属性值
处理对象内多个时间字段格式原创 2022-07-15 10:10:39 · 410 阅读 · 0 评论 -
vue-router控制浏览器标签title标题
路由的meta中添加title属性。 meta: { title: '登录' }router的beforeEach会在进入路由前执行,前面的XXX管理系统是我加的默认前缀,可有可无。const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes})router.beforeEach((to, from, next) => { if (to.me原创 2022-04-27 16:10:33 · 420 阅读 · 0 评论 -
Vue3 watch的五种情况,注意事项与watchEffect函数(学习笔记)
Vue3 watch函数与watchEffect函数原创 2022-04-01 15:33:37 · 1430 阅读 · 0 评论 -
elementUI表格全部列设置align居中,代替每个column的align-center
<el-table :cell-style="{'text-align':'center'}":header-cell-style="{'text-align':'center'}">原创 2021-10-15 14:21:08 · 1151 阅读 · 0 评论 -
VUE根据数据变化重新渲染Echarts图表
利用vue watch深度监听实现实时更新,还可以使用v-if控制Boolean值重新渲染,但是体验很差,所以还是推荐使用watch实现重新渲染。父组件:<echarts-interval :topTen="this.topTen"></echarts-interval>父组件传过来的值: props: { topTen: { type: Object } },原创 2021-09-29 10:20:49 · 7585 阅读 · 0 评论 -
安装npm报错rollbackFailedOptional: verb npm-session原因及解决方案
安装npm报错rollbackFailedOptional: verb npm-session原因及解决方案今天想安装一个echart做柱形图之类的,结果输入后终端显示rollbackFailedOptional: verb npm-session。原因是npm代理问题,使用淘宝镜像即可解决。npm config set registry http://registry.npm.taobao.org之后运行所需命令行,安装成功。...原创 2021-01-07 21:53:54 · 11624 阅读 · 1 评论 -
VUE实现DIV点击换色
VUE实现点击DIV背景换色VUE实现DIV点击换色这个方法初衷是为了代替button做一个更加自由添加图标标题之类的按钮来代替tab页签,所以后续还可以绑定一些自己的事件,如跳转页面,窗口弹出.先写DIV和CSS样式.<template> <div> <div class="main-div" :style="getStyle(item)" v-for="(item,index) in list" @click="activeBtn(item)原创 2021-01-06 22:14:58 · 11274 阅读 · 2 评论 -
vue-router重复点击报错 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current
import Router from 'vue-router'Vue.use(Router)const originalPush = Router.prototype.pushRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err)}原创 2021-09-10 15:49:40 · 280 阅读 · 0 评论