| | |
| | | computed: { |
| | | basicButtonList() { |
| | | const basicColumn = this.butttonList; |
| | | if (!basicColumn || !Array.isArray(basicColumn)) { |
| | | return []; // 如果 basicColumn 未定义或者不是数组,返回空数组 |
| | | } |
| | | |
| | | if (this.type === 'form' || this.type=='tree') { |
| | | if (this.type === 'form' || this.type === 'tree') { |
| | | return basicColumn; |
| | | } else if (this.type === 'table' || this.type === 'TreeTable') { |
| | | const top = basicColumn.filter(item => item.paramVOS.webUiButtonLocation === 'top' || func.isEmpty(item.paramVOS.webUiButtonLocation)); // 过滤出来表格上面区域展示的按钮 |
| | | const menu = basicColumn.filter(item => item.paramVOS.webUiButtonLocation === 'menu'); // 过滤出来操作栏展示的按钮 |
| | | const top = basicColumn.filter(item => { |
| | | return item.paramVOS && (item.paramVOS.webUiButtonLocation === 'top' || func.isEmpty(item.paramVOS.webUiButtonLocation)); |
| | | }); |
| | | const menu = basicColumn.filter(item => { |
| | | return item.paramVOS && item.paramVOS.webUiButtonLocation === 'menu'; |
| | | }); |
| | | return { |
| | | top: top, |
| | | menu: menu, |