田源
2024-04-10 38eb77cbc82612ce5ec059bf506744a556d540cc
buttonList判空
已修改1个文件
13 ■■■■ 文件已修改
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
@@ -250,12 +250,19 @@
  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,