Browse Source

tableform 数字输入框添加改变事件

master
陈薪名 10 months ago
parent
commit
15d94c0f59
  1. 9
      src/components/BasicForm/src/BasicForm.vue
  2. 5
      src/components/TableForm/src/TableForm.vue

9
src/components/BasicForm/src/BasicForm.vue

@ -84,6 +84,7 @@
@inpuFocus="inpuFocus"
@buttonOperationClick="buttonOperationClick"
@inputStringBlur="inputStringBlur"
@inputNumberChange="inputNumberChange"
/>
</div>
<div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
@ -466,7 +467,8 @@ const emit = defineEmits([
'tableFormChange',
'buttonOperationClick',
'inputStringBlur',
'onChange'
'onChange',
'inputNumberChange'
])
//
const formSelectChange = (field, val, row) => {
@ -483,6 +485,11 @@ const tableSelectionChange = (val) => {
const tableSortChange = (column, prop, order) => {
emit('tableSortChange', column, prop, order)
}
// -
const inputNumberChange = (field, index, row, val) => {
emit('inputNumberChange', field, index, row, val)
}
//
// const showSelect = (val, statusID) => {
// return getDictForStatusID(val, statusID)

5
src/components/TableForm/src/TableForm.vue

@ -94,6 +94,7 @@
:min="headerItem?.tableForm?.min"
:precision="headerItem?.tableForm?.precision"
:disabled="itemIsDisabled(headerItem, row)"
@change="(e)=>{inputNumberChange(headerItem.field, $index, row, e)}"
/>
</el-form-item>
<!-- 下拉框 -->
@ -355,6 +356,10 @@ const initSelectOptions = (item) => {
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
}
// -
const inputNumberChange = (field, index, row, e) => {
emit('inputNumberChange', field, index, row, e)
}
// selection
const tableSelectionChange = (val) => {

Loading…
Cancel
Save