Kaynağa Gözat

很重要-添加表头菜单

qdy 1 ay önce
ebeveyn
işleme
1c6593a31a

+ 16
- 2
src/app/pages/service-register-config/service-register-config.component.ts Dosyayı Görüntüle

65
      
65
      
66
       // 列定义 - 使用现有列配置
66
       // 列定义 - 使用现有列配置
67
     columns: [
67
     columns: [
68
-      { title: 'ID', field: 'id', sorter: 'number', headerFilter: 'input', width: 220 },
68
+      
69
+      { title: 'ID', field: 'id', sorter: 'number', headerFilter: 'input', width: 220 ,
70
+        headerMenu: [
71
+      {
72
+        label: "<i class='fa fa-filter'></i> 切换筛选",
73
+        action: (column:any) => {
74
+          const headerFilterEl = column.getElement().querySelector('.tabulator-header-filter');
75
+          if (headerFilterEl) {
76
+            const isHidden = headerFilterEl.style.display === 'none';
77
+            headerFilterEl.style.display = isHidden ? '' : 'none';
78
+          }
79
+        }
80
+      }
81
+    ]
82
+      },
69
       { title: '配置名称', field: 'configName', sorter: 'string', headerFilter: 'input', headerFilterFunc: 'like',width: 110 },
83
       { title: '配置名称', field: 'configName', sorter: 'string', headerFilter: 'input', headerFilterFunc: 'like',width: 110 },
70
       { title: '字段名', field: 'fieldName', sorter: 'string', headerFilter: 'input', headerFilterFunc: 'like' ,width: 130},
84
       { title: '字段名', field: 'fieldName', sorter: 'string', headerFilter: 'input', headerFilterFunc: 'like' ,width: 130},
71
       { title: '字段类型', field: 'fieldType', sorter: 'string', headerFilter: 'input',width: 120, headerFilterParams: { values: ['string', 'number', 'boolean', 'array', 'object'] } },
85
       { title: '字段类型', field: 'fieldType', sorter: 'string', headerFilter: 'input',width: 120, headerFilterParams: { values: ['string', 'number', 'boolean', 'array', 'object'] } },
215
       // 表格样式
229
       // 表格样式
216
       layout: 'fitColumns',
230
       layout: 'fitColumns',
217
       responsiveLayout: 'collapse',
231
       responsiveLayout: 'collapse',
218
-      height: '800px',
232
+      //height: '800px',
219
       
233
       
220
       // 初始加载
234
       // 初始加载
221
       ajaxInitialLoad: true,
235
       ajaxInitialLoad: true,

Loading…
İptal
Kaydet