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
|
@@ -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
|
-
|
|
124
|
-
item
|
|
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
|
-
|
|
130
|
+
newItem.children = isMobile ? undefined : [];
|
|
127
131
|
}
|
|
128
|
-
arr.push(
|
|
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:
|
|
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]);
|