bri-components 1.6.17 → 1.6.18

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/src/components/controls/base/DshCascader/components/cascaderPicker.vue +122 -2
  3. package/src/components/controls/base/DshCoordinates.vue +1 -1
  4. package/src/components/controls/base/DshDivider.vue +20 -16
  5. package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +2 -2
  6. package/src/components/controls/mixins/cascaderTableMixin.js +10 -2
  7. package/src/components/controls/mixins/flatTableMixin.js +9 -1
  8. package/src/components/controls/senior/cascaderTable.vue +6 -0
  9. package/src/components/controls/senior/flatTable.vue +3 -0
  10. package/src/components/list/BriTable.vue +1 -1
  11. package/src/components/list/DshBox/DshSingleData.vue +2 -2
  12. package/src/components/list/DshBox/DshTable.vue +4 -4
  13. package/src/components/list/mixins/DshCascaderTableMixin.js +1 -1
  14. package/src/components/list/mixins/DshFlatTableMixin.js +1 -1
  15. package/src/components/list/mixins/DshTreeTableMixin.js +1 -1
  16. package/src/components/list/mixins/tableBaseMixin.js +57 -7
  17. package/src/styles/iconfont/iconfont.js +1 -1
  18. package/lib/0.bri-components.min.js +0 -1
  19. package/lib/1.bri-components.min.js +0 -1
  20. package/lib/10.bri-components.min.js +0 -1
  21. package/lib/11.bri-components.min.js +0 -1
  22. package/lib/2.bri-components.min.js +0 -1
  23. package/lib/3.bri-components.min.js +0 -1
  24. package/lib/4.bri-components.min.js +0 -1
  25. package/lib/5.bri-components.min.js +0 -1
  26. package/lib/6.bri-components.min.js +0 -1
  27. package/lib/7.bri-components.min.js +0 -1
  28. package/lib/8.bri-components.min.js +0 -1
  29. package/lib/9.bri-components.min.js +0 -1
  30. package/lib/bri-components.min.js +0 -59
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.6.17",
3
+ "version": "1.6.18",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -87,7 +87,10 @@
87
87
  <!-- 内容 -->
88
88
  <div class="wrap-content">
89
89
  <!-- 选中项tabs -->
90
- <div class="wrap-content-tabs">
90
+ <div
91
+ v-if="!isCheckboxMode"
92
+ class="wrap-content-tabs"
93
+ >
91
94
  <span
92
95
  v-for="(tabItem, tabIndex) in selectedLinealDatas"
93
96
  :key="tabIndex"
@@ -111,8 +114,46 @@
111
114
  v-if="showTreeData.length"
112
115
  class="wrap-content-list-menu"
113
116
  >
117
+ <!-- 多选框方式(multipleMode 且 _cascaderLevel === 1) -->
118
+ <template v-if="isCheckboxMode">
119
+ <!-- 全选 -->
120
+ <div
121
+ class="item item-select-all"
122
+ @click="clickSelectAll"
123
+ >
124
+ <span class="item-checkbox">
125
+ <Checkbox
126
+ :value="isAllSelected"
127
+ :indeterminate="isIndeterminate"
128
+ ></Checkbox>
129
+ </span>
130
+ <span class="item-name">全选</span>
131
+ </div>
132
+
133
+ <div
134
+ v-for="nodeItem in showTreeData"
135
+ :key="nodeItem[valueKey]"
136
+ :class="{
137
+ 'item': true,
138
+ 'item-active': isNodeChecked(nodeItem),
139
+ 'item-disabled': nodeItem.disabled
140
+ }"
141
+ @click="clickCheckboxItem(nodeItem)"
142
+ >
143
+ <span class="item-checkbox">
144
+ <Checkbox
145
+ :value="isNodeChecked(nodeItem)"
146
+ :disabled="nodeItem.disabled"
147
+ ></Checkbox>
148
+ </span>
149
+ <span class="item-name">
150
+ {{ nodeItem[nameKey] }}
151
+ </span>
152
+ </div>
153
+ </template>
154
+
114
155
  <!-- 拍平方式 -->
115
- <template v-if="useFlatMode">
156
+ <template v-else-if="useFlatMode">
116
157
  <div
117
158
  v-for="nodeItem in showFlatData"
118
159
  :key="nodeItem[valueKey]"
@@ -196,6 +237,22 @@
196
237
  };
197
238
  },
198
239
  computed: {
240
+ isCheckboxMode () {
241
+ return this.multipleMode && this.selfPropsObj._cascaderLevel === "1";
242
+ },
243
+ isAllSelected () {
244
+ return this.showTreeData.length > 0 &&
245
+ this.showTreeData.every(node => this.selectedValueArr.some(
246
+ val => JSON.stringify(val) === JSON.stringify(node.keys)
247
+ ));
248
+ },
249
+ isIndeterminate () {
250
+ const checkedCount = this.showTreeData.filter(node =>
251
+ this.selectedValueArr.some(val => JSON.stringify(val) === JSON.stringify(node.keys))
252
+ ).length;
253
+ return checkedCount > 0 && checkedCount < this.showTreeData.length;
254
+ },
255
+
199
256
  selectedLinealDatas () {
200
257
  const arr = this.selectedOptions.map((item, index, list) => {
201
258
  return {
@@ -269,6 +326,56 @@
269
326
  if (this.searchMode === "default" && node.children.length) {
270
327
  this.curTabIndex = this.curTabIndex + 1;
271
328
  }
329
+ },
330
+
331
+ isNodeChecked (node) {
332
+ return this.selectedValueArr.some(val => JSON.stringify(val) === JSON.stringify(node.keys));
333
+ },
334
+ clickCheckboxItem (node) {
335
+ if (node.disabled) return;
336
+ const index = this.selectedValueArr.findIndex(val => JSON.stringify(val) === JSON.stringify(node.keys));
337
+ if (index === -1) {
338
+ this.selectedValueArr = [...this.selectedValueArr, node.keys];
339
+ } else {
340
+ this.selectedValueArr = this.selectedValueArr.filter((_, i) => i !== index);
341
+ }
342
+ },
343
+ clickSelectAll () {
344
+ if (this.isAllSelected) {
345
+ this.selectedValueArr = [];
346
+ } else {
347
+ this.selectedValueArr = this.showTreeData
348
+ .filter(node => !node.disabled)
349
+ .map(node => node.keys);
350
+ }
351
+ },
352
+ clickConfirm () {
353
+ if (this.isCheckboxMode) {
354
+ if (this.selectedValueArr.length) {
355
+ this.$emit("confirmMul", this.selectedValueArr, this.selectedOptionsArr);
356
+ } else {
357
+ this.$Message.error({
358
+ content: "请选择数据!",
359
+ duration: 2
360
+ });
361
+ }
362
+ } else {
363
+ if (this.selectedValue.length && this.selectedOptions.length) {
364
+ if (!this.changeOnSelect && !this.selectedObj.isLeaf) {
365
+ this.$Message.error({
366
+ content: "请选择到末级数据!",
367
+ duration: 2
368
+ });
369
+ } else {
370
+ this.$emit("confirm", this.selectedValue, this.selectedOptions);
371
+ }
372
+ } else {
373
+ this.$Message.error({
374
+ content: "请选择数据!",
375
+ duration: 2
376
+ });
377
+ }
378
+ }
272
379
  }
273
380
  }
274
381
  };
@@ -375,6 +482,13 @@
375
482
  justify-content: space-between;
376
483
  align-items: center;
377
484
 
485
+ &-checkbox {
486
+ margin-right: 5px;
487
+ display: flex;
488
+ align-items: center;
489
+ flex-shrink: 0;
490
+ }
491
+
378
492
  &-name {
379
493
  flex: 1;
380
494
  min-width: 0px;
@@ -402,6 +516,12 @@
402
516
  color: @textColor-disabled;
403
517
  }
404
518
  }
519
+
520
+ &-select-all {
521
+ border-bottom: 1px solid @borderColor;
522
+ margin-bottom: 4px;
523
+ font-weight: 500;
524
+ }
405
525
  }
406
526
  }
407
527
 
@@ -506,7 +506,7 @@
506
506
  paramStr += attr + "=" + params[attr] + "&";
507
507
  }
508
508
 
509
- fetch("http://restapi.amap.com/v3/geocode/regeo?" + paramStr)
509
+ fetch("https://restapi.amap.com/v3/geocode/regeo?" + paramStr)
510
510
  .then(res => res.json())
511
511
  .then(response => {
512
512
  if (response.status === "1" && response.regeocode) {
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div
3
3
  class="DshDivider"
4
- :style="showMode === 'flag' ? { marginRight:'36px' } : {}"
4
+ :style="showMode === 'flag' ? { marginRight: '36px' } : {}"
5
5
  >
6
6
  <!-- <div class="DshDivider-cli">
7
- <p>{{ controlName }}</p>
7
+ <p>{{ tagName }}</p>
8
8
  </div> -->
9
9
 
10
10
  <div
@@ -16,7 +16,7 @@
16
16
  style="margin-top: -1px"
17
17
  :custom="'bico-font ' + iconType"
18
18
  />
19
- <p>{{ controlName }}</p>
19
+ <p>{{ tagName }}</p>
20
20
  <span class="triangle-topleft"></span>
21
21
  <span class="triangle-topright"></span>
22
22
  </div>
@@ -25,7 +25,7 @@
25
25
  v-else-if="showMode === 'line'"
26
26
  class="DshDivider-line"
27
27
  >
28
- <p>{{ controlName }}</p>
28
+ <p>{{ tagName }}</p>
29
29
  <span></span>
30
30
  </div>
31
31
 
@@ -36,7 +36,7 @@
36
36
  <span class="DshDivider-circle-icon">
37
37
  <Icon :custom="'bico-font ' + iconType" />
38
38
  </span>
39
- <p>{{ controlName }}</p>
39
+ <p>{{ tagName }}</p>
40
40
  </div>
41
41
  </div>
42
42
  </template>
@@ -67,6 +67,10 @@
67
67
  },
68
68
  iconType () {
69
69
  return this.selfPropsObj._tagIcon;
70
+ },
71
+
72
+ tagName () {
73
+ return this.controlName;
70
74
  }
71
75
  },
72
76
  created () {},
@@ -77,7 +81,7 @@
77
81
  <style lang="less">
78
82
  .DshDivider {
79
83
  margin-right: 20px;
80
- font-family: SourceHanSansCN-Medium,SourceHanSansCN;
84
+ font-family: SourceHanSansCN-Medium, SourceHanSansCN;
81
85
  font-weight: 500;
82
86
  font-size: 14px;
83
87
 
@@ -109,11 +113,11 @@
109
113
  height: 38px;
110
114
  margin-bottom: 4px;
111
115
  background: linear-gradient(57deg, @themeColor 0%, #85CBED 100%);
112
- line-height:38px;
116
+ line-height: 38px;
113
117
  display: inline-flex;
114
118
  align-items: center;
115
119
  padding: 0 10px;
116
- color:rgba(255,255,255,1);
120
+ color: rgba(255, 255, 255, 1);
117
121
  position: relative;
118
122
 
119
123
  .triangle-topleft {
@@ -148,9 +152,9 @@
148
152
  display: inline-flex;
149
153
  align-items: center;
150
154
  line-height: 32px;
151
- color:rgba(255,255,255,1);
152
- background:linear-gradient(270deg,rgba(166,215,250,1) 0%,rgba(109,174,242,1) 47%,rgba(109,174,242,1) 100%);
153
- border-radius:16px;
155
+ color: rgba(255, 255, 255, 1);
156
+ background: linear-gradient(270deg, rgba(166, 215, 250, 1) 0%, rgba(109, 174, 242, 1) 47%, rgba(109, 174, 242, 1) 100%);
157
+ border-radius: 16px;
154
158
  padding: 0 20px;
155
159
 
156
160
  &-icon {
@@ -167,22 +171,22 @@
167
171
 
168
172
  &-line {
169
173
  color: @themeColor;
170
- min-width:130px;
174
+ min-width: 130px;
171
175
  height: 32px;
172
176
  max-width: 100%;
173
177
  display: inline-block;
174
- flex-direction:column;
178
+ flex-direction: column;
175
179
 
176
180
  p {
177
181
  height: 32px;
178
182
  line-height: 32px;
179
- font-size:14px;
183
+ font-size: 14px;
180
184
  }
181
185
 
182
186
  span {
183
187
  display: block;
184
188
  width: 100%;
185
- background:linear-gradient(270deg,rgba(166,215,250,0) 0%,rgba(109,174,242,1) 100%) bottom left no-repeat;
189
+ background: linear-gradient(270deg, rgba(166, 215, 250, 0) 0%, @themeColor 100%) bottom left no-repeat;
186
190
  height: 1px;
187
191
  position: relative;
188
192
  &::before {
@@ -191,7 +195,7 @@
191
195
  height: 5px;
192
196
  position: absolute;
193
197
  border-radius: 5px;
194
- background: #6DAEF2;
198
+ background: @themeColor;
195
199
  left: 0px;
196
200
  top: -2px;
197
201
  }
@@ -367,9 +367,9 @@
367
367
  },
368
368
  change (event) {
369
369
  if (event.type == "change" && this.activeChange) {
370
-
370
+ // 暂无处理
371
371
  } else if (event.type == "input" && !this.activeChange) {
372
-
372
+ // 暂无处理
373
373
  } else {
374
374
  let val = event.target.value.trim();
375
375
  if (this.parser) {
@@ -18,6 +18,7 @@ export default {
18
18
  selfPropsObj () {
19
19
  return {
20
20
  _subType: "default", // "default", "cross", "old"
21
+ _groupForm: [], // 多级表头
21
22
  _subForm: [],
22
23
  _treeForm: [],
23
24
  _searchList: [], // 作为搜索的字段
@@ -46,12 +47,19 @@ export default {
46
47
  subType () {
47
48
  return this.selfPropsObj._subType;
48
49
  },
50
+ groupForm () {
51
+ return this.curVal && this.curVal._groupForm && this.curVal._groupForm.length
52
+ ? this.curVal._groupForm
53
+ : this.selfPropsObj._groupForm;
54
+ },
49
55
  subForm () {
50
- return this.selfPropsObj._subForm;
56
+ return this.curVal && this.curVal._subForm && this.curVal._subForm.length
57
+ ? this.curVal._subForm
58
+ : this.selfPropsObj._subForm;
51
59
  },
52
60
  // 老版级联表格,用户态的每条数据的表头配置,都是存的自己的,不用配置里的_treeForm
53
61
  treeForm () {
54
- return ["old"].includes(this.subType) && this.curVal && this.curVal._treeForm
62
+ return ["old"].includes(this.subType) && this.curVal && this.curVal._treeForm && this.curVal._treeForm.length
55
63
  ? this.curVal._treeForm
56
64
  : this.selfPropsObj._treeForm;
57
65
  },
@@ -15,6 +15,7 @@ export default {
15
15
  computed: {
16
16
  selfPropsObj () {
17
17
  return {
18
+ _groupForm: [], // 多级表头
18
19
  _subForm: [],
19
20
  _searchList: [], // 作为搜索的字段
20
21
  _tableAdvSearch: {
@@ -33,8 +34,15 @@ export default {
33
34
  }
34
35
  };
35
36
  },
37
+ groupForm () {
38
+ return this.curVal && this.curVal._groupForm && this.curVal._groupForm.length
39
+ ? this.curVal._groupForm
40
+ : this.selfPropsObj._groupForm;
41
+ },
36
42
  subForm () {
37
- return this.selfPropsObj._subForm;
43
+ return this.curVal && this.curVal._subForm && this.curVal._subForm.length
44
+ ? this.curVal._subForm
45
+ : this.selfPropsObj._subForm;
38
46
  },
39
47
 
40
48
  searchList () {
@@ -35,6 +35,7 @@
35
35
  :tableDataObj="curVal"
36
36
  :data="curVal.tree"
37
37
  :rowDefault="curVal.rowDefault"
38
+ :gpColumns="groupForm"
38
39
  :columns="subForm"
39
40
  :treeColumns="treeForm"
40
41
  :propsObj="{
@@ -58,6 +59,7 @@
58
59
  :tableDataObj="curVal"
59
60
  :data="curVal.tree"
60
61
  :rowDefault="rowDefault"
62
+ :gpColumns="groupForm"
61
63
  :columns="subForm"
62
64
  :treeColumns="treeForm"
63
65
  :propsObj="{
@@ -84,6 +86,7 @@
84
86
  :tableDataObj="curVal"
85
87
  :data="curVal.tree"
86
88
  :rowDefault="curVal.rowDefault"
89
+ :gpColumns="groupForm"
87
90
  :columns="subForm"
88
91
  :treeColumns="treeForm"
89
92
  :propsObj="defaultPropsObj"
@@ -104,6 +107,7 @@
104
107
  :tableDataObj="curVal"
105
108
  :data="curVal.tree"
106
109
  :rowDefault="rowDefault"
110
+ :gpColumns="groupForm"
107
111
  :columns="subForm"
108
112
  :treeColumns="treeForm"
109
113
  :propsObj="defaultPropsObj"
@@ -124,6 +128,7 @@
124
128
  :tableDataObj="curVal"
125
129
  :data="curVal.tree"
126
130
  :rowDefault="curVal.rowDefault"
131
+ :gpColumns="groupForm"
127
132
  :columns="subForm"
128
133
  :treeColumns="treeForm"
129
134
  :propsObj="selfPropsObj"
@@ -145,6 +150,7 @@
145
150
  :tableDataObj="curVal"
146
151
  :data="curVal.tree"
147
152
  :rowDefault="rowDefault"
153
+ :gpColumns="groupForm"
148
154
  :columns="subForm"
149
155
  :treeColumns="treeForm"
150
156
  :propsObj="selfPropsObj"
@@ -33,6 +33,7 @@
33
33
  :tableDataObj="curVal"
34
34
  :data="curVal.list"
35
35
  :rowDefault="curVal.rowDefault"
36
+ :gpColumns="groupForm"
36
37
  :columns="subForm"
37
38
  :propsObj="{
38
39
  ...propsObj,
@@ -55,6 +56,7 @@
55
56
  :tableDataObj="curVal"
56
57
  :data="curVal.list"
57
58
  :rowDefault="curVal.rowDefault"
59
+ :gpColumns="groupForm"
58
60
  :columns="subForm"
59
61
  :propsObj="defaultPropsObj"
60
62
  :parentObj="value"
@@ -71,6 +73,7 @@
71
73
  :tableDataObj="curVal"
72
74
  :data="curVal.list"
73
75
  :rowDefault="curVal.rowDefault"
76
+ :gpColumns="groupForm"
74
77
  :columns="subForm"
75
78
  :propsObj="propsObj"
76
79
  :parentObj="value"
@@ -132,7 +132,7 @@
132
132
  return {
133
133
  click: (event) => {
134
134
  if (!["checkbox"].includes(column.type)) {
135
- this.$emit("click-row", row, rowIndex, event);
135
+ this.$emit("click-row", row, rowIndex, column, event);
136
136
  }
137
137
  },
138
138
  dblclick: (event) => {
@@ -80,8 +80,8 @@
80
80
  ...operationItem,
81
81
  ...(
82
82
  operationItem.operationFunc
83
- ? operationItem.operationFunc(operationItem, this.formData, undefined, this.operationList)
84
- : {}
83
+ ? operationItem.operationFunc(operationItem, this.formData, undefined, this.operationList)
84
+ : {}
85
85
  )
86
86
  };
87
87
  });
@@ -86,8 +86,8 @@
86
86
  style: {
87
87
  ...(
88
88
  (operationItem._name_ || operationItem.name).split("/").length > 1
89
- ? { width: `${getOperationItemMaxWidth(operationItem)}px` }
90
- : {}
89
+ ? { width: `${getOperationItemMaxWidth(operationItem)}px` }
90
+ : {}
91
91
  ),
92
92
  ...(
93
93
  typeof operationItem.style === "object"
@@ -173,8 +173,8 @@
173
173
  ...operationItem,
174
174
  ...(
175
175
  operationItem.operationFunc
176
- ? operationItem.operationFunc(operationItem, params.row, params.index, this.selfOperationList)
177
- : {}
176
+ ? operationItem.operationFunc(operationItem, params.row, params.index, this.selfOperationList)
177
+ : {}
178
178
  )
179
179
  };
180
180
  });
@@ -41,7 +41,7 @@ export default {
41
41
  /* --- 列字段 --- */
42
42
  showColumns () {
43
43
  return [
44
- ...this.$transformToColumns(this.showContentColumns),
44
+ ...this.groupColumns,
45
45
  ...(!this.isSearching && this.rowOperationList.length ? [this.selfOperationColumn] : [])
46
46
  ];
47
47
  },
@@ -68,7 +68,7 @@ export default {
68
68
  return [
69
69
  ...(this.useSelection === true ? [this.selectionColumn] : []),
70
70
  ...(this.useIndex === true ? [this.indexColumn] : []),
71
- ...this.$transformToColumns(this.showContentColumns),
71
+ ...this.groupColumns,
72
72
  ...(!this.isSearching && this.rowOperationList.length ? [this.operationColumn] : [])
73
73
  ];
74
74
  },
@@ -22,7 +22,7 @@ export default {
22
22
  return [
23
23
  this.expandColumn,
24
24
  ...(this.useIndex === true ? [this.indexColumn] : []),
25
- ...this.$transformToColumns(this.showContentColumns),
25
+ ...this.groupColumns,
26
26
  ...(!this.isSearching && this.rowOperationList.length ? [this.operationColumn] : [])
27
27
  ];
28
28
  },
@@ -32,6 +32,12 @@ export default {
32
32
  return {};
33
33
  }
34
34
  },
35
+ gpColumns: {
36
+ type: Array,
37
+ default () {
38
+ return [];
39
+ }
40
+ },
35
41
  columns: {
36
42
  type: Array,
37
43
  default () {
@@ -258,7 +264,7 @@ export default {
258
264
 
259
265
  _showRequired: true, // 表头显示校验符号*
260
266
  _showDescription: true, // 表头显示提示
261
- _contentHeight: 500, // 表格最大高度
267
+ _contentHeight: 800, // 表格最大高度
262
268
  _headHeightAuto: false, // 表头高度自适应
263
269
  _heightAuto: false, // 单元格高度自适应
264
270
  _useIndex: true, // 使用序号列
@@ -334,7 +340,7 @@ export default {
334
340
  contentHeight () {
335
341
  return this.selfPropsObj._contentHeight === undefined
336
342
  ? undefined
337
- : this.selfPropsObj._contentHeight || 500;
343
+ : this.selfPropsObj._contentHeight || 800;
338
344
  },
339
345
  showRequired () {
340
346
  return this.selfPropsObj._showRequired;
@@ -494,6 +500,53 @@ export default {
494
500
  : true
495
501
  );
496
502
  },
503
+ groupColumns () {
504
+ const loop = (gpCols = [], showContentCols = []) => {
505
+ return gpCols.reduce((newCols, gpCol) => [
506
+ ...newCols,
507
+ ...(
508
+ typeof gpCol === "string"
509
+ ? showContentCols.filter(colItem => colItem._key === gpCol)
510
+ : [
511
+ {
512
+ // title: gpCol._name,
513
+ field: gpCol._key,
514
+ key: gpCol._key,
515
+ align: gpCol._align || "center",
516
+ fixed: gpCol._fixed,
517
+ // width: gpCol._width,
518
+ ...this.$transformToColumns([gpCol], {
519
+ showRequired: this.showRequired,
520
+ showDescription: this.showDescription,
521
+ headHeightAuto: this.headHeightAuto
522
+ })[0],
523
+ ...(
524
+ // 循环子集
525
+ gpCol.children && gpCol.children.length
526
+ ? {
527
+ children: loop(gpCol.children, showContentCols)
528
+ }
529
+ : {}
530
+ )
531
+ }
532
+ ]
533
+ )
534
+ ], []);
535
+ };
536
+
537
+ const gpColumns = this.gpColumns;
538
+ const showContentColumns = this.$transformToColumns(this.showContentColumns);
539
+ return gpColumns.length
540
+ ? loop(gpColumns, showContentColumns)
541
+ : showContentColumns;
542
+ },
543
+ // 会被各个mixin里的showColumns覆盖,这里是摆设
544
+ showColumns () {
545
+ return [
546
+ ...this.groupColumns,
547
+ ...(!this.isSearching && this.rowOperationList.length ? [this.operationColumn] : [])
548
+ ];
549
+ },
497
550
  selectionColumn () {
498
551
  return {
499
552
  _key: "__selection__",
@@ -816,15 +869,12 @@ export default {
816
869
  // 共外部使用
817
870
  validate () {
818
871
  // this.showRuleMessage = true;
819
- // return this.allListData.every((row, rowIndex) => this.getRowRuleResult(row, rowIndex));
820
872
 
873
+ // 不用every方法,为的是把所有的行都走一遍,校验显现出来
821
874
  let bool = true;
822
875
  this.allListData.forEach((row, rowIndex) => {
823
876
  const resultBool = this.getRowRuleResult(row, rowIndex);
824
-
825
- if (resultBool === false) {
826
- bool = false;
827
- }
877
+ bool = bool && resultBool;
828
878
  });
829
879
 
830
880
  return bool;