| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'insert', |
| | | label: '添加卡片', |
| | | initVal: card.insert || 'false', |
| | | tooltip: '选择显示添加卡片,且存在操作类型为添加的按钮时,卡片尾部会增加添加功能卡片(只显示第一个添加按钮)', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '显示' |
| | | }, { |
| | | value: 'false', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | |
| | | * @description 获取卡片详情表单配置信息 |
| | | * @param {object} card // 标签配置信息 |
| | | */ |
| | | export function getCardDetailForm (card, _columns, _type, _actions = []) { |
| | | export function getCardDetailForm (card, _columns, _type, _actions = [], isRatioCard) { |
| | | let actions = '' |
| | | if (_type === 'bottom') { |
| | | actions = card.actions ? card.actions.map(cell => cell.value) : [] |
| | | } else { |
| | | } else if (_type === 'header') { |
| | | _actions.unshift({ |
| | | value: '', |
| | | text: '空' |
| | |
| | | options: _columns |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'bold', |
| | | label: '加粗', |
| | | initVal: card.bold || 'false', |
| | | type: 'number', |
| | | key: 'fontSize', |
| | | min: 12, |
| | | max: 50, |
| | | label: '字体大小', |
| | | initVal: card.fontSize || 14, |
| | | required: true, |
| | | forbid: !['detail'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'fontWeight', |
| | | label: '字体粗细', |
| | | initVal: card.fontWeight || 'normal', |
| | | required: true, |
| | | forbid: !['detail'].includes(_type), |
| | | options: [{ |
| | | value: 'true', |
| | | text: '是' |
| | | value: 'normal', |
| | | text: '正常' |
| | | }, { |
| | | value: 'false', |
| | | text: '否' |
| | | value: 'bold', |
| | | text: 'bold' |
| | | }, { |
| | | value: 'bolder', |
| | | text: 'bolder' |
| | | }, { |
| | | value: 'lighter', |
| | | text: 'lighter' |
| | | }, { |
| | | value: '100', |
| | | text: '100' |
| | | }, { |
| | | value: '200', |
| | | text: '200' |
| | | }, { |
| | | value: '300', |
| | | text: '300' |
| | | }, { |
| | | value: '400', |
| | | text: '400' |
| | | }, { |
| | | value: '500', |
| | | text: '500' |
| | | }, { |
| | | value: '600', |
| | | text: '600' |
| | | }, { |
| | | value: '700', |
| | | text: '700' |
| | | }, { |
| | | value: '800', |
| | | text: '800' |
| | | }, { |
| | | value: '900', |
| | | text: '900' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | type: 'number', |
| | | key: 'width', |
| | | label: '宽度', |
| | | initVal: card.width || '', |
| | | required: false, |
| | | forbid: !['detail'].includes(_type), |
| | | options: [{ |
| | | value: '', |
| | | text: '100%' |
| | | }, { |
| | | value: 'helf', |
| | | text: '50%' |
| | | }, { |
| | | value: 'third', |
| | | text: '33.3%' |
| | | }] |
| | | min: 10, |
| | | max: 100, |
| | | precision: 1, |
| | | label: '宽度(%)', |
| | | initVal: card.width || 100, |
| | | required: true, |
| | | forbid: !['detail'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'height', |
| | | min: 1, |
| | | max: 10, |
| | | label: '高度(行)', |
| | | initVal: card.height || 1, |
| | | required: true, |
| | | forbid: !['detail'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'widthType', |
| | | label: '宽度设置', |
| | | initVal: card.widthType || 'absolute', |
| | | initVal: card.widthType || 'ratio', |
| | | required: false, |
| | | forbid: !['avatar'].includes(_type), |
| | | hidden: true, |
| | | readonly: !!isRatioCard, |
| | | options: [{ |
| | | value: 'ratio', |
| | | text: '比例' |
| | |
| | | forbid: !['avatar'].includes(_type) |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'radius', |
| | | label: '圆角', |
| | | initVal: card.radius || 'true', |
| | | required: false, |
| | | forbid: !['avatar'].includes(_type), |
| | | options: [{ |
| | | value: 'true', |
| | | text: '有' |
| | | }, { |
| | | value: 'false', |
| | | text: '无' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'size', |
| | | label: '字体大小', |