前端大杂烩共10篇
前端
Vue 银行卡号 每4位补一个空格-辛达科技-一个只分享技术的站

Vue 银行卡号 每4位补一个空格

vue 隔四个字符加一个空格 效果图 输入方式进行格式化 代码: <el-form-item label="测试" prop="test"> <el-input v-model="queryParams.test" placeholder="测试" clearable :maxlength="23" size="small" /> </el-form-item> watch监听 watch: { ['queryParams.test'](val) { this.$nextTick(() => { this.queryParams.test = val.replace(/\D/g,'').replace(/....(?!$)/g,'$& '); console.log('数字是多少:', this.queryParams.test,val) }); } }, 展示直接格式化 {{ item.name.replace(/(\d{4})(?=\d)/g, '$1 ') }}
韩昊杰的头像-辛达科技-一个只分享技术的站韩昊杰4年前
0 8 0
使用uniapp的时候使用`scroll-view`标签不出现滚动条-辛达科技-一个只分享技术的站

使用uniapp的时候使用`scroll-view`标签不出现滚动条

vue 隔四个字符加一个空格 效果图 输入方式进行格式化 代码: <el-form-item label="测试" prop="test"> <el-input v-model="queryParams.test" placeholder="测试" clearable :maxlength="23" size="small" /> </el-form-item> watch监听 watch: { ['queryParams.test'](val) { this.$nextTick(() => { this.queryParams.test = val.replace(/\D/g,'').replace(/....(?!$)/g,'$& '); console.log('数字是多少:', this.queryParams.test,val) }); } }, 展示直接格式化 {{ item.name.replace(/(\d{4})(?=\d)/g, '$1 ') }}
韩昊杰的头像-辛达科技-一个只分享技术的站韩昊杰3年前
1 3 0
微信小程序rpx,px,rem单位换算规则-辛达科技-一个只分享技术的站

微信小程序rpx,px,rem单位换算规则

vue 隔四个字符加一个空格 效果图 输入方式进行格式化 代码: <el-form-item label="测试" prop="test"> <el-input v-model="queryParams.test" placeholder="测试" clearable :maxlength="23" size="small" /> </el-form-item> watch监听 watch: { ['queryParams.test'](val) { this.$nextTick(() => { this.queryParams.test = val.replace(/\D/g,'').replace(/....(?!$)/g,'$& '); console.log('数字是多少:', this.queryParams.test,val) }); } }, 展示直接格式化 {{ item.name.replace(/(\d{4})(?=\d)/g, '$1 ') }}
韩昊杰的头像-辛达科技-一个只分享技术的站韩昊杰4年前
0 3 0
微信小程序及UNI-APP修改SWIPER轮播DOT指示点样式-辛达科技-一个只分享技术的站

微信小程序及UNI-APP修改SWIPER轮播DOT指示点样式

vue 隔四个字符加一个空格 效果图 输入方式进行格式化 代码: <el-form-item label="测试" prop="test"> <el-input v-model="queryParams.test" placeholder="测试" clearable :maxlength="23" size="small" /> </el-form-item> watch监听 watch: { ['queryParams.test'](val) { this.$nextTick(() => { this.queryParams.test = val.replace(/\D/g,'').replace(/....(?!$)/g,'$& '); console.log('数字是多少:', this.queryParams.test,val) }); } }, 展示直接格式化 {{ item.name.replace(/(\d{4})(?=\d)/g, '$1 ') }}
韩昊杰的头像-辛达科技-一个只分享技术的站韩昊杰4年前
0 3 0
小程序处理TypeError: Cannot read property 'slice' of undefined" found in-辛达科技-一个只分享技术的站

小程序处理TypeError: Cannot read property 'slice' of undefined" found in

vue 隔四个字符加一个空格 效果图 输入方式进行格式化 代码: <el-form-item label="测试" prop="test"> <el-input v-model="queryParams.test" placeholder="测试" clearable :maxlength="23" size="small" /> </el-form-item> watch监听 watch: { ['queryParams.test'](val) { this.$nextTick(() => { this.queryParams.test = val.replace(/\D/g,'').replace(/....(?!$)/g,'$& '); console.log('数字是多少:', this.queryParams.test,val) }); } }, 展示直接格式化 {{ item.name.replace(/(\d{4})(?=\d)/g, '$1 ') }}
韩昊杰的头像-辛达科技-一个只分享技术的站韩昊杰4年前
0 2 0