@a2simcode/ui 0.0.273 → 0.0.274
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/dist/components/tree-select/index.d.ts +3 -0
- package/dist/components/tree-select/src/tree-select.vue.d.ts +5 -0
- package/dist/simcode-ui.es.js +13 -1
- package/dist/simcode-ui.umd.js +1 -1
- package/dist/stats.html +1 -1
- package/docs/components/meta/tree-select.ts +220 -199
- package/docs/components/tree-select.md +13 -0
- package/docs/examples/tree-select/lazy.vue +42 -0
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ declare const JTreeSelect: {
|
|
|
16
16
|
clearable: boolean;
|
|
17
17
|
readonly: boolean;
|
|
18
18
|
checkStrictly: boolean;
|
|
19
|
+
lazy: boolean;
|
|
19
20
|
dataCode: string;
|
|
20
21
|
idKey: string;
|
|
21
22
|
renderAfterExpand: boolean;
|
|
@@ -41,6 +42,7 @@ declare const JTreeSelect: {
|
|
|
41
42
|
clearable: boolean;
|
|
42
43
|
readonly: boolean;
|
|
43
44
|
checkStrictly: boolean;
|
|
45
|
+
lazy: boolean;
|
|
44
46
|
dataCode: string;
|
|
45
47
|
idKey: string;
|
|
46
48
|
renderAfterExpand: boolean;
|
|
@@ -66,6 +68,7 @@ declare const JTreeSelect: {
|
|
|
66
68
|
clearable: boolean;
|
|
67
69
|
readonly: boolean;
|
|
68
70
|
checkStrictly: boolean;
|
|
71
|
+
lazy: boolean;
|
|
69
72
|
dataCode: string;
|
|
70
73
|
idKey: string;
|
|
71
74
|
renderAfterExpand: boolean;
|
|
@@ -3,6 +3,10 @@ export interface TreeSelectProps {
|
|
|
3
3
|
modelValue: string | number | (string | number)[] | undefined;
|
|
4
4
|
/** 树形数据选项列表 */
|
|
5
5
|
options?: Record<string, any>[];
|
|
6
|
+
/** 是否懒加载子节点数据,配合 load 方法使用 */
|
|
7
|
+
lazy?: boolean;
|
|
8
|
+
/** 加载子树数据的方法,仅当 lazy 为 true 时生效 */
|
|
9
|
+
load?: (node: Record<string, any>, resolve: (data: Record<string, any>[]) => void) => void;
|
|
6
10
|
/** 在点击节点时,是否只关注本级节点而不关注父子节点的关系 */
|
|
7
11
|
checkStrictly?: boolean;
|
|
8
12
|
/** 是否在第一次展开时才进行渲染 */
|
|
@@ -49,6 +53,7 @@ declare const _default: import('vue').DefineComponent<TreeSelectProps, {}, {}, {
|
|
|
49
53
|
clearable: boolean;
|
|
50
54
|
readonly: boolean;
|
|
51
55
|
checkStrictly: boolean;
|
|
56
|
+
lazy: boolean;
|
|
52
57
|
dataCode: string;
|
|
53
58
|
idKey: string;
|
|
54
59
|
renderAfterExpand: boolean;
|
package/dist/simcode-ui.es.js
CHANGED
|
@@ -13662,6 +13662,11 @@ var Xp = /* @__PURE__ */ xe({
|
|
|
13662
13662
|
props: {
|
|
13663
13663
|
modelValue: {},
|
|
13664
13664
|
options: {},
|
|
13665
|
+
lazy: {
|
|
13666
|
+
type: Boolean,
|
|
13667
|
+
default: !1
|
|
13668
|
+
},
|
|
13669
|
+
load: {},
|
|
13665
13670
|
checkStrictly: {
|
|
13666
13671
|
type: Boolean,
|
|
13667
13672
|
default: !0
|
|
@@ -13701,7 +13706,10 @@ var Xp = /* @__PURE__ */ xe({
|
|
|
13701
13706
|
const n = e, { useData: a } = kt(), { getDataByComp: o } = a(), i = H(() => o ? o({
|
|
13702
13707
|
type: "j-tree-select",
|
|
13703
13708
|
config: n
|
|
13704
|
-
}) || [] : []), r = H(() =>
|
|
13709
|
+
}) || [] : []), r = H(() => {
|
|
13710
|
+
if (!(n.lazy && n.load))
|
|
13711
|
+
return n.options ? n.options : n.dataCode || n.dataType ? i.value : [];
|
|
13712
|
+
}), l = t, c = H({
|
|
13705
13713
|
get() {
|
|
13706
13714
|
return n.modelValue;
|
|
13707
13715
|
},
|
|
@@ -13718,6 +13726,8 @@ var Xp = /* @__PURE__ */ xe({
|
|
|
13718
13726
|
"onUpdate:modelValue": f[0] || (f[0] = (h) => c.value = h),
|
|
13719
13727
|
style: { width: "100%" },
|
|
13720
13728
|
data: r.value,
|
|
13729
|
+
lazy: e.lazy,
|
|
13730
|
+
load: e.load,
|
|
13721
13731
|
"check-strictly": e.checkStrictly,
|
|
13722
13732
|
"render-after-expand": e.renderAfterExpand,
|
|
13723
13733
|
props: n,
|
|
@@ -13729,6 +13739,8 @@ var Xp = /* @__PURE__ */ xe({
|
|
|
13729
13739
|
}, null, 8, [
|
|
13730
13740
|
"modelValue",
|
|
13731
13741
|
"data",
|
|
13742
|
+
"lazy",
|
|
13743
|
+
"load",
|
|
13732
13744
|
"check-strictly",
|
|
13733
13745
|
"render-after-expand",
|
|
13734
13746
|
"size",
|