2022年2月9日
摘要: store.js state:{setVal:' '} mutatios:{ newSet(state,val){ state.setVal = val } } <script> import {mapstate,mapMutations} from 'vuex' 取值 computed:{ ... 阅读全文
posted @ 2022-02-09 14:50 万能的李大少 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 只能录入0-10之间的数字,最多三位小数 reg = /^(0|[1-9]|9)(\.\d{1,3})?$/ 检查邮箱是否合法 /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s ); ip地址 /^(?= 阅读全文
posted @ 2022-02-09 14:34 万能的李大少 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 文本框换行转译 data.indexOf('\\n') != '-1' data.replace(/\\n/g,"\r"), else data.replace(/\\r/g,"/r") html换行转译 data.indexOf('\\n') != '-1' data.replace(/\\n/g 阅读全文
posted @ 2022-02-09 14:23 万能的李大少 阅读(69) 评论(0) 推荐(0) 编辑