![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
qq_42190640
这个作者很懒,什么都没留下…
展开
-
样式笔记
img图片标签加上display:block 就不会出现边距原创 2021-01-26 13:33:14 · 58 阅读 · 0 评论 -
v-html限制图片宽度
onShow() { const regex = new RegExp('<img', 'gi'); this.proContent= this.proContent.replace(regex, `<img style="max-width: 100%;"`);},原创 2020-12-08 10:31:40 · 1448 阅读 · 0 评论 -
Vue实现搜索关键字高亮显示
过滤的方法ruleTitle(titleString) { if (!titleString) { return ''; } if (this.searchName && this.searchName.length > 0) { // 匹配关键字正则 let replaceReg = new RegExp(this.searchName, 'g'); // 高亮替换v-html值 let replaceString = '<原创 2020-11-03 16:18:15 · 565 阅读 · 0 评论 -
vue实现关键词过滤-二级列表
搜索按钮search方法organizationList :人员列表searchMethod(list, val) { return list.filter(value2 => { return value2.name.match(val) })},search(e){ this.organizationList = this.organizationList.filter((value, index) => { if(this.searchMethod(value.us.原创 2020-11-02 18:13:57 · 380 阅读 · 0 评论 -
JS运算保留一位小数
**value.replace(/^(-)(\d+).(\d).$/,’$1$2.$3’);//保留一位小数**原创 2020-09-09 14:05:56 · 1581 阅读 · 0 评论 -
前端JS日期格式转换
日期格式转换 转换成 2020-09-01 12:00:00function time(time = +new Date()) { console.log(time) var date = new Date(time + 8 * 3600 * 1000); // 增加8小时 return date.toJSON().substr(0, 19).replace('T', ' ');}console.log(time(+new Date("2014-10-01 12原创 2020-09-04 11:30:04 · 1053 阅读 · 0 评论 -
Vue的几种展开收缩动画
一、 //需要动画的内容.router-slid-enter-active, .router-slid-leave-active {transition: all .4s;}.router-slid-enter, .router-slid-leave-active {transform: translate3d(0, 3rem, 0);opacity: 0;}二、创建ShrinkView.vue组件在其它页面引入该组件...原创 2020-06-23 21:04:56 · 2795 阅读 · 0 评论