| | |
| | | |
| | | let editCols = [ |
| | | { |
| | | field: '$sub', |
| | | label: '提交' |
| | | }, |
| | | { |
| | | field: '$next', |
| | | label: '下一行' |
| | | }, |
| | | { |
| | | field: '$noAct', |
| | | label: '无动作' |
| | | } |
| | | ] |
| | | columns.forEach(col => { |
| | |
| | | label: Formdict['model.sort'], |
| | | initVal: card.IsSort || 'false', |
| | | required: true, |
| | | forbidden: card.isSub, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'dropdown', |
| | | label: '下拉宽度', |
| | | initVal: card.dropdown || 'flex', |
| | | required: false, |
| | | options: [{ |
| | | value: 'flex', |
| | | text: '自适应' |
| | | }, { |
| | | value: 'fixed', |
| | | text: '定宽' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'required', |
| | | label: '必填', |
| | | initVal: card.required || 'false', |
| | |
| | | tooltip: '包括文本或数值回车事件、下拉菜单选中事件、开关切换事件。', |
| | | options: editCols |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'footEnter', |
| | | label: '末行回车', |
| | | initVal: card.footEnter || 'false', |
| | | tooltip: '新增功能仅在表格可新增时有效。', |
| | | options: [{ |
| | | value: 'sub', |
| | | text: '提交' |
| | | }, { |
| | | value: 'add', |
| | | text: '新增' |
| | | }, { |
| | | value: 'false', |
| | | text: '无动作' |
| | | }] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'footEnter', |
| | | // label: '末行回车', |
| | | // initVal: card.footEnter || 'false', |
| | | // tooltip: '新增功能仅在表格可新增时有效。', |
| | | // options: [{ |
| | | // value: 'sub', |
| | | // text: '提交' |
| | | // }, { |
| | | // value: 'add', |
| | | // text: '新增' |
| | | // }, { |
| | | // value: 'false', |
| | | // text: '无动作' |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'number', |
| | | key: 'decimal', |
| | |
| | | precision: 0, |
| | | label: Formdict['header.form.decimal'], |
| | | initVal: card.decimal || 0, |
| | | required: true |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | initVal: card.format || 'none', |
| | | options: [{ |
| | | value: 'none', |
| | | text: Formdict['model.empty'] |
| | | text: '无' |
| | | }, { |
| | | value: 'thdSeparator', |
| | | text: '千分位' |
| | |
| | | initVal: card.textFormat || 'none', |
| | | options: [{ |
| | | value: 'none', |
| | | text: Formdict['model.empty'] |
| | | text: '无' |
| | | }, { |
| | | value: 'encryption', |
| | | text: '加密' |
| | | }, { |
| | | value: 'YYYY-MM-DD', |
| | | text: 'YYYY-MM-DD' |
| | |
| | | key: 'formula', |
| | | label: '公式', |
| | | initVal: card.formula || '', |
| | | tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等', |
| | | tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果,在不使用解析时换行符或空格会替换为页面元素。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等', |
| | | placeholder: '例如:@price@ * @number@', |
| | | required: true |
| | | }, |