上一页 1 2 3 4 5 6 7 8 ··· 17 下一页
摘要: JS前端输入框正则限制正负数和小数点后两位1.只能输入正负数,包括小数点value = value.replace(/[^\d\.-]/g,’’) 2.只能输入正数,不包括小数点value = value.replace(/[^\d]/g,’’) 3.只能输入正负数,限制小数点后两位value = 阅读全文
posted @ 2022-09-07 11:07 Ao_min 阅读(3232) 评论(0) 推荐(0) 编辑
摘要: 转自于:https://zhuanlan.zhihu.com/p/526439319 背景 为更好地维护项目以及使用v5新特性,把已有项目的eharts3.0/4.0升级v5【升级文档】 前期准备 推荐一个npm版本检测工具npm-check,也可用于检测不用npm依赖,减少node_modules 阅读全文
posted @ 2022-09-05 09:18 Ao_min 阅读(2133) 评论(0) 推荐(0) 编辑
摘要: let nape = []; for (let i = 0; i < list.length; i++) { let res = JSON.parse( JSON.stringify(list[i]) .replace(/id/g, 'itemId') .replace(/desc/g, 'item 阅读全文
posted @ 2022-08-18 09:04 Ao_min 阅读(1367) 评论(0) 推荐(0) 编辑
摘要: 定义一个属性方法:<el-card shadow="never" body-style="padding: 12px" :class="sss()"></el-card> methods: //class属性方法 sss() { //根据条件返回样式 if (this.position == 3) 阅读全文
posted @ 2022-08-11 08:59 Ao_min 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 添加scoped情况下改变el-card的header和body样式无效 <style scoped> .el-card .el-card__body { padding: 6px; } .el-card .el-card__header { padding: 8px 20px; border-bo 阅读全文
posted @ 2022-08-10 16:50 Ao_min 阅读(853) 评论(0) 推荐(0) 编辑
摘要: 已知两个数组对象,将两个id和name合并为一个并且数据都加上(二者合一) let a= [ { statusDesc: "已发布" statusId: "1" }, { statusDesc: "认可中", statusId: "2" },{ statusDesc: "已完成", statusId 阅读全文
posted @ 2022-07-22 17:37 Ao_min 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 例如:数组[11,22,33] let valueDetail = [11,22,33]; valueDetail = valueDetail + ''; console.log(valueDetail) // 打印值为“11,22,33” 阅读全文
posted @ 2022-07-20 16:31 Ao_min 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 有时页面需要限制输入框只能输入数字并且不能以0开头,可以通过以下方式实现 οnkeyup="value=value.replace(/[^\d]/g, '').replace(/^0{1,}/g,'')" 如果允许0开头,则可以不用写上第二个replace 或 <el-form-item label 阅读全文
posted @ 2022-07-15 09:32 Ao_min 阅读(2777) 评论(0) 推荐(0) 编辑
摘要: 1.new Vue()表示创建一个空实例对象,在这个实例对象中,只有一些默认的事件和生命周期函数 2.beforeCreate()生命周期函数执行时,data和methods还没有初始化 beforeCreate() { // 这个生命周期函数,基本上不用,除非要设置Vue实例的内容 this.__ 阅读全文
posted @ 2022-07-15 09:28 Ao_min 阅读(332) 评论(0) 推荐(0) 编辑
摘要: .el-table td.el-table__cell div { /* 强制不换⾏ */ white-space: nowrap; /* 超出部分用....代替 */ text-overflow: ellipsis; /* 超出隐藏 */ overflow: hidden; } 阅读全文
posted @ 2022-06-30 15:44 Ao_min 阅读(341) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 17 下一页