| | |
| | | } |
| | | } |
| | | |
| | | let btnNames = config.action.map(item => item.label) |
| | | btnNames = Array.from(new Set(btnNames)) |
| | | if (btnNames.length < config.action.length) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '按钮名称不可相同!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let tabNames = [] |
| | | let tablength = 0 |
| | | config.tabgroups.forEach(group => { |
| | | config[group].forEach(tab => { |
| | | tabNames.push(tab.label) |
| | | }) |
| | | tablength += config[group].length |
| | | }) |
| | | tabNames = Array.from(new Set(tabNames)) |
| | | |
| | | if (tabNames.length < tablength) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '标签名称不可相同!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (config.type === 'user') { // 使用已有菜单时,默认添加关联标签id |
| | | config.action = config.action.map(item => { |
| | | if (item.OpenType === 'popview' && !item.linkTab) { |