bri-components 1.5.6 → 1.5.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -33,7 +33,7 @@ export default {
33
33
  ...this.propsObj,
34
34
  ...this.commonDealPropsObj,
35
35
 
36
- _changeOnSelect: this.isInSearch
36
+ _changeOnSelect: this.isInAnySearch
37
37
  ? true
38
38
  : this.propsObj._changeOnSelect == undefined ? false : this.propsObj._changeOnSelect, // 每级菜单都可取值 -默认取末级
39
39
  _joinSymbol: _joinSymbol // 级联拼接符
@@ -114,7 +114,7 @@ export default {
114
114
  _clearable: this.finalCanEdit && !this.propsObj._disabled && !this.propsObj._readonly && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable),
115
115
  _disabled: !(this.finalCanEdit && !this.propsObj._disabled && !this.propsObj._readonly),
116
116
  // 目前部门、用户在用,以后还会增多
117
- _useDeleteTip: this.isInDftSearch || this.isInSearch
117
+ _useDeleteTip: this.isInAnySearch
118
118
  ? false
119
119
  : this.propsObj._useDeleteTip == undefined
120
120
  ? false
@@ -123,7 +123,7 @@ export default {
123
123
  },
124
124
  // 是否为多选模式
125
125
  multipleMode () {
126
- return this.isInDftSearch || this.isInSearch
126
+ return this.isInAnySearch
127
127
  ? true
128
128
  : ["numberange", "daterange", "checkbox", "regions", "cascaders", "labels", "refCheckbox"].includes(this.controlType)
129
129
  ? true
@@ -139,6 +139,12 @@ export default {
139
139
  isTagShow () {
140
140
  return ["switch", "select", "checkbox", "regions", "cascaders", "users", "departments", "labels", "refSelect", "refCheckbox"].includes(this.controlType);
141
141
  },
142
+ // 点击行或单元格查看详细内容 -"flatTable", "cascaderTable", "reference", "referenceBy"在用
143
+ showDetailOnCR () {
144
+ return !!this.selfPropsObj && [true, false].includes(this.selfPropsObj._showDetailOnCR)
145
+ ? this.selfPropsObj._showDetailOnCR
146
+ : true;
147
+ },
142
148
 
143
149
  /* ----- 表单相关 ----- */
144
150
  clearable () {
@@ -188,14 +194,18 @@ export default {
188
194
  isInRefDetail () {
189
195
  return !!this.propsObj.inRefDetail;
190
196
  },
191
- // 高级搜索状态
197
+ // 在高级搜索下
192
198
  isInSearch () {
193
199
  return !!this.propsObj.inSearch;
194
200
  },
195
- // 默认搜索状态
201
+ // 在默认搜索下
196
202
  isInDftSearch () {
197
203
  return !!this.propsObj.inDftSearch;
198
204
  },
205
+ // 在任何搜索下
206
+ isInAnySearch () {
207
+ return this.isInDftSearch || this.isInSearch;
208
+ },
199
209
  isUnitUpdate () {
200
210
  return this.isInTable && !!this.canEdit;
201
211
  },
@@ -364,8 +374,10 @@ export default {
364
374
 
365
375
  // 单元格展示 -打开列表模态框
366
376
  openUnitModal (event) {
367
- this.showUnitModal = true;
368
- event.stopPropagation();
377
+ if (this.showDetailOnCR) {
378
+ this.showUnitModal = true;
379
+ event.stopPropagation();
380
+ }
369
381
  }
370
382
  }
371
383
  };
@@ -37,7 +37,7 @@ export default {
37
37
  return this.selfPropsObj._dateType;
38
38
  },
39
39
  useDynDate () {
40
- return this.isInSearch
40
+ return this.isInAnySearch
41
41
  ? true
42
42
  : this.selfPropsObj._useDynDate;
43
43
  },
@@ -45,7 +45,7 @@ export default {
45
45
  return this.selfPropsObj._dynDateType;
46
46
  },
47
47
  dynDateKeys () {
48
- return this.isInSearch
48
+ return this.isInAnySearch
49
49
  ? this.selfPropsObj._dynSearchKeys
50
50
  : this.selfPropsObj._dynDateKeys;
51
51
  },
@@ -65,7 +65,7 @@ export default {
65
65
  },
66
66
 
67
67
  highSearch () {
68
- return this.isInSearch ? true : this.selfPropsObj._highSearch;
68
+ return this.isInAnySearch ? true : this.selfPropsObj._highSearch;
69
69
  },
70
70
  searchString () {
71
71
  return this.selfPropsObj._searchString;
@@ -169,7 +169,7 @@
169
169
  return this.selfPropsObj._labelType;
170
170
  },
171
171
  onlySelect () {
172
- return this.isInSearch ? true : this.selfPropsObj._onlySelect;
172
+ return this.isInAnySearch ? true : this.selfPropsObj._onlySelect;
173
173
  },
174
174
  originLabels () {
175
175
  return this.selfPropsObj._originLabels;
@@ -4,7 +4,7 @@
4
4
  <template v-if="isUnitShow">
5
5
  <span
6
6
  class="cascaderTable-unit"
7
- @click.stop="openUnitModal"
7
+ @click="openUnitModal"
8
8
  >
9
9
  <dsh-icons :list="[{
10
10
  customIcon: 'bico-Cascadetable'
@@ -4,7 +4,7 @@
4
4
  <template v-if="isUnitShow">
5
5
  <span
6
6
  class="flatTable-unit"
7
- @click.stop="openUnitModal"
7
+ @click="openUnitModal"
8
8
  >
9
9
  <dsh-icons :list="[{
10
10
  customIcon: 'bico-internaltable'
@@ -168,7 +168,9 @@
168
168
  getFormItem (formItem) {
169
169
  return {
170
170
  ...this.formatFormItem(formItem),
171
+ inSearch: false,
171
172
  inDftSearch: true,
173
+
172
174
  _line: true,
173
175
  _useColor: false,
174
176
  _optionKind: "dropdown"