cloud-web-corejs 1.0.54-dev.682 → 1.0.54-dev.684
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
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
v-if="index > 0"
|
|
56
56
|
:key="'sep-' + index"
|
|
57
57
|
class="base-area-path-sep"
|
|
58
|
-
|
|
58
|
+
>/</span
|
|
59
|
+
>
|
|
59
60
|
<span
|
|
60
61
|
:key="'tab-' + index"
|
|
61
62
|
class="base-area-tab"
|
|
@@ -65,7 +66,8 @@
|
|
|
65
66
|
disabled: !isTabEnabled(index + 1),
|
|
66
67
|
}"
|
|
67
68
|
@click="switchLevel(index + 1)"
|
|
68
|
-
|
|
69
|
+
>{{ getTabLabel(tab) }}</span
|
|
70
|
+
>
|
|
69
71
|
</template>
|
|
70
72
|
</div>
|
|
71
73
|
</div>
|
|
@@ -80,7 +82,10 @@
|
|
|
80
82
|
>
|
|
81
83
|
<span>{{ item.name }}</span>
|
|
82
84
|
</div>
|
|
83
|
-
<div
|
|
85
|
+
<div
|
|
86
|
+
v-if="!browseLoading && !levelItems.length"
|
|
87
|
+
class="base-area-empty"
|
|
88
|
+
>
|
|
84
89
|
{{ emptyText }}
|
|
85
90
|
</div>
|
|
86
91
|
</div>
|
|
@@ -248,10 +253,7 @@ export default {
|
|
|
248
253
|
},
|
|
249
254
|
showClearIcon() {
|
|
250
255
|
return (
|
|
251
|
-
this.clearable &&
|
|
252
|
-
!this.readonly &&
|
|
253
|
-
!this.disabled &&
|
|
254
|
-
!!this.displayText
|
|
256
|
+
this.clearable && !this.readonly && !this.disabled && !!this.displayText
|
|
255
257
|
);
|
|
256
258
|
},
|
|
257
259
|
canPrevLevel() {
|
|
@@ -316,7 +318,10 @@ export default {
|
|
|
316
318
|
}
|
|
317
319
|
const str = String(val).trim();
|
|
318
320
|
if (this.isLegacyPathValue(str)) {
|
|
319
|
-
const parts = str
|
|
321
|
+
const parts = str
|
|
322
|
+
.split(",")
|
|
323
|
+
.map((part) => part.trim())
|
|
324
|
+
.filter(Boolean);
|
|
320
325
|
return parts.length ? parts[parts.length - 1] : null;
|
|
321
326
|
}
|
|
322
327
|
return str;
|
|
@@ -620,10 +625,7 @@ export default {
|
|
|
620
625
|
if (token !== this.syncToken || this.hasDisplayLabel()) {
|
|
621
626
|
return;
|
|
622
627
|
}
|
|
623
|
-
const label =
|
|
624
|
-
(area && area.fullName) ||
|
|
625
|
-
(area && area.name) ||
|
|
626
|
-
null;
|
|
628
|
+
const label = (area && area.fullName) || (area && area.name) || null;
|
|
627
629
|
if (label) {
|
|
628
630
|
this.$emit("update:labelValue", label);
|
|
629
631
|
}
|
|
@@ -685,7 +687,7 @@ export default {
|
|
|
685
687
|
requestAreaList(extra = {}) {
|
|
686
688
|
return new Promise((resolve) => {
|
|
687
689
|
this.$http({
|
|
688
|
-
url: USER_PREFIX + "/area/
|
|
690
|
+
url: USER_PREFIX + "/area/listPage",
|
|
689
691
|
method: "post",
|
|
690
692
|
data: this.getAreaRequestData(extra),
|
|
691
693
|
success: (res) => resolve(this.normalizeAreaRows(res)),
|
|
@@ -744,12 +746,20 @@ export default {
|
|
|
744
746
|
},
|
|
745
747
|
buildAreaPath(item, depthLimit) {
|
|
746
748
|
const limit = depthLimit == null ? this.maxLevel : depthLimit;
|
|
747
|
-
if (
|
|
749
|
+
if (
|
|
750
|
+
item.pathList &&
|
|
751
|
+
Array.isArray(item.pathList) &&
|
|
752
|
+
item.pathList.length > 1
|
|
753
|
+
) {
|
|
748
754
|
if (this.isAreaObject(item.pathList[0])) {
|
|
749
755
|
return item.pathList.slice(0, limit);
|
|
750
756
|
}
|
|
751
757
|
}
|
|
752
|
-
if (
|
|
758
|
+
if (
|
|
759
|
+
item.areaPath &&
|
|
760
|
+
Array.isArray(item.areaPath) &&
|
|
761
|
+
item.areaPath.length > 1
|
|
762
|
+
) {
|
|
753
763
|
if (this.isAreaObject(item.areaPath[0])) {
|
|
754
764
|
return item.areaPath.slice(0, limit);
|
|
755
765
|
}
|
|
@@ -980,7 +990,10 @@ export default {
|
|
|
980
990
|
},
|
|
981
991
|
async syncBrowseStateFromPathIds(ids) {
|
|
982
992
|
const token = ++this.syncToken;
|
|
983
|
-
const depthLimit = Math.min(
|
|
993
|
+
const depthLimit = Math.min(
|
|
994
|
+
Math.max(ids.length, this.maxLevel, 1),
|
|
995
|
+
MAX_AREA_DEPTH
|
|
996
|
+
);
|
|
984
997
|
const path = await this.resolvePathByIds(ids, depthLimit);
|
|
985
998
|
if (token !== this.syncToken) {
|
|
986
999
|
return;
|
|
@@ -1022,7 +1035,7 @@ export default {
|
|
|
1022
1035
|
},
|
|
1023
1036
|
doSearch(keyword) {
|
|
1024
1037
|
this.searchLoading = true;
|
|
1025
|
-
this.requestAreaList({
|
|
1038
|
+
this.requestAreaList({ fullName: keyword, size: 20 }).then((rows) => {
|
|
1026
1039
|
this.searchList = rows;
|
|
1027
1040
|
this.searchLoading = false;
|
|
1028
1041
|
});
|