学校登录可按条件查询,修复brand删除后更新错误
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
<div id="app">
|
||||
<div class="captcha">
|
||||
<input v-for="(c, index) in getCtData" :key="index"
|
||||
type="number"
|
||||
type="text"
|
||||
v-model="getCtData[index]" ref="input"
|
||||
pattern="[0-9]*"
|
||||
@input="e => {onInput(e.target.value, index)}"
|
||||
@keydown.delete="e=>{onKeydown(e.target.value, index)}"
|
||||
@focus="onFocus"
|
||||
@@ -54,7 +55,9 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
onInput(val, index) {
|
||||
val = val.replace(/\D/g, '');
|
||||
// val = val.replace(/[^0-9]/g, '');
|
||||
val = String(val).replace(/\D/g, '');
|
||||
this.getCtData[index] = val
|
||||
if (index == this.ctSize - 1) {
|
||||
this.getCtData[this.ctSize - 1] = val[0]; // 最后一个码,只允许输入一个字符。
|
||||
} else if(val.length > 1) {
|
||||
|
||||
Reference in New Issue
Block a user