Browse Source

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

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

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

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

Loading…
Cancel
Save