| | |
| | | |
| | | const gridOptions = reactive({ |
| | | loading:false, |
| | | showHeaderOverflow: false, |
| | | showFooterOverflow: false, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | scrollX:{ enabled: true,gt:30 },//开启虚拟滚动 |
| | | scrollY:{ enabled: true,gt:13 },//开启虚拟滚动 |
| | | //scrollX:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | menuConfig: { |
| | | body: { |
| | |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | ], |
| | | }, |
| | | toolbarConfig: { |
| | | buttons: [ |
| | |
| | | otherMoney.value = titleSelectJson.value.orderOtherMoney[0] |
| | | //let columns = [] |
| | | otherMoney.value.forEach(item => { |
| | | let column = {field: `otherColumns.${item.column}`,width:50, title: item.alias,editRender: { name: 'input'}} |
| | | let column = { |
| | | field: `otherColumns.${item.column}`, |
| | | width:50, title: item.alias, |
| | | editRender: { |
| | | name: 'input', |
| | | } |
| | | } |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/ |
| | | if (cellValue && !regex.test(cellValue)) { |
| | | return new Error(t('basicData.msg.range99999Dec2')) |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | |
| | | //columns.push(column) |
| | | gridOptions.columns.push(column) |
| | | |
| | | }) |
| | | |
| | | //进入页面下拉框设置默认值 |