bri-components 1.3.6 → 1.3.7

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.3.6",
3
+ "version": "1.3.7",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -13,7 +13,6 @@
13
13
  @confirm="confirmCb"
14
14
  >
15
15
  <dsh-control-input
16
- v-if="!['simple'].includes(showType)"
17
16
  :class="commonClass"
18
17
  :value="curValName"
19
18
  :disabled="inputPropsObj._disabled"
@@ -116,16 +116,20 @@ export default {
116
116
  return loop(this.originData, this.cascaderLevel, undefined, this.cascaderFilterVals, this.isMobile);
117
117
  },
118
118
  cascaderData () {
119
- const loop = (arr = []) => {
119
+ const loop = (arr = [], isMobile) => {
120
120
  return arr
121
121
  ? arr.reduce((arr, item) => {
122
122
  if (item.rm !== 1) {
123
- if (item.children && item.children.length) {
124
- item.children = loop(item.children);
123
+ let newItem = {
124
+ ...item
125
+ };
126
+
127
+ if (newItem.children && newItem.children.length) {
128
+ newItem.children = loop(newItem.children, isMobile);
125
129
  } else {
126
- item.children = this.isMobile ? undefined : [];
130
+ newItem.children = isMobile ? undefined : [];
127
131
  }
128
- arr.push(item);
132
+ arr.push(newItem);
129
133
  }
130
134
 
131
135
  return arr;
@@ -133,7 +137,7 @@ export default {
133
137
  : [];
134
138
  };
135
139
 
136
- return loop(this.cascaderAllData);
140
+ return loop(this.cascaderAllData, this.isMobile);
137
141
  },
138
142
 
139
143
  curValObj () {
@@ -170,7 +170,7 @@
170
170
  "users", "departments", "labels", "flatTable", "reference", "referenceBy"
171
171
  ],
172
172
  ignoreProperties: [
173
- "_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable", "",
173
+ "_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable",
174
174
  "_disabledBtns", "_disabledOldDataRow"
175
175
  ],
176
176
  subIgnoreProperties: [
@@ -305,7 +305,7 @@
305
305
  Object.entries({
306
306
  ...formData,
307
307
  _displayType: "show",
308
- canEdit: true
308
+ canEdit: !["createdAt", "updatedAt", "_creaters"].includes(formData._key)
309
309
  }).forEach(arr => {
310
310
  !this.ignoreProperties.includes(arr[0]) && (formData.__parentKey__ ? !this.subIgnoreProperties.includes(arr[0]) : true) &&
311
311
  this.$set(formItem, arr[0], arr[1]);