bri-components 1.4.33 → 1.4.35

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.4.33",
3
+ "version": "1.4.35",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -235,13 +235,6 @@
235
235
  this.showModal = false;
236
236
  this.curVal = this.newVal;
237
237
  },
238
- // 点击删除
239
- clickClear () {
240
- this.curVal = {
241
- name: "",
242
- lnglat: []
243
- };
244
- },
245
238
  // 清除已选内容
246
239
  clickModalClear () {
247
240
  this.newVal = {
@@ -228,10 +228,6 @@ export default {
228
228
  },
229
229
  created () { },
230
230
  methods: {
231
- // 点击清除
232
- clickClear () {
233
- this.curValList = [];
234
- },
235
231
  confirmCb (selectedValue, selectedOptions) {
236
232
  this.curValList = selectedValue;
237
233
 
@@ -110,7 +110,7 @@ export default {
110
110
  multipleMode () {
111
111
  return this.isOnDftSearch || this.isOnSearch
112
112
  ? true
113
- : ["checkbox", "regions", "cascaders"].includes(this.controlType)
113
+ : ["checkbox", "regions", "cascaders", "labels", "refCheckbox"].includes(this.controlType)
114
114
  ? true
115
115
  : !!this.selfPropsObj && !!this.selfPropsObj._multiple;
116
116
  },
@@ -122,7 +122,7 @@ export default {
122
122
  },
123
123
  // 是否为tag显示
124
124
  isTagShow () {
125
- return ["users", "departments", "select", "checkbox", "regions", "cascaders", "switch", "labels", "refSelect"].includes(this.controlType);
125
+ return ["switch", "select", "checkbox", "regions", "cascaders", "users", "departments", "labels", "refSelect", "refCheckbox"].includes(this.controlType);
126
126
  },
127
127
 
128
128
  /* ----- 表单相关 ----- */
@@ -325,6 +325,21 @@ export default {
325
325
  this.openModal();
326
326
  }
327
327
  },
328
+ // 点击清除
329
+ clickClear () {
330
+ if (this.controlType === "coordinates") {
331
+ this.curVal = {
332
+ name: "",
333
+ lnglat: []
334
+ };
335
+ }
336
+ else if (this.typeInfoData.dataType === "array" || this.multipleMode) {
337
+ this.curValList = [];
338
+ } else {
339
+ this.curVal = "";
340
+ }
341
+ },
342
+
328
343
  /* ----- 工具方法 ------- */
329
344
  // 切换弹框
330
345
  toggleModal (bool) {
@@ -121,10 +121,6 @@ export default {
121
121
  this.getListData();
122
122
  },
123
123
 
124
- // 点击清除
125
- clickClear () {
126
- this.curVal = "";
127
- },
128
124
  // 单选模式 点击选项
129
125
  clickRadioItem (item, index) {
130
126
  if (!this.getRadioItemDisabled(item)) {
@@ -110,20 +110,10 @@ export default {
110
110
  },
111
111
  created () { },
112
112
  methods: {
113
- // 点击输入框 打开选择模态框
114
- clickInput () {
115
- if (!this.disabled) {
116
- this.openModal();
117
- }
118
- },
119
113
  // 点击删除某项
120
114
  clickDeleteItem (selectItem) {
121
115
  this.curValList = this.curValList.filter(item => item._key !== selectItem._key);
122
116
  },
123
- // 点击清除选择项
124
- clickClear () {
125
- this.curValList = [];
126
- },
127
117
  clickItem (item, index) {
128
118
  this.itemTipRender = this.getItemTipRender(item, index);
129
119
  },
@@ -211,10 +211,6 @@
211
211
  clickDeleteItem (deleteItem) {
212
212
  this.curValList = this.curValList.filter(item => item._key !== deleteItem._key);
213
213
  },
214
- // 点击清除选择项
215
- clickClear () {
216
- this.curValList = [];
217
- },
218
214
 
219
215
  // 接口 -获取列表数据
220
216
  getListData () {
@@ -408,6 +408,7 @@
408
408
  return arr.reduce((totalList, item) => {
409
409
  return [
410
410
  ...totalList,
411
+ item,
411
412
  ...loop(item.children)
412
413
  ];
413
414
  }, []);
@@ -418,11 +419,7 @@
418
419
  userShowList () {
419
420
  // 有部门过滤就只显示对应的部门,无过滤就涌全部用户(包含无部门用户)
420
421
  let list = this.filterVals.length || this.cascaderVals.length
421
- ? this.userList.filter(item =>
422
- this.reverseFilter
423
- ? !this.allDepartShowKeys.includes(item.departmentKey)
424
- : this.allDepartShowKeys.includes(item.departmentKey)
425
- )
422
+ ? this.userList.filter(item => this.allDepartShowKeys.includes(item.departmentKey))
426
423
  : this.userList;
427
424
 
428
425
  list = this.curDepart._key === "_highSearch"
@@ -1135,7 +1135,7 @@ export default {
1135
1135
  e.stopPropagation();
1136
1136
  }
1137
1137
  }
1138
- });
1138
+ });
1139
1139
  },
1140
1140
  topSearchRender (h) {
1141
1141
  return this.searchFormList.length
@@ -1425,7 +1425,7 @@ export default {
1425
1425
  getRowDelBtnCanEdit (row, rowIndex) {
1426
1426
  return row.__readonly__ !== true && // 不能为只读数据
1427
1427
  (this.disabledDeleteDftRow ? row.__isDefault__ !== true : true) && // 默认数据可删除
1428
- (this.disabledDeleteOldRow ? row.__old__ !== true : true); // 老数据可删除
1428
+ (this.disabledDeleteOldRow ? row.__old__ !== true : true); // 老数据可删除
1429
1429
  },
1430
1430
  // 行内容是否可编辑
1431
1431
  getRowCanEdit (row, rowIndex) {