- 博客(9)
- 收藏
- 关注
原创 vue Table 表格 表头添加颜色
header-cell-style表头单元格的 style 的回调方法,也可以使用一个固定的 Object 为所有表头单元格设置一样的 Style。效果如下
2022-01-18 09:55:49
2138
原创 vue 计算注册到现在有多少天
1,拿到后台返回的数据var tien = res.datavar date = new Date(tien)var now = date.getTime()// 获取当前时间var date1 = new Date()var now1 = date1.getTime()//时间差var leftTime = now1 - now//计算时间天数this.d = Math.floor(leftTime / 1000 / 60 / 60 / 24)...
2022-01-04 13:53:43
324
原创 文字切割替换
html{{ getDtpidValue }}computed:{getDtpidValue(){ const res = this.getDefaultpidValue1.replace(/.(?=.{4})/g, '*') const b= res.slice(-8) return b},
2021-12-21 11:29:03
102
原创 js复制图片文字
<div v-show="CopyDataIndexshow" style="padding:20px;position: absolute;right: -9999px;text-indent: -9999px;width: 0;height: 0;font-size: 0;" :id="'CopyDataIndex'+i" v-html="item"></div>var node = document.getElementById("C.
2021-12-21 11:24:05
623
原创 es6 replace 字符替换另一些字符
replace() 方法用于在字符串中用一些字符替换另一些字符,或替换一个与正则表达式匹配的子串 var str="Visit Microsoft!" console.log(str.replace(/Microsoft/, "W3School")); // Visit W3School! {{(item.actLink.replace(/taobao/, "TaoBao"))}}...
2021-12-15 14:18:25
2853
原创 js 时间比较大小
<script> var date1 = '2001-02-02 16:50:02'; var date2 = '2001-02-03 00:00:00'; var date1 = date1.replace(/-/g,'/'); var date2 = date2.replace(/-/g,'/'); var timesdata1= new Date(date1).getTime(); var timesdata2= new D...
2021-12-13 09:25:56
343
原创 CSS :before、:after伪元素 content属性 中文乱码
解决办法:http://tool.chinaz.com/tools/unicode.aspx将中文转为unicode 编码站长工具,例如:精—>\u7cbe content: "\7cbe";效果图
2021-12-02 11:00:24
330
原创 vue Carousel 走马灯 自定义箭头
vue methodsarrowClick(val) { if(val === 'right') { this.$refs.cardShow.next() } else { this.$refs.cardShow.prev() }},css.selection:hover .leftArrow,.selection:hover .rightArrow{ display: block;}.selecti...
2021-11-24 10:47:58
1092
原创 vue复制图片
引入clipboard.js<script src="https://cdn.bootcss.com/clipboard.js/2.0.1/clipboard.min.js"></script>html<div style="padding:20px 0" @click="initCopyData('.copy_main'+index,'.copy'+index)" :class="'copy_main'+index"...
2021-11-08 11:27:20
1031
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人