tianheng-ui 0.1.41 → 0.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.1.41",
4
+ "version": "0.1.43",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -229,7 +229,7 @@ export default {
229
229
  this.handleDialogClose();
230
230
  },
231
231
  handleDialogClose() {
232
- this.dialog.show = false;
232
+ this.dialog = { show: false, action: "", data: {} };
233
233
  },
234
234
  handleExcelFileChange() {},
235
235
  handleGenerateJson() {},
@@ -16,25 +16,28 @@
16
16
  <el-collapse v-model="collapseValue">
17
17
  <el-collapse-item title="查询字段" name="group-fields_search">
18
18
  <el-tree
19
+ ref="fieldsSearchTreeRef"
19
20
  :data="fieldsTree.search"
20
21
  :default-checked-keys="searchActiveFields"
21
22
  show-checkbox
22
23
  node-key="key"
24
+ :default-expand-all="true"
25
+ :check-strictly="true"
23
26
  :props="{ label: 'label', value: 'prop' }"
24
- ref="fieldsTreeRef"
25
27
  @check-change="handleTreeCheckChange('search')"
26
28
  >
27
29
  </el-tree>
28
30
  </el-collapse-item>
29
31
  <el-collapse-item title="列表字段" name="group-fields_table">
30
32
  <el-tree
33
+ ref="fieldsTableTreeRef"
31
34
  :data="fieldsTree.table"
32
35
  :default-checked-keys="tableActiveFields"
33
36
  show-checkbox
34
37
  node-key="key"
38
+ :default-expand-all="true"
35
39
  :check-strictly="true"
36
40
  :props="{ label: 'label', value: 'prop' }"
37
- ref="fieldsTreeRef"
38
41
  @check-change="handleTreeCheckChange('table')"
39
42
  >
40
43
  </el-tree>
@@ -735,11 +738,11 @@ export default {
735
738
  initParams(this.fieldsTree.table);
736
739
  },
737
740
  handleTreeCheckChange(action) {
738
- let nodes = deepClone(this.$refs.fieldsTreeRef.getCheckedNodes());
739
741
  if (action === "search") {
740
742
  const keys = this.config.search.options.map(item => {
741
743
  return item.key;
742
744
  });
745
+ let nodes = deepClone(this.$refs.fieldsSearchTreeRef.getCheckedNodes());
743
746
  nodes.map(item => {
744
747
  const index = keys.indexOf(item.key);
745
748
  if (index > -1) {
@@ -754,6 +757,7 @@ export default {
754
757
  return item.key;
755
758
  });
756
759
 
760
+ let nodes = deepClone(this.$refs.fieldsTableTreeRef.getCheckedNodes());
757
761
  nodes = nodes.map(item => {
758
762
  const index = keys.indexOf(item.key);
759
763
  if (index > -1) {
@@ -764,7 +768,6 @@ export default {
764
768
  });
765
769
  this.config.table.options = nodes;
766
770
  }
767
- console.log("handleTreeCheckChange =>", nodes);
768
771
  },
769
772
  // 对外暴露表单校验
770
773
  formValidate() {
@@ -10,14 +10,24 @@
10
10
  >
11
11
  <div class="table-item table-header">
12
12
  <div class="table-item-custom">拖动</div>
13
- <div>列名</div>
14
- <el-tooltip
15
- content="对应列内容的字段名,支持eval函数,非必要不修改!"
16
- placement="top-start"
17
- effect="light"
18
- >
19
- <div><el-button type="text">字段</el-button></div>
20
- </el-tooltip>
13
+ <div>
14
+ <el-tooltip
15
+ content="对应列的表头名称"
16
+ placement="top-start"
17
+ effect="light"
18
+ >
19
+ <el-button type="text">列名</el-button>
20
+ </el-tooltip>
21
+ </div>
22
+ <div>
23
+ <el-tooltip
24
+ content="对应列内容的字段名,非必要不修改!"
25
+ placement="top-start"
26
+ effect="light"
27
+ >
28
+ <el-button type="text">字段</el-button>
29
+ </el-tooltip>
30
+ </div>
21
31
  <div>类型</div>
22
32
  <div>默认值</div>
23
33
  <!-- <div>数据来源</div> -->
@@ -89,14 +99,24 @@
89
99
  <div class="tableList" style="height: calc(100% - 350px);">
90
100
  <div class="table-item table-header">
91
101
  <div class="table-item-custom">拖动</div>
92
- <div>列名</div>
93
- <el-tooltip
94
- content="对应列内容的字段名,支持eval函数,非必要不修改!"
95
- placement="top-start"
96
- effect="light"
97
- >
98
- <div><el-button type="text">字段</el-button></div>
99
- </el-tooltip>
102
+ <div>
103
+ <el-tooltip
104
+ content="对应列的表头名称"
105
+ placement="top-start"
106
+ effect="light"
107
+ >
108
+ <el-button type="text">列名</el-button>
109
+ </el-tooltip>
110
+ </div>
111
+ <div>
112
+ <el-tooltip
113
+ content="对应列内容的字段名,非必要不修改!"
114
+ placement="top-start"
115
+ effect="light"
116
+ >
117
+ <el-button type="text">字段</el-button>
118
+ </el-tooltip>
119
+ </div>
100
120
  <div>对齐</div>
101
121
  <div>宽度</div>
102
122
  <div class="table-item-custom">排序</div>