|
@ -59,18 +59,17 @@ |
|
|
:rules="item.rules" |
|
|
:rules="item.rules" |
|
|
> |
|
|
> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="searchData[item.prop]" |
|
|
v-model="scope.row[item.prop]" |
|
|
:maxlength="item.maxlength" |
|
|
:maxlength="item.maxlength" |
|
|
:onkeyup="typeNumberOnkeyup(item,searchData[item.prop])" |
|
|
:onkeyup="typeNumberOnkeyup(item,item.prop,scope.$index)" |
|
|
clearable |
|
|
clearable |
|
|
:disabled="Boolean(item.disabled)" |
|
|
:disabled="Boolean(item.disabled)" |
|
|
:placeholder="'请输入' + item.label" |
|
|
:placeholder="'请输入' + item.label" |
|
|
:prefix-icon="item.icon" |
|
|
:prefix-icon="item.icon" |
|
|
:show-password="item.showPassword" |
|
|
:show-password="item.showPassword" |
|
|
@change="changeInput(item.prop,$event)" |
|
|
|
|
|
@clear="clearInput(item.prop,$event)" |
|
|
@clear="clearInput(item.prop,$event)" |
|
|
@blur=" |
|
|
@blur=" |
|
|
inputPlaceholder($event, item, 'blur',searchData) |
|
|
inputPlaceholder($event, item, 'blur',scope.row) |
|
|
" |
|
|
" |
|
|
@focus="inputPlaceholder($event, item, 'focus')" |
|
|
@focus="inputPlaceholder($event, item, 'focus')" |
|
|
></el-input> |
|
|
></el-input> |
|
@ -446,16 +445,16 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 数字类型input框onkeyup最大最小值处理 |
|
|
// 数字类型input框onkeyup最大最小值处理 |
|
|
typeNumberOnkeyup(item,value){ |
|
|
typeNumberOnkeyup(item,value,index){ |
|
|
if(value){ |
|
|
if(this.tableData[index][value]){ |
|
|
let _match = String(value).match(/\d+/)//正整数 |
|
|
let _match = String(this.tableData[index][value]).match(/\d+/)//正整数 |
|
|
this.searchData[item.prop] = _match?_match[0]:_match |
|
|
this.tableData[index][value] = _match?_match[0]:_match |
|
|
} |
|
|
} |
|
|
if(this.searchData[item.prop] > item.max){ |
|
|
if(this.tableData[index][value] > item.max){ |
|
|
this.searchData[item.prop] = item.max |
|
|
this.tableData[index][value] = item.max |
|
|
} |
|
|
} |
|
|
if(this.searchData[item.prop] && this.searchData[item.prop] < item.min){ |
|
|
if(this.tableData[index][value] && this.tableData[index][value] < item.min){ |
|
|
this.searchData[item.prop] = item.min |
|
|
this.tableData[index][value] = item.min |
|
|
} |
|
|
} |
|
|
if(item.onkeyup)item.onkeyup() |
|
|
if(item.onkeyup)item.onkeyup() |
|
|
}, |
|
|
}, |
|
@ -509,8 +508,8 @@ export default { |
|
|
func[item.prop]= Number(val.target.value) |
|
|
func[item.prop]= Number(val.target.value) |
|
|
} |
|
|
} |
|
|
// item.valueType |
|
|
// item.valueType |
|
|
// ? (this.searchData[item.prop] = item.valueType( |
|
|
// ? (this.tableData[index][value] = item.valueType( |
|
|
// this.searchData[item.prop] |
|
|
// this.tableData[index][value] |
|
|
// )) |
|
|
// )) |
|
|
// : () => { |
|
|
// : () => { |
|
|
// return; |
|
|
// return; |
|
|