会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ZJTL
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
13
下一页
2022年5月16日
vue项目跳转外部链接
摘要: vue跳转外部链接 // 这个方法会新打开一个页面窗口 window.open(routeUrl, '_blank') // 这个只能在原来页面跳转。不会新开窗口 window.location.href = routeUrl window.location.replace(routeUrl)
阅读全文
posted @ 2022-05-16 15:45 ZJTL
阅读(1440)
评论(0)
推荐(0)
2022年4月26日
vue项目中如何引入vuex
摘要: vue框架提供了自身的状态管理工具vuex 1.入口文件main.js,引入store vue实例中 2.store文件夹下的目录 3.store文件下index.js的内容 4.getters里的内容,可以数据处理 5.user.js里的内容 6.once值的使用 this.$store.stat
阅读全文
posted @ 2022-04-26 20:55 ZJTL
阅读(426)
评论(0)
推荐(0)
css &连接符
摘要: &是less、sass的语法,是一种连接符。 .el-row { margin-bottom: 20px; &:last-child { margin-bottom: 0; } } sass语法,等同于: .el-row { margin-bottom: 20px; } .el-row:last-c
阅读全文
posted @ 2022-04-26 19:23 ZJTL
阅读(925)
评论(0)
推荐(0)
vue中$attrs的使用
摘要: 同事问我这个怎么用,我还真没见过,所以网上找了一篇讲的很详细的文章。 $attrs是在vue的2.40版本以上添加的。 项目中有多层组件传参可以使用$attrs,可以使代码更加美观,更加简洁,维护代码的时候更方便。如果使用普通的父子组件传参props和$emit,$on会很繁琐;如果使用vuex会大
阅读全文
posted @ 2022-04-26 17:07 ZJTL
阅读(693)
评论(0)
推荐(0)
CSS实现0.5px
摘要: 使用 transform: scaleY() 缩放来实现,即将Y轴缩小至原来的0.5倍来达到一个0.5px的效果: .line:after { content: ''; position: absolute; bottom: 0; height: 1px; width: 100%; backgrou
阅读全文
posted @ 2022-04-26 15:37 ZJTL
阅读(171)
评论(0)
推荐(0)
2022年1月17日
vue-video-player的使用
摘要: 安装: npm install vue-video-player --save main.js中配置: import VideoPlayer from 'vue-video-player' import 'video.js/dist/video-js.css' import 'vue-video-p
阅读全文
posted @ 2022-01-17 10:45 ZJTL
阅读(1106)
评论(0)
推荐(0)
2022年1月12日
vue-pdf 实现pdf在线预览
摘要: 安装: npm install --save vue-pdf Demo: <template> <div> <pdf ref="pdf" :src="url"> </pdf> </div> </template> <script> import pdf from 'vue-pdf' export d
阅读全文
posted @ 2022-01-12 14:00 ZJTL
阅读(389)
评论(0)
推荐(0)
2021年12月21日
elementui 更改 el-table 表头样式
摘要: 坑了我一个小时,直接上代码: <el-table :header-cell-style="{background:'#eee',color:'#606266'}"> ... </el-table> header-cell-style是表头单元格的 style 的回调方法,也可以使用一个固定的 Obj
阅读全文
posted @ 2021-12-21 16:05 ZJTL
阅读(1648)
评论(0)
推荐(0)
2021年11月3日
vue父子组件执行顺序
摘要: 加载渲染过程 ->父beforeCreate -> 父created -> 父beforeMount ->子beforeCreate -> 子created -> 子beforeMount -> 子mounted -> 父mounted 子组件更新过程 ->父beforeUpdate -> 子bef
阅读全文
posted @ 2021-11-03 15:41 ZJTL
阅读(101)
评论(0)
推荐(0)
js数组中深拷贝的方法
摘要: 一、什么是浅拷贝 在js当中,我们常常遇到数组复制的的情况,许多人一般都会使用“=”来直接把一个数组赋值给一个变量,如 1 var a=[1,2,3]; 2 var b=a; 3 console.log(b); //输出的是1,2,3 4 a[2]=0; 5 console.log(b); //输出
阅读全文
posted @ 2021-11-03 11:14 ZJTL
阅读(1700)
评论(0)
推荐(1)
上一页
1
2
3
4
5
6
7
···
13
下一页
公告