zzz-pc-view 0.0.57 → 0.0.59
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
|
@@ -44,7 +44,7 @@ export interface Param<T extends TypeWithPrototype = TypeWithPrototype> {
|
|
|
44
44
|
api: ApiList<T>;
|
|
45
45
|
query?: any;
|
|
46
46
|
global?: boolean;
|
|
47
|
-
childrenKey?: KeyMatch<CombineInstanceType<T>, undefined | CombineInstanceType<T>[]>;
|
|
47
|
+
childrenKey?: KeyMatch<CombineInstanceType<T>, undefined | null | CombineInstanceType<T>[]>;
|
|
48
48
|
onLoaded?: (list: CombineInstanceType<T>[]) => CombineInstanceType<T>[];
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -61,7 +61,7 @@ declare class LoaderConfig<T extends TypeWithPrototype = TypeWithPrototype> impl
|
|
|
61
61
|
api: ApiList<T>;
|
|
62
62
|
query: any;
|
|
63
63
|
global: boolean;
|
|
64
|
-
childrenKey?: KeyMatch<CombineInstanceType<T>, undefined | CombineInstanceType<T>[]>;
|
|
64
|
+
childrenKey?: KeyMatch<CombineInstanceType<T>, undefined | null | CombineInstanceType<T>[]>;
|
|
65
65
|
onLoaded?: (list: CombineInstanceType<T>[]) => CombineInstanceType<T>[];
|
|
66
66
|
/**
|
|
67
67
|
* 构造函数
|
package/src/index.es.js
CHANGED
|
@@ -3080,15 +3080,16 @@ const setList = (config, list2) => {
|
|
|
3080
3080
|
if (typeof onLoaded === "function") {
|
|
3081
3081
|
list2 = onLoaded(list2);
|
|
3082
3082
|
}
|
|
3083
|
-
|
|
3083
|
+
const { target } = config;
|
|
3084
|
+
if (list2.length > 0 && !(list2[0] instanceof target)) {
|
|
3084
3085
|
const { childrenKey } = config;
|
|
3085
3086
|
if (childrenKey) {
|
|
3086
|
-
|
|
3087
|
+
target.bindList(toFlat(list2, childrenKey));
|
|
3087
3088
|
} else {
|
|
3088
|
-
list2 =
|
|
3089
|
+
list2 = target.bindList(list2);
|
|
3089
3090
|
}
|
|
3090
3091
|
}
|
|
3091
|
-
|
|
3092
|
+
target[storeKey].listRef.value = list2;
|
|
3092
3093
|
return list2;
|
|
3093
3094
|
};
|
|
3094
3095
|
const loadGlobal = async () => {
|
|
@@ -11111,13 +11112,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11111
11112
|
createVNode(_component_el_button, {
|
|
11112
11113
|
disabled: _ctx.viewHandler.saveEditorDataLoadStatus,
|
|
11113
11114
|
icon: "Close",
|
|
11115
|
+
size: _ctx.size,
|
|
11114
11116
|
onClick: _ctx.viewHandler.onCloseEditorBtnClick
|
|
11115
11117
|
}, {
|
|
11116
11118
|
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
11117
11119
|
createTextVNode("关闭")
|
|
11118
11120
|
])),
|
|
11119
11121
|
_: 1
|
|
11120
|
-
}, 8, ["disabled", "onClick"])
|
|
11122
|
+
}, 8, ["disabled", "size", "onClick"])
|
|
11121
11123
|
]);
|
|
11122
11124
|
};
|
|
11123
11125
|
}
|