| | |
| | | */ |
| | | static updateCommonTable (config) { |
| | | if (!config.version || config.version < '1.0') { |
| | | config.version = '1.0' |
| | | // 兼容标签 |
| | | if (!config.tabgroups) { |
| | | config.tabgroups = [{ uuid: 'tabs', sublist: [] }] |
| | |
| | | |
| | | return _cell |
| | | }) |
| | | |
| | | if (card.widthType === 'ratio' && card.avatar && card.avatar.widthType !== 'ratio') { |
| | | card.avatar.widthType = 'ratio' |
| | | card.avatar.width = 32 |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (config.version < '1.1') { |
| | | config.version = '1.1' |
| | | if (config.setting.interType === 'inner' && !config.setting.innerFunc) { |
| | | config.setting.interType = 'system' |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | config.version = '1.1' |
| | | if (config.version < '1.2') { |
| | | config.version = '1.2' |
| | | // 兼容功能按钮 |
| | | config.action = config.action.map(item => { |
| | | if (item.execMode) { |
| | | item.OpenType = 'funcbutton' |
| | | } |
| | | return item |
| | | }) |
| | | } |
| | | |
| | | config.Template = 'CommonTable' |
| | | |
| | | return config |
| | |
| | | */ |
| | | static updateSubTable (config) { |
| | | if (!config.version || config.version < '1.0') { |
| | | config.version = '1.0' |
| | | // 兼容图表 |
| | | if (!config.charts) { |
| | | config.expand = false |
| | |
| | | |
| | | return _cell |
| | | }) |
| | | |
| | | if (card.widthType === 'ratio' && card.avatar && card.avatar.widthType !== 'ratio') { |
| | | card.avatar.widthType = 'ratio' |
| | | card.avatar.width = 32 |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (config.version < '1.1') { |
| | | config.version = '1.1' |
| | | if (config.setting.interType === 'inner' && !config.setting.innerFunc) { |
| | | config.setting.interType = 'system' |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | config.version = '1.1' |
| | | if (config.version < '1.2') { |
| | | config.version = '1.2' |
| | | // 兼容功能按钮 |
| | | config.action = config.action.map(item => { |
| | | if (item.execMode) { |
| | | item.OpenType = 'funcbutton' |
| | | } |
| | | return item |
| | | }) |
| | | } |
| | | |
| | | config.Template = 'SubTable' |
| | | |
| | | return config |