@deot/vc 1.0.39 → 1.0.41
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/index.d.ts +72 -56
- package/dist/index.iife.js +171 -133
- package/dist/index.umd.cjs +171 -133
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -568,6 +568,8 @@ export declare const Components: {
|
|
|
568
568
|
type: BooleanConstructor;
|
|
569
569
|
default: boolean;
|
|
570
570
|
};
|
|
571
|
+
renderOption: Render;
|
|
572
|
+
renderOptionGroup: Render;
|
|
571
573
|
searchPlaceholder: {
|
|
572
574
|
type: StringConstructor;
|
|
573
575
|
default: string;
|
|
@@ -651,6 +653,8 @@ export declare const Components: {
|
|
|
651
653
|
type: BooleanConstructor;
|
|
652
654
|
default: boolean;
|
|
653
655
|
};
|
|
656
|
+
renderOption: Render;
|
|
657
|
+
renderOptionGroup: Render;
|
|
654
658
|
searchPlaceholder: {
|
|
655
659
|
type: StringConstructor;
|
|
656
660
|
default: string;
|
|
@@ -760,6 +764,8 @@ export declare const Components: {
|
|
|
760
764
|
type: BooleanConstructor;
|
|
761
765
|
default: boolean;
|
|
762
766
|
};
|
|
767
|
+
renderOption: Render;
|
|
768
|
+
renderOptionGroup: Render;
|
|
763
769
|
searchPlaceholder: {
|
|
764
770
|
type: StringConstructor;
|
|
765
771
|
default: string;
|
|
@@ -843,6 +849,8 @@ export declare const Components: {
|
|
|
843
849
|
type: BooleanConstructor;
|
|
844
850
|
default: boolean;
|
|
845
851
|
};
|
|
852
|
+
renderOption: Render;
|
|
853
|
+
renderOptionGroup: Render;
|
|
846
854
|
searchPlaceholder: {
|
|
847
855
|
type: StringConstructor;
|
|
848
856
|
default: string;
|
|
@@ -8366,6 +8374,8 @@ export declare const Components: {
|
|
|
8366
8374
|
showBar: boolean;
|
|
8367
8375
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
8368
8376
|
Select: DefineComponent<ExtractPropTypes< {
|
|
8377
|
+
renderOption: Render;
|
|
8378
|
+
renderOptionGroup: Render;
|
|
8369
8379
|
data: {
|
|
8370
8380
|
type: ArrayConstructor;
|
|
8371
8381
|
default: () => never[];
|
|
@@ -8441,6 +8451,8 @@ export declare const Components: {
|
|
|
8441
8451
|
};
|
|
8442
8452
|
portalClass: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
|
|
8443
8453
|
}>, () => JSX_2.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("clear" | "change" | "close" | "update:modelValue" | "visible-change" | "ready")[], "clear" | "change" | "close" | "update:modelValue" | "visible-change" | "ready", PublicProps, Readonly<ExtractPropTypes< {
|
|
8454
|
+
renderOption: Render;
|
|
8455
|
+
renderOptionGroup: Render;
|
|
8444
8456
|
data: {
|
|
8445
8457
|
type: ArrayConstructor;
|
|
8446
8458
|
default: () => never[];
|
|
@@ -8541,6 +8553,8 @@ export declare const Components: {
|
|
|
8541
8553
|
searchable: boolean;
|
|
8542
8554
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
8543
8555
|
MSelect: DefineComponent<ExtractPropTypes< {
|
|
8556
|
+
renderOption: Render;
|
|
8557
|
+
renderOptionGroup: Render;
|
|
8544
8558
|
data: {
|
|
8545
8559
|
type: ArrayConstructor;
|
|
8546
8560
|
default: () => never[];
|
|
@@ -8616,6 +8630,8 @@ export declare const Components: {
|
|
|
8616
8630
|
};
|
|
8617
8631
|
portalClass: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
|
|
8618
8632
|
}>, () => JSX_2.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("clear" | "change" | "close" | "update:modelValue" | "visible-change" | "ready")[], "clear" | "change" | "close" | "update:modelValue" | "visible-change" | "ready", PublicProps, Readonly<ExtractPropTypes< {
|
|
8633
|
+
renderOption: Render;
|
|
8634
|
+
renderOptionGroup: Render;
|
|
8619
8635
|
data: {
|
|
8620
8636
|
type: ArrayConstructor;
|
|
8621
8637
|
default: () => never[];
|
|
@@ -11681,10 +11697,6 @@ export declare const Components: {
|
|
|
11681
11697
|
type: StringConstructor;
|
|
11682
11698
|
default: string;
|
|
11683
11699
|
};
|
|
11684
|
-
renderAfterExpand: {
|
|
11685
|
-
type: BooleanConstructor;
|
|
11686
|
-
default: boolean;
|
|
11687
|
-
};
|
|
11688
11700
|
checkStrictly: {
|
|
11689
11701
|
type: BooleanConstructor;
|
|
11690
11702
|
default: boolean;
|
|
@@ -11709,11 +11721,6 @@ export declare const Components: {
|
|
|
11709
11721
|
default: () => never[];
|
|
11710
11722
|
};
|
|
11711
11723
|
currentNodeValue: (StringConstructor | NumberConstructor)[];
|
|
11712
|
-
render: PropType<Props["render"]>;
|
|
11713
|
-
showCheckbox: {
|
|
11714
|
-
type: BooleanConstructor;
|
|
11715
|
-
default: boolean;
|
|
11716
|
-
};
|
|
11717
11724
|
draggable: {
|
|
11718
11725
|
type: BooleanConstructor;
|
|
11719
11726
|
default: boolean;
|
|
@@ -11727,10 +11734,6 @@ export declare const Components: {
|
|
|
11727
11734
|
highlightCurrent: BooleanConstructor;
|
|
11728
11735
|
loadData: FunctionConstructor;
|
|
11729
11736
|
filterNode: FunctionConstructor;
|
|
11730
|
-
accordion: {
|
|
11731
|
-
type: BooleanConstructor;
|
|
11732
|
-
default: boolean;
|
|
11733
|
-
};
|
|
11734
11737
|
indent: {
|
|
11735
11738
|
type: NumberConstructor;
|
|
11736
11739
|
default: number;
|
|
@@ -11750,6 +11753,19 @@ export declare const Components: {
|
|
|
11750
11753
|
type: BooleanConstructor;
|
|
11751
11754
|
default: boolean;
|
|
11752
11755
|
};
|
|
11756
|
+
accordion: {
|
|
11757
|
+
type: BooleanConstructor;
|
|
11758
|
+
default: boolean;
|
|
11759
|
+
};
|
|
11760
|
+
renderNodeLabel: Render;
|
|
11761
|
+
renderNodeAfterExpand: {
|
|
11762
|
+
type: BooleanConstructor;
|
|
11763
|
+
default: boolean;
|
|
11764
|
+
};
|
|
11765
|
+
showCheckbox: {
|
|
11766
|
+
type: BooleanConstructor;
|
|
11767
|
+
default: boolean;
|
|
11768
|
+
};
|
|
11753
11769
|
numerable: {
|
|
11754
11770
|
type: BooleanConstructor;
|
|
11755
11771
|
default: boolean;
|
|
@@ -11776,10 +11792,6 @@ export declare const Components: {
|
|
|
11776
11792
|
type: StringConstructor;
|
|
11777
11793
|
default: string;
|
|
11778
11794
|
};
|
|
11779
|
-
renderAfterExpand: {
|
|
11780
|
-
type: BooleanConstructor;
|
|
11781
|
-
default: boolean;
|
|
11782
|
-
};
|
|
11783
11795
|
checkStrictly: {
|
|
11784
11796
|
type: BooleanConstructor;
|
|
11785
11797
|
default: boolean;
|
|
@@ -11804,11 +11816,6 @@ export declare const Components: {
|
|
|
11804
11816
|
default: () => never[];
|
|
11805
11817
|
};
|
|
11806
11818
|
currentNodeValue: (StringConstructor | NumberConstructor)[];
|
|
11807
|
-
render: PropType<Props["render"]>;
|
|
11808
|
-
showCheckbox: {
|
|
11809
|
-
type: BooleanConstructor;
|
|
11810
|
-
default: boolean;
|
|
11811
|
-
};
|
|
11812
11819
|
draggable: {
|
|
11813
11820
|
type: BooleanConstructor;
|
|
11814
11821
|
default: boolean;
|
|
@@ -11822,10 +11829,6 @@ export declare const Components: {
|
|
|
11822
11829
|
highlightCurrent: BooleanConstructor;
|
|
11823
11830
|
loadData: FunctionConstructor;
|
|
11824
11831
|
filterNode: FunctionConstructor;
|
|
11825
|
-
accordion: {
|
|
11826
|
-
type: BooleanConstructor;
|
|
11827
|
-
default: boolean;
|
|
11828
|
-
};
|
|
11829
11832
|
indent: {
|
|
11830
11833
|
type: NumberConstructor;
|
|
11831
11834
|
default: number;
|
|
@@ -11845,6 +11848,19 @@ export declare const Components: {
|
|
|
11845
11848
|
type: BooleanConstructor;
|
|
11846
11849
|
default: boolean;
|
|
11847
11850
|
};
|
|
11851
|
+
accordion: {
|
|
11852
|
+
type: BooleanConstructor;
|
|
11853
|
+
default: boolean;
|
|
11854
|
+
};
|
|
11855
|
+
renderNodeLabel: Render;
|
|
11856
|
+
renderNodeAfterExpand: {
|
|
11857
|
+
type: BooleanConstructor;
|
|
11858
|
+
default: boolean;
|
|
11859
|
+
};
|
|
11860
|
+
showCheckbox: {
|
|
11861
|
+
type: BooleanConstructor;
|
|
11862
|
+
default: boolean;
|
|
11863
|
+
};
|
|
11848
11864
|
numerable: {
|
|
11849
11865
|
type: BooleanConstructor;
|
|
11850
11866
|
default: boolean;
|
|
@@ -11897,10 +11913,10 @@ export declare const Components: {
|
|
|
11897
11913
|
checkStrictly: boolean;
|
|
11898
11914
|
autoExpandParent: boolean;
|
|
11899
11915
|
checkDescendants: boolean;
|
|
11900
|
-
|
|
11916
|
+
renderNodeAfterExpand: boolean;
|
|
11917
|
+
showCheckbox: boolean;
|
|
11901
11918
|
expandOnClickNode: boolean;
|
|
11902
11919
|
checkOnClickNode: boolean;
|
|
11903
|
-
showCheckbox: boolean;
|
|
11904
11920
|
highlightCurrent: boolean;
|
|
11905
11921
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
11906
11922
|
MTree: DefineComponent<ExtractPropTypes< {
|
|
@@ -11917,10 +11933,6 @@ export declare const Components: {
|
|
|
11917
11933
|
type: StringConstructor;
|
|
11918
11934
|
default: string;
|
|
11919
11935
|
};
|
|
11920
|
-
renderAfterExpand: {
|
|
11921
|
-
type: BooleanConstructor;
|
|
11922
|
-
default: boolean;
|
|
11923
|
-
};
|
|
11924
11936
|
checkStrictly: {
|
|
11925
11937
|
type: BooleanConstructor;
|
|
11926
11938
|
default: boolean;
|
|
@@ -11945,11 +11957,6 @@ export declare const Components: {
|
|
|
11945
11957
|
default: () => never[];
|
|
11946
11958
|
};
|
|
11947
11959
|
currentNodeValue: (StringConstructor | NumberConstructor)[];
|
|
11948
|
-
render: PropType<Props["render"]>;
|
|
11949
|
-
showCheckbox: {
|
|
11950
|
-
type: BooleanConstructor;
|
|
11951
|
-
default: boolean;
|
|
11952
|
-
};
|
|
11953
11960
|
draggable: {
|
|
11954
11961
|
type: BooleanConstructor;
|
|
11955
11962
|
default: boolean;
|
|
@@ -11963,10 +11970,6 @@ export declare const Components: {
|
|
|
11963
11970
|
highlightCurrent: BooleanConstructor;
|
|
11964
11971
|
loadData: FunctionConstructor;
|
|
11965
11972
|
filterNode: FunctionConstructor;
|
|
11966
|
-
accordion: {
|
|
11967
|
-
type: BooleanConstructor;
|
|
11968
|
-
default: boolean;
|
|
11969
|
-
};
|
|
11970
11973
|
indent: {
|
|
11971
11974
|
type: NumberConstructor;
|
|
11972
11975
|
default: number;
|
|
@@ -11986,6 +11989,19 @@ export declare const Components: {
|
|
|
11986
11989
|
type: BooleanConstructor;
|
|
11987
11990
|
default: boolean;
|
|
11988
11991
|
};
|
|
11992
|
+
accordion: {
|
|
11993
|
+
type: BooleanConstructor;
|
|
11994
|
+
default: boolean;
|
|
11995
|
+
};
|
|
11996
|
+
renderNodeLabel: Render;
|
|
11997
|
+
renderNodeAfterExpand: {
|
|
11998
|
+
type: BooleanConstructor;
|
|
11999
|
+
default: boolean;
|
|
12000
|
+
};
|
|
12001
|
+
showCheckbox: {
|
|
12002
|
+
type: BooleanConstructor;
|
|
12003
|
+
default: boolean;
|
|
12004
|
+
};
|
|
11989
12005
|
numerable: {
|
|
11990
12006
|
type: BooleanConstructor;
|
|
11991
12007
|
default: boolean;
|
|
@@ -12012,10 +12028,6 @@ export declare const Components: {
|
|
|
12012
12028
|
type: StringConstructor;
|
|
12013
12029
|
default: string;
|
|
12014
12030
|
};
|
|
12015
|
-
renderAfterExpand: {
|
|
12016
|
-
type: BooleanConstructor;
|
|
12017
|
-
default: boolean;
|
|
12018
|
-
};
|
|
12019
12031
|
checkStrictly: {
|
|
12020
12032
|
type: BooleanConstructor;
|
|
12021
12033
|
default: boolean;
|
|
@@ -12040,11 +12052,6 @@ export declare const Components: {
|
|
|
12040
12052
|
default: () => never[];
|
|
12041
12053
|
};
|
|
12042
12054
|
currentNodeValue: (StringConstructor | NumberConstructor)[];
|
|
12043
|
-
render: PropType<Props["render"]>;
|
|
12044
|
-
showCheckbox: {
|
|
12045
|
-
type: BooleanConstructor;
|
|
12046
|
-
default: boolean;
|
|
12047
|
-
};
|
|
12048
12055
|
draggable: {
|
|
12049
12056
|
type: BooleanConstructor;
|
|
12050
12057
|
default: boolean;
|
|
@@ -12058,10 +12065,6 @@ export declare const Components: {
|
|
|
12058
12065
|
highlightCurrent: BooleanConstructor;
|
|
12059
12066
|
loadData: FunctionConstructor;
|
|
12060
12067
|
filterNode: FunctionConstructor;
|
|
12061
|
-
accordion: {
|
|
12062
|
-
type: BooleanConstructor;
|
|
12063
|
-
default: boolean;
|
|
12064
|
-
};
|
|
12065
12068
|
indent: {
|
|
12066
12069
|
type: NumberConstructor;
|
|
12067
12070
|
default: number;
|
|
@@ -12081,6 +12084,19 @@ export declare const Components: {
|
|
|
12081
12084
|
type: BooleanConstructor;
|
|
12082
12085
|
default: boolean;
|
|
12083
12086
|
};
|
|
12087
|
+
accordion: {
|
|
12088
|
+
type: BooleanConstructor;
|
|
12089
|
+
default: boolean;
|
|
12090
|
+
};
|
|
12091
|
+
renderNodeLabel: Render;
|
|
12092
|
+
renderNodeAfterExpand: {
|
|
12093
|
+
type: BooleanConstructor;
|
|
12094
|
+
default: boolean;
|
|
12095
|
+
};
|
|
12096
|
+
showCheckbox: {
|
|
12097
|
+
type: BooleanConstructor;
|
|
12098
|
+
default: boolean;
|
|
12099
|
+
};
|
|
12084
12100
|
numerable: {
|
|
12085
12101
|
type: BooleanConstructor;
|
|
12086
12102
|
default: boolean;
|
|
@@ -12133,10 +12149,10 @@ export declare const Components: {
|
|
|
12133
12149
|
checkStrictly: boolean;
|
|
12134
12150
|
autoExpandParent: boolean;
|
|
12135
12151
|
checkDescendants: boolean;
|
|
12136
|
-
|
|
12152
|
+
renderNodeAfterExpand: boolean;
|
|
12153
|
+
showCheckbox: boolean;
|
|
12137
12154
|
expandOnClickNode: boolean;
|
|
12138
12155
|
checkOnClickNode: boolean;
|
|
12139
|
-
showCheckbox: boolean;
|
|
12140
12156
|
highlightCurrent: boolean;
|
|
12141
12157
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
12142
12158
|
Upload: DefineComponent<ExtractPropTypes< {
|
package/dist/index.iife.js
CHANGED
|
@@ -11309,7 +11309,7 @@ var Vc = (function (exports, vue) {
|
|
|
11309
11309
|
el: "body",
|
|
11310
11310
|
alive: false,
|
|
11311
11311
|
multiple: false,
|
|
11312
|
-
aliveRegExp: { className: /(vc-
|
|
11312
|
+
aliveRegExp: { className: /(vc-portal-alive)/ },
|
|
11313
11313
|
aliveVisibleKey: "isVisible",
|
|
11314
11314
|
aliveUpdateKey: "update",
|
|
11315
11315
|
leaveDelay: 300,
|
|
@@ -11534,7 +11534,8 @@ var Vc = (function (exports, vue) {
|
|
|
11534
11534
|
leaf = Portal.leafs.get(name);
|
|
11535
11535
|
leaf.target = target;
|
|
11536
11536
|
leaf.propsData.value = propsData$;
|
|
11537
|
-
leaf.wrapper?.[aliveUpdateKey]
|
|
11537
|
+
const next = leaf.wrapper?.[aliveUpdateKey];
|
|
11538
|
+
next && vue.nextTick(() => next(options));
|
|
11538
11539
|
} else {
|
|
11539
11540
|
const wrapper = this.wrapper;
|
|
11540
11541
|
const app = vue.createApp({
|
|
@@ -11549,7 +11550,7 @@ var Vc = (function (exports, vue) {
|
|
|
11549
11550
|
if (container && e.target && !container.contains(e.target) && !path?.some((item) => utils.eleInRegExp(item, aliveRegExp))) {
|
|
11550
11551
|
/* istanbul ignore else -- @preserve */
|
|
11551
11552
|
if (leaf.wrapper && leaf.wrapper?.[aliveVisibleKey]) {
|
|
11552
|
-
leaf.wrapper[aliveVisibleKey] = false;
|
|
11553
|
+
typeof leaf.wrapper[aliveVisibleKey] === "function" ? leaf.wrapper[aliveVisibleKey](false) : leaf.wrapper[aliveVisibleKey] = false;
|
|
11553
11554
|
}
|
|
11554
11555
|
leaveDelay ? setTimeout($onDestroyed, leaveDelay) : $onDestroyed();
|
|
11555
11556
|
}
|
|
@@ -12140,6 +12141,8 @@ var Vc = (function (exports, vue) {
|
|
|
12140
12141
|
const props$19 = {
|
|
12141
12142
|
...pick(props$1c, popoverKeys$1),
|
|
12142
12143
|
...pick(props$1g, inputKeys$2),
|
|
12144
|
+
renderOption: [Function],
|
|
12145
|
+
renderOptionGroup: [Function],
|
|
12143
12146
|
data: {
|
|
12144
12147
|
type: Array,
|
|
12145
12148
|
default: () => []
|
|
@@ -13449,7 +13452,7 @@ var Vc = (function (exports, vue) {
|
|
|
13449
13452
|
default: true
|
|
13450
13453
|
}
|
|
13451
13454
|
};
|
|
13452
|
-
function _isSlot$
|
|
13455
|
+
function _isSlot$2(s) {
|
|
13453
13456
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13454
13457
|
}
|
|
13455
13458
|
const COMPONENT_NAME$1w = "vc-expand";
|
|
@@ -13473,7 +13476,7 @@ var Vc = (function (exports, vue) {
|
|
|
13473
13476
|
enter: 200,
|
|
13474
13477
|
leave: 200
|
|
13475
13478
|
}
|
|
13476
|
-
}, _isSlot$
|
|
13479
|
+
}, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
|
|
13477
13480
|
default: () => [(props2.alive || !props2.alive && isActive.value) && slots.default?.()]
|
|
13478
13481
|
}), [[vue.vShow, isActive.value]])) ? _slot : {
|
|
13479
13482
|
default: () => [_slot]
|
|
@@ -13609,7 +13612,7 @@ var Vc = (function (exports, vue) {
|
|
|
13609
13612
|
const formatter = (format, arr) => {
|
|
13610
13613
|
return format.replace("DD", arr[0]).replace("HH", arr[1]).replace("mm", arr[2]).replace("ss", arr[3]).replace("SSS", arr[4]);
|
|
13611
13614
|
};
|
|
13612
|
-
function _isSlot$
|
|
13615
|
+
function _isSlot$1(s) {
|
|
13613
13616
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13614
13617
|
}
|
|
13615
13618
|
const COMPONENT_NAME$1t = "vc-countdown";
|
|
@@ -13738,7 +13741,7 @@ var Vc = (function (exports, vue) {
|
|
|
13738
13741
|
// @ts-ignore
|
|
13739
13742
|
vue.createVNode(Content, {
|
|
13740
13743
|
"class": "vc-countdown"
|
|
13741
|
-
}, _isSlot$
|
|
13744
|
+
}, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
|
|
13742
13745
|
default: () => [_slot]
|
|
13743
13746
|
})
|
|
13744
13747
|
);
|
|
@@ -20662,7 +20665,9 @@ var Vc = (function (exports, vue) {
|
|
|
20662
20665
|
filterable: {
|
|
20663
20666
|
type: Boolean,
|
|
20664
20667
|
default: true
|
|
20665
|
-
}
|
|
20668
|
+
},
|
|
20669
|
+
render: [Function],
|
|
20670
|
+
row: Object
|
|
20666
20671
|
};
|
|
20667
20672
|
const COMPONENT_NAME$J = "vc-select-option";
|
|
20668
20673
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20676,7 +20681,7 @@ var Vc = (function (exports, vue) {
|
|
|
20676
20681
|
const v = String(props2.label || props2.value);
|
|
20677
20682
|
return v.trim();
|
|
20678
20683
|
});
|
|
20679
|
-
const
|
|
20684
|
+
const isChecked = vue.computed(() => {
|
|
20680
20685
|
const {
|
|
20681
20686
|
current
|
|
20682
20687
|
} = owner.exposed;
|
|
@@ -20693,13 +20698,22 @@ var Vc = (function (exports, vue) {
|
|
|
20693
20698
|
const regex = owner.exposed.searchRegex.value;
|
|
20694
20699
|
return regex.test(formatterLabel.value) || !props2.filterable;
|
|
20695
20700
|
});
|
|
20696
|
-
const
|
|
20697
|
-
|
|
20701
|
+
const customOptions = vue.computed(() => {
|
|
20702
|
+
return {
|
|
20703
|
+
store: {
|
|
20704
|
+
last: isLast.value,
|
|
20705
|
+
checked: isChecked.value,
|
|
20706
|
+
click: handleClick
|
|
20707
|
+
},
|
|
20708
|
+
row: props2.row
|
|
20709
|
+
};
|
|
20710
|
+
});
|
|
20711
|
+
const handleClick = () => {
|
|
20698
20712
|
if (props2.disabled) return;
|
|
20699
|
-
if (!owner.exposed.multiple.value &&
|
|
20713
|
+
if (!owner.exposed.multiple.value && isChecked.value) {
|
|
20700
20714
|
owner.exposed.close();
|
|
20701
20715
|
return;
|
|
20702
|
-
} else if (
|
|
20716
|
+
} else if (isChecked.value) {
|
|
20703
20717
|
owner.exposed.remove(props2.value, formatterLabel.value);
|
|
20704
20718
|
return;
|
|
20705
20719
|
}
|
|
@@ -20710,15 +20724,17 @@ var Vc = (function (exports, vue) {
|
|
|
20710
20724
|
};
|
|
20711
20725
|
return () => {
|
|
20712
20726
|
if (!isActive.value) return;
|
|
20713
|
-
return vue.createVNode(
|
|
20727
|
+
return typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20728
|
+
"render": props2.render
|
|
20729
|
+
}, customOptions.value), null) : slots.default ? slots.default(customOptions.value) : vue.createVNode("div", {
|
|
20714
20730
|
"disabled": props2.disabled && "disabled",
|
|
20715
20731
|
"class": [{
|
|
20716
|
-
"is-select":
|
|
20732
|
+
"is-select": isChecked.value,
|
|
20717
20733
|
"is-last": isLast.value
|
|
20718
20734
|
}, "vc-select-option"],
|
|
20719
|
-
"onClick":
|
|
20735
|
+
"onClick": vue.withModifiers(handleClick, ["stop"]),
|
|
20720
20736
|
"onMousedown": handlePrevent
|
|
20721
|
-
}, [
|
|
20737
|
+
}, [formatterLabel.value, isChecked.value && vue.createVNode(Icon, {
|
|
20722
20738
|
"type": "correct"
|
|
20723
20739
|
}, null)]);
|
|
20724
20740
|
};
|
|
@@ -20731,7 +20747,9 @@ var Vc = (function (exports, vue) {
|
|
|
20731
20747
|
},
|
|
20732
20748
|
label: {
|
|
20733
20749
|
type: [String, Number]
|
|
20734
|
-
}
|
|
20750
|
+
},
|
|
20751
|
+
row: Object,
|
|
20752
|
+
render: [Function]
|
|
20735
20753
|
};
|
|
20736
20754
|
const COMPONENT_NAME$I = "vc-select-option-group";
|
|
20737
20755
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20744,18 +20762,24 @@ var Vc = (function (exports, vue) {
|
|
|
20744
20762
|
const v = String(props2.label || props2.value);
|
|
20745
20763
|
return v.trim();
|
|
20746
20764
|
});
|
|
20765
|
+
const customOptions = vue.computed(() => {
|
|
20766
|
+
return {
|
|
20767
|
+
row: props2.row
|
|
20768
|
+
};
|
|
20769
|
+
});
|
|
20747
20770
|
return () => {
|
|
20748
20771
|
return vue.createVNode("div", {
|
|
20749
20772
|
"class": "vc-select-option-group"
|
|
20750
|
-
}, [vue.createVNode(
|
|
20773
|
+
}, [typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20774
|
+
"render": props2.render
|
|
20775
|
+
}, customOptions.value), null) : slots.title ? slots.title({
|
|
20776
|
+
row: props2.row
|
|
20777
|
+
}) : vue.createVNode("div", {
|
|
20751
20778
|
"class": "vc-select-option-group__title"
|
|
20752
20779
|
}, [formatterLabel.value]), vue.createVNode("div", null, [slots?.default?.()])]);
|
|
20753
20780
|
};
|
|
20754
20781
|
}
|
|
20755
20782
|
});
|
|
20756
|
-
function _isSlot$1(s) {
|
|
20757
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
20758
|
-
}
|
|
20759
20783
|
const COMPONENT_NAME$H = "vc-select";
|
|
20760
20784
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
20761
20785
|
name: COMPONENT_NAME$H,
|
|
@@ -20971,29 +20995,41 @@ var Vc = (function (exports, vue) {
|
|
|
20971
20995
|
"max-height": "200px"
|
|
20972
20996
|
}, {
|
|
20973
20997
|
default: () => [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
|
|
20974
|
-
|
|
20975
|
-
|
|
20998
|
+
return Array.isArray(item.children) && item.children.length ? vue.createVNode(OptionGroup, {
|
|
20999
|
+
"row": item,
|
|
20976
21000
|
"value": item.value,
|
|
20977
21001
|
"label": item.label,
|
|
20978
|
-
"key": item.value
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
21002
|
+
"key": item.value,
|
|
21003
|
+
"render": props2.renderOptionGroup
|
|
21004
|
+
}, {
|
|
21005
|
+
title: slots?.optionGroup,
|
|
21006
|
+
default: () => {
|
|
21007
|
+
return item.children.map(($item) => {
|
|
21008
|
+
return vue.createVNode(Option, {
|
|
21009
|
+
"key": $item.value,
|
|
21010
|
+
"row": $item,
|
|
21011
|
+
"value": $item.value,
|
|
21012
|
+
"label": $item.label,
|
|
21013
|
+
"disabled": $item.disabled,
|
|
21014
|
+
"filterable": $item.filterable,
|
|
21015
|
+
"render": props2.renderOption
|
|
21016
|
+
}, {
|
|
21017
|
+
default: slots?.option
|
|
21018
|
+
});
|
|
21019
|
+
});
|
|
21020
|
+
}
|
|
20989
21021
|
}) : vue.createVNode(Option, {
|
|
20990
21022
|
"key": item.value,
|
|
21023
|
+
"row": item,
|
|
20991
21024
|
"value": item.value,
|
|
20992
21025
|
"label": item.label,
|
|
20993
21026
|
"disabled": item.disabled,
|
|
20994
|
-
"filterable": item.filterable
|
|
20995
|
-
|
|
20996
|
-
|
|
21027
|
+
"filterable": item.filterable,
|
|
21028
|
+
"render": props2.renderOption
|
|
21029
|
+
}, {
|
|
21030
|
+
default: slots?.option
|
|
21031
|
+
});
|
|
21032
|
+
})]) : slots?.default?.()]
|
|
20997
21033
|
})]);
|
|
20998
21034
|
}
|
|
20999
21035
|
});
|
|
@@ -28273,112 +28309,33 @@ var Vc = (function (exports, vue) {
|
|
|
28273
28309
|
}
|
|
28274
28310
|
};
|
|
28275
28311
|
};
|
|
28276
|
-
const selectKeys = [
|
|
28277
|
-
"separator",
|
|
28278
|
-
"numerable",
|
|
28279
|
-
"nullValue"
|
|
28280
|
-
];
|
|
28281
28312
|
const props$4 = {
|
|
28282
|
-
|
|
28283
|
-
|
|
28284
|
-
|
|
28285
|
-
type: Number,
|
|
28286
|
-
default: Infinity,
|
|
28287
|
-
validator: (v) => v >= 1
|
|
28288
|
-
},
|
|
28289
|
-
// 确保所有value是唯一的; 否则会出现问题
|
|
28290
|
-
data: {
|
|
28291
|
-
type: Array,
|
|
28292
|
-
default: () => []
|
|
28293
|
-
},
|
|
28294
|
-
emptyText: {
|
|
28295
|
-
type: String,
|
|
28296
|
-
default: "暂无数据"
|
|
28297
|
-
},
|
|
28298
|
-
renderAfterExpand: {
|
|
28299
|
-
type: Boolean,
|
|
28300
|
-
default: true
|
|
28301
|
-
},
|
|
28302
|
-
checkStrictly: {
|
|
28303
|
-
type: Boolean,
|
|
28304
|
-
default: false
|
|
28305
|
-
},
|
|
28306
|
-
defaultExpandAll: Boolean,
|
|
28307
|
-
expandOnClickNode: {
|
|
28308
|
-
type: Boolean,
|
|
28309
|
-
default: true
|
|
28310
|
-
},
|
|
28311
|
-
checkOnClickNode: Boolean,
|
|
28312
|
-
checkDescendants: {
|
|
28313
|
-
type: Boolean,
|
|
28314
|
-
default: false
|
|
28313
|
+
node: {
|
|
28314
|
+
type: Object,
|
|
28315
|
+
default: () => ({})
|
|
28315
28316
|
},
|
|
28316
|
-
|
|
28317
|
+
renderNodeLabel: Function,
|
|
28318
|
+
renderNodeAfterExpand: {
|
|
28317
28319
|
type: Boolean,
|
|
28318
28320
|
default: true
|
|
28319
28321
|
},
|
|
28320
|
-
// checkedValues -> modelValue
|
|
28321
|
-
modelValue: [String, Number, Array],
|
|
28322
|
-
// Value[]
|
|
28323
|
-
expandedValues: {
|
|
28324
|
-
type: Array,
|
|
28325
|
-
default: () => []
|
|
28326
|
-
},
|
|
28327
|
-
currentNodeValue: [String, Number],
|
|
28328
|
-
render: Function,
|
|
28329
28322
|
showCheckbox: {
|
|
28330
28323
|
type: Boolean,
|
|
28331
28324
|
default: false
|
|
28332
28325
|
},
|
|
28333
|
-
draggable: {
|
|
28334
|
-
type: Boolean,
|
|
28335
|
-
default: false
|
|
28336
|
-
},
|
|
28337
|
-
allowDrag: Function,
|
|
28338
|
-
allowDrop: Function,
|
|
28339
|
-
lazy: {
|
|
28340
|
-
type: Boolean,
|
|
28341
|
-
default: false
|
|
28342
|
-
},
|
|
28343
|
-
highlightCurrent: Boolean,
|
|
28344
|
-
loadData: Function,
|
|
28345
|
-
filterNode: Function,
|
|
28346
28326
|
accordion: {
|
|
28347
28327
|
type: Boolean,
|
|
28348
28328
|
default: false
|
|
28349
28329
|
},
|
|
28350
|
-
indent: {
|
|
28351
|
-
type: Number,
|
|
28352
|
-
default: 18
|
|
28353
|
-
},
|
|
28354
|
-
iconClass: String,
|
|
28355
|
-
keyValue: {
|
|
28356
|
-
type: Object,
|
|
28357
|
-
default: () => KEY_VALUE
|
|
28358
|
-
},
|
|
28359
28330
|
allowDispatch: {
|
|
28360
28331
|
type: Boolean,
|
|
28361
28332
|
default: true
|
|
28362
28333
|
}
|
|
28363
28334
|
};
|
|
28364
|
-
const treeKeys$1 = [
|
|
28365
|
-
"render",
|
|
28366
|
-
"renderAfterExpand",
|
|
28367
|
-
"showCheckbox",
|
|
28368
|
-
"accordion",
|
|
28369
|
-
"allowDispatch"
|
|
28370
|
-
];
|
|
28371
|
-
const props$3 = {
|
|
28372
|
-
...pick(props$4, treeKeys$1),
|
|
28373
|
-
node: {
|
|
28374
|
-
type: Object,
|
|
28375
|
-
default: () => ({})
|
|
28376
|
-
}
|
|
28377
|
-
};
|
|
28378
28335
|
const COMPONENT_NAME$5 = "vc-tree-node";
|
|
28379
28336
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
28380
28337
|
name: COMPONENT_NAME$5,
|
|
28381
|
-
props: props$
|
|
28338
|
+
props: props$4,
|
|
28382
28339
|
emits: ["node-expand"],
|
|
28383
28340
|
setup(props2, {
|
|
28384
28341
|
emit
|
|
@@ -28552,20 +28509,20 @@ var Vc = (function (exports, vue) {
|
|
|
28552
28509
|
}, null), node.states.loading && vue.createVNode(Spin, {
|
|
28553
28510
|
"size": 12,
|
|
28554
28511
|
"class": "vc-tree-node__loading-icon"
|
|
28555
|
-
}, null), props2.
|
|
28556
|
-
"render": props2.
|
|
28512
|
+
}, null), props2.renderNodeLabel ? vue.createVNode(Customer, {
|
|
28513
|
+
"render": props2.renderNodeLabel,
|
|
28557
28514
|
"store": node,
|
|
28558
28515
|
"row": node.states.data
|
|
28559
28516
|
}, null) : vue.createVNode("span", null, [node.getter.label])]), vue.createVNode(TransitionCollapse, null, {
|
|
28560
|
-
default: () => [(!props2.
|
|
28517
|
+
default: () => [(!props2.renderNodeAfterExpand || childNodeRendered.value) && vue.withDirectives(vue.createVNode("div", {
|
|
28561
28518
|
"aria-expanded": expanded.value,
|
|
28562
28519
|
"class": "vc-tree-node__children",
|
|
28563
28520
|
"role": "group"
|
|
28564
28521
|
}, [node.childNodes.map((child) => {
|
|
28565
28522
|
return vue.createVNode(TreeNodeContent, {
|
|
28566
28523
|
"key": getNodeKey(child),
|
|
28567
|
-
"
|
|
28568
|
-
"
|
|
28524
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
28525
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28569
28526
|
"showCheckbox": props2.showCheckbox,
|
|
28570
28527
|
"allowDispatch": props2.allowDispatch,
|
|
28571
28528
|
"accordion": props2.accordion,
|
|
@@ -28791,10 +28748,89 @@ var Vc = (function (exports, vue) {
|
|
|
28791
28748
|
treeItemArray
|
|
28792
28749
|
};
|
|
28793
28750
|
};
|
|
28751
|
+
const selectKeys = [
|
|
28752
|
+
"separator",
|
|
28753
|
+
"numerable",
|
|
28754
|
+
"nullValue"
|
|
28755
|
+
];
|
|
28756
|
+
const treeNodeContentKeys = [
|
|
28757
|
+
"renderNodeLabel",
|
|
28758
|
+
"renderNodeAfterExpand",
|
|
28759
|
+
"showCheckbox",
|
|
28760
|
+
"accordion",
|
|
28761
|
+
"allowDispatch"
|
|
28762
|
+
];
|
|
28763
|
+
const props$3 = {
|
|
28764
|
+
...pick(props$19, selectKeys),
|
|
28765
|
+
...pick(props$4, treeNodeContentKeys),
|
|
28766
|
+
// 暂不支持,仅作为默认值
|
|
28767
|
+
max: {
|
|
28768
|
+
type: Number,
|
|
28769
|
+
default: Infinity,
|
|
28770
|
+
validator: (v) => v >= 1
|
|
28771
|
+
},
|
|
28772
|
+
// 确保所有value是唯一的; 否则会出现问题
|
|
28773
|
+
data: {
|
|
28774
|
+
type: Array,
|
|
28775
|
+
default: () => []
|
|
28776
|
+
},
|
|
28777
|
+
emptyText: {
|
|
28778
|
+
type: String,
|
|
28779
|
+
default: "暂无数据"
|
|
28780
|
+
},
|
|
28781
|
+
checkStrictly: {
|
|
28782
|
+
type: Boolean,
|
|
28783
|
+
default: false
|
|
28784
|
+
},
|
|
28785
|
+
defaultExpandAll: Boolean,
|
|
28786
|
+
expandOnClickNode: {
|
|
28787
|
+
type: Boolean,
|
|
28788
|
+
default: true
|
|
28789
|
+
},
|
|
28790
|
+
checkOnClickNode: Boolean,
|
|
28791
|
+
checkDescendants: {
|
|
28792
|
+
type: Boolean,
|
|
28793
|
+
default: false
|
|
28794
|
+
},
|
|
28795
|
+
autoExpandParent: {
|
|
28796
|
+
type: Boolean,
|
|
28797
|
+
default: true
|
|
28798
|
+
},
|
|
28799
|
+
// checkedValues -> modelValue
|
|
28800
|
+
modelValue: [String, Number, Array],
|
|
28801
|
+
// Value[]
|
|
28802
|
+
expandedValues: {
|
|
28803
|
+
type: Array,
|
|
28804
|
+
default: () => []
|
|
28805
|
+
},
|
|
28806
|
+
currentNodeValue: [String, Number],
|
|
28807
|
+
draggable: {
|
|
28808
|
+
type: Boolean,
|
|
28809
|
+
default: false
|
|
28810
|
+
},
|
|
28811
|
+
allowDrag: Function,
|
|
28812
|
+
allowDrop: Function,
|
|
28813
|
+
lazy: {
|
|
28814
|
+
type: Boolean,
|
|
28815
|
+
default: false
|
|
28816
|
+
},
|
|
28817
|
+
highlightCurrent: Boolean,
|
|
28818
|
+
loadData: Function,
|
|
28819
|
+
filterNode: Function,
|
|
28820
|
+
indent: {
|
|
28821
|
+
type: Number,
|
|
28822
|
+
default: 18
|
|
28823
|
+
},
|
|
28824
|
+
iconClass: String,
|
|
28825
|
+
keyValue: {
|
|
28826
|
+
type: Object,
|
|
28827
|
+
default: () => KEY_VALUE
|
|
28828
|
+
}
|
|
28829
|
+
};
|
|
28794
28830
|
const COMPONENT_NAME$4 = "vc-tree";
|
|
28795
28831
|
const Tree2 = /* @__PURE__ */ vue.defineComponent({
|
|
28796
28832
|
name: COMPONENT_NAME$4,
|
|
28797
|
-
props: props$
|
|
28833
|
+
props: props$3,
|
|
28798
28834
|
emits: ["update:modelValue", "change", "check-change", "current-change", "node-click", "node-contextmenu", "node-collapse", "node-expand", "check", "node-drag-start", "node-drag-end", "node-drop", "node-drag-leave", "node-drag-enter", "node-drag-over"],
|
|
28799
28835
|
setup(props2, {
|
|
28800
28836
|
expose,
|
|
@@ -28968,8 +29004,8 @@ var Vc = (function (exports, vue) {
|
|
|
28968
29004
|
}, [root.childNodes.map((child) => {
|
|
28969
29005
|
return vue.createVNode(TreeNodeContent, {
|
|
28970
29006
|
"key": getNodeKey(child),
|
|
28971
|
-
"
|
|
28972
|
-
"
|
|
29007
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29008
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28973
29009
|
"showCheckbox": props2.showCheckbox,
|
|
28974
29010
|
"allowDispatch": props2.allowDispatch,
|
|
28975
29011
|
"accordion": props2.accordion,
|
|
@@ -28990,11 +29026,12 @@ var Vc = (function (exports, vue) {
|
|
|
28990
29026
|
const treeKeys = [
|
|
28991
29027
|
"checkStrictly",
|
|
28992
29028
|
"data",
|
|
28993
|
-
"max"
|
|
29029
|
+
"max",
|
|
29030
|
+
"renderNodeLabel"
|
|
28994
29031
|
];
|
|
28995
29032
|
const props$2 = {
|
|
28996
29033
|
...props$19,
|
|
28997
|
-
...pick(props$
|
|
29034
|
+
...pick(props$3, treeKeys)
|
|
28998
29035
|
};
|
|
28999
29036
|
const COMPONENT_NAME$3 = "vc-tree-select";
|
|
29000
29037
|
const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -29205,6 +29242,7 @@ var Vc = (function (exports, vue) {
|
|
|
29205
29242
|
"checkStrictly": props2.checkStrictly,
|
|
29206
29243
|
"allowDispatch": false,
|
|
29207
29244
|
"showCheckbox": true,
|
|
29245
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29208
29246
|
"onChange": handleChange
|
|
29209
29247
|
}, null)]
|
|
29210
29248
|
})]);
|
package/dist/index.umd.cjs
CHANGED
|
@@ -11312,7 +11312,7 @@
|
|
|
11312
11312
|
el: "body",
|
|
11313
11313
|
alive: false,
|
|
11314
11314
|
multiple: false,
|
|
11315
|
-
aliveRegExp: { className: /(vc-
|
|
11315
|
+
aliveRegExp: { className: /(vc-portal-alive)/ },
|
|
11316
11316
|
aliveVisibleKey: "isVisible",
|
|
11317
11317
|
aliveUpdateKey: "update",
|
|
11318
11318
|
leaveDelay: 300,
|
|
@@ -11537,7 +11537,8 @@
|
|
|
11537
11537
|
leaf = Portal.leafs.get(name);
|
|
11538
11538
|
leaf.target = target;
|
|
11539
11539
|
leaf.propsData.value = propsData$;
|
|
11540
|
-
leaf.wrapper?.[aliveUpdateKey]
|
|
11540
|
+
const next = leaf.wrapper?.[aliveUpdateKey];
|
|
11541
|
+
next && vue.nextTick(() => next(options));
|
|
11541
11542
|
} else {
|
|
11542
11543
|
const wrapper = this.wrapper;
|
|
11543
11544
|
const app = vue.createApp({
|
|
@@ -11552,7 +11553,7 @@
|
|
|
11552
11553
|
if (container && e.target && !container.contains(e.target) && !path?.some((item) => utils.eleInRegExp(item, aliveRegExp))) {
|
|
11553
11554
|
/* istanbul ignore else -- @preserve */
|
|
11554
11555
|
if (leaf.wrapper && leaf.wrapper?.[aliveVisibleKey]) {
|
|
11555
|
-
leaf.wrapper[aliveVisibleKey] = false;
|
|
11556
|
+
typeof leaf.wrapper[aliveVisibleKey] === "function" ? leaf.wrapper[aliveVisibleKey](false) : leaf.wrapper[aliveVisibleKey] = false;
|
|
11556
11557
|
}
|
|
11557
11558
|
leaveDelay ? setTimeout($onDestroyed, leaveDelay) : $onDestroyed();
|
|
11558
11559
|
}
|
|
@@ -12143,6 +12144,8 @@
|
|
|
12143
12144
|
const props$19 = {
|
|
12144
12145
|
...pick(props$1c, popoverKeys$1),
|
|
12145
12146
|
...pick(props$1g, inputKeys$2),
|
|
12147
|
+
renderOption: [Function],
|
|
12148
|
+
renderOptionGroup: [Function],
|
|
12146
12149
|
data: {
|
|
12147
12150
|
type: Array,
|
|
12148
12151
|
default: () => []
|
|
@@ -13452,7 +13455,7 @@
|
|
|
13452
13455
|
default: true
|
|
13453
13456
|
}
|
|
13454
13457
|
};
|
|
13455
|
-
function _isSlot$
|
|
13458
|
+
function _isSlot$2(s) {
|
|
13456
13459
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13457
13460
|
}
|
|
13458
13461
|
const COMPONENT_NAME$1w = "vc-expand";
|
|
@@ -13476,7 +13479,7 @@
|
|
|
13476
13479
|
enter: 200,
|
|
13477
13480
|
leave: 200
|
|
13478
13481
|
}
|
|
13479
|
-
}, _isSlot$
|
|
13482
|
+
}, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
|
|
13480
13483
|
default: () => [(props2.alive || !props2.alive && isActive.value) && slots.default?.()]
|
|
13481
13484
|
}), [[vue.vShow, isActive.value]])) ? _slot : {
|
|
13482
13485
|
default: () => [_slot]
|
|
@@ -13612,7 +13615,7 @@
|
|
|
13612
13615
|
const formatter = (format, arr) => {
|
|
13613
13616
|
return format.replace("DD", arr[0]).replace("HH", arr[1]).replace("mm", arr[2]).replace("ss", arr[3]).replace("SSS", arr[4]);
|
|
13614
13617
|
};
|
|
13615
|
-
function _isSlot$
|
|
13618
|
+
function _isSlot$1(s) {
|
|
13616
13619
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13617
13620
|
}
|
|
13618
13621
|
const COMPONENT_NAME$1t = "vc-countdown";
|
|
@@ -13741,7 +13744,7 @@
|
|
|
13741
13744
|
// @ts-ignore
|
|
13742
13745
|
vue.createVNode(Content, {
|
|
13743
13746
|
"class": "vc-countdown"
|
|
13744
|
-
}, _isSlot$
|
|
13747
|
+
}, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
|
|
13745
13748
|
default: () => [_slot]
|
|
13746
13749
|
})
|
|
13747
13750
|
);
|
|
@@ -20665,7 +20668,9 @@
|
|
|
20665
20668
|
filterable: {
|
|
20666
20669
|
type: Boolean,
|
|
20667
20670
|
default: true
|
|
20668
|
-
}
|
|
20671
|
+
},
|
|
20672
|
+
render: [Function],
|
|
20673
|
+
row: Object
|
|
20669
20674
|
};
|
|
20670
20675
|
const COMPONENT_NAME$J = "vc-select-option";
|
|
20671
20676
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20679,7 +20684,7 @@
|
|
|
20679
20684
|
const v = String(props2.label || props2.value);
|
|
20680
20685
|
return v.trim();
|
|
20681
20686
|
});
|
|
20682
|
-
const
|
|
20687
|
+
const isChecked = vue.computed(() => {
|
|
20683
20688
|
const {
|
|
20684
20689
|
current
|
|
20685
20690
|
} = owner.exposed;
|
|
@@ -20696,13 +20701,22 @@
|
|
|
20696
20701
|
const regex = owner.exposed.searchRegex.value;
|
|
20697
20702
|
return regex.test(formatterLabel.value) || !props2.filterable;
|
|
20698
20703
|
});
|
|
20699
|
-
const
|
|
20700
|
-
|
|
20704
|
+
const customOptions = vue.computed(() => {
|
|
20705
|
+
return {
|
|
20706
|
+
store: {
|
|
20707
|
+
last: isLast.value,
|
|
20708
|
+
checked: isChecked.value,
|
|
20709
|
+
click: handleClick
|
|
20710
|
+
},
|
|
20711
|
+
row: props2.row
|
|
20712
|
+
};
|
|
20713
|
+
});
|
|
20714
|
+
const handleClick = () => {
|
|
20701
20715
|
if (props2.disabled) return;
|
|
20702
|
-
if (!owner.exposed.multiple.value &&
|
|
20716
|
+
if (!owner.exposed.multiple.value && isChecked.value) {
|
|
20703
20717
|
owner.exposed.close();
|
|
20704
20718
|
return;
|
|
20705
|
-
} else if (
|
|
20719
|
+
} else if (isChecked.value) {
|
|
20706
20720
|
owner.exposed.remove(props2.value, formatterLabel.value);
|
|
20707
20721
|
return;
|
|
20708
20722
|
}
|
|
@@ -20713,15 +20727,17 @@
|
|
|
20713
20727
|
};
|
|
20714
20728
|
return () => {
|
|
20715
20729
|
if (!isActive.value) return;
|
|
20716
|
-
return vue.createVNode(
|
|
20730
|
+
return typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20731
|
+
"render": props2.render
|
|
20732
|
+
}, customOptions.value), null) : slots.default ? slots.default(customOptions.value) : vue.createVNode("div", {
|
|
20717
20733
|
"disabled": props2.disabled && "disabled",
|
|
20718
20734
|
"class": [{
|
|
20719
|
-
"is-select":
|
|
20735
|
+
"is-select": isChecked.value,
|
|
20720
20736
|
"is-last": isLast.value
|
|
20721
20737
|
}, "vc-select-option"],
|
|
20722
|
-
"onClick":
|
|
20738
|
+
"onClick": vue.withModifiers(handleClick, ["stop"]),
|
|
20723
20739
|
"onMousedown": handlePrevent
|
|
20724
|
-
}, [
|
|
20740
|
+
}, [formatterLabel.value, isChecked.value && vue.createVNode(Icon, {
|
|
20725
20741
|
"type": "correct"
|
|
20726
20742
|
}, null)]);
|
|
20727
20743
|
};
|
|
@@ -20734,7 +20750,9 @@
|
|
|
20734
20750
|
},
|
|
20735
20751
|
label: {
|
|
20736
20752
|
type: [String, Number]
|
|
20737
|
-
}
|
|
20753
|
+
},
|
|
20754
|
+
row: Object,
|
|
20755
|
+
render: [Function]
|
|
20738
20756
|
};
|
|
20739
20757
|
const COMPONENT_NAME$I = "vc-select-option-group";
|
|
20740
20758
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20747,18 +20765,24 @@
|
|
|
20747
20765
|
const v = String(props2.label || props2.value);
|
|
20748
20766
|
return v.trim();
|
|
20749
20767
|
});
|
|
20768
|
+
const customOptions = vue.computed(() => {
|
|
20769
|
+
return {
|
|
20770
|
+
row: props2.row
|
|
20771
|
+
};
|
|
20772
|
+
});
|
|
20750
20773
|
return () => {
|
|
20751
20774
|
return vue.createVNode("div", {
|
|
20752
20775
|
"class": "vc-select-option-group"
|
|
20753
|
-
}, [vue.createVNode(
|
|
20776
|
+
}, [typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20777
|
+
"render": props2.render
|
|
20778
|
+
}, customOptions.value), null) : slots.title ? slots.title({
|
|
20779
|
+
row: props2.row
|
|
20780
|
+
}) : vue.createVNode("div", {
|
|
20754
20781
|
"class": "vc-select-option-group__title"
|
|
20755
20782
|
}, [formatterLabel.value]), vue.createVNode("div", null, [slots?.default?.()])]);
|
|
20756
20783
|
};
|
|
20757
20784
|
}
|
|
20758
20785
|
});
|
|
20759
|
-
function _isSlot$1(s) {
|
|
20760
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
20761
|
-
}
|
|
20762
20786
|
const COMPONENT_NAME$H = "vc-select";
|
|
20763
20787
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
20764
20788
|
name: COMPONENT_NAME$H,
|
|
@@ -20974,29 +20998,41 @@
|
|
|
20974
20998
|
"max-height": "200px"
|
|
20975
20999
|
}, {
|
|
20976
21000
|
default: () => [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
|
|
20977
|
-
|
|
20978
|
-
|
|
21001
|
+
return Array.isArray(item.children) && item.children.length ? vue.createVNode(OptionGroup, {
|
|
21002
|
+
"row": item,
|
|
20979
21003
|
"value": item.value,
|
|
20980
21004
|
"label": item.label,
|
|
20981
|
-
"key": item.value
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
|
|
20991
|
-
|
|
21005
|
+
"key": item.value,
|
|
21006
|
+
"render": props2.renderOptionGroup
|
|
21007
|
+
}, {
|
|
21008
|
+
title: slots?.optionGroup,
|
|
21009
|
+
default: () => {
|
|
21010
|
+
return item.children.map(($item) => {
|
|
21011
|
+
return vue.createVNode(Option, {
|
|
21012
|
+
"key": $item.value,
|
|
21013
|
+
"row": $item,
|
|
21014
|
+
"value": $item.value,
|
|
21015
|
+
"label": $item.label,
|
|
21016
|
+
"disabled": $item.disabled,
|
|
21017
|
+
"filterable": $item.filterable,
|
|
21018
|
+
"render": props2.renderOption
|
|
21019
|
+
}, {
|
|
21020
|
+
default: slots?.option
|
|
21021
|
+
});
|
|
21022
|
+
});
|
|
21023
|
+
}
|
|
20992
21024
|
}) : vue.createVNode(Option, {
|
|
20993
21025
|
"key": item.value,
|
|
21026
|
+
"row": item,
|
|
20994
21027
|
"value": item.value,
|
|
20995
21028
|
"label": item.label,
|
|
20996
21029
|
"disabled": item.disabled,
|
|
20997
|
-
"filterable": item.filterable
|
|
20998
|
-
|
|
20999
|
-
|
|
21030
|
+
"filterable": item.filterable,
|
|
21031
|
+
"render": props2.renderOption
|
|
21032
|
+
}, {
|
|
21033
|
+
default: slots?.option
|
|
21034
|
+
});
|
|
21035
|
+
})]) : slots?.default?.()]
|
|
21000
21036
|
})]);
|
|
21001
21037
|
}
|
|
21002
21038
|
});
|
|
@@ -28276,112 +28312,33 @@
|
|
|
28276
28312
|
}
|
|
28277
28313
|
};
|
|
28278
28314
|
};
|
|
28279
|
-
const selectKeys = [
|
|
28280
|
-
"separator",
|
|
28281
|
-
"numerable",
|
|
28282
|
-
"nullValue"
|
|
28283
|
-
];
|
|
28284
28315
|
const props$4 = {
|
|
28285
|
-
|
|
28286
|
-
|
|
28287
|
-
|
|
28288
|
-
type: Number,
|
|
28289
|
-
default: Infinity,
|
|
28290
|
-
validator: (v) => v >= 1
|
|
28291
|
-
},
|
|
28292
|
-
// 确保所有value是唯一的; 否则会出现问题
|
|
28293
|
-
data: {
|
|
28294
|
-
type: Array,
|
|
28295
|
-
default: () => []
|
|
28296
|
-
},
|
|
28297
|
-
emptyText: {
|
|
28298
|
-
type: String,
|
|
28299
|
-
default: "暂无数据"
|
|
28300
|
-
},
|
|
28301
|
-
renderAfterExpand: {
|
|
28302
|
-
type: Boolean,
|
|
28303
|
-
default: true
|
|
28304
|
-
},
|
|
28305
|
-
checkStrictly: {
|
|
28306
|
-
type: Boolean,
|
|
28307
|
-
default: false
|
|
28308
|
-
},
|
|
28309
|
-
defaultExpandAll: Boolean,
|
|
28310
|
-
expandOnClickNode: {
|
|
28311
|
-
type: Boolean,
|
|
28312
|
-
default: true
|
|
28313
|
-
},
|
|
28314
|
-
checkOnClickNode: Boolean,
|
|
28315
|
-
checkDescendants: {
|
|
28316
|
-
type: Boolean,
|
|
28317
|
-
default: false
|
|
28316
|
+
node: {
|
|
28317
|
+
type: Object,
|
|
28318
|
+
default: () => ({})
|
|
28318
28319
|
},
|
|
28319
|
-
|
|
28320
|
+
renderNodeLabel: Function,
|
|
28321
|
+
renderNodeAfterExpand: {
|
|
28320
28322
|
type: Boolean,
|
|
28321
28323
|
default: true
|
|
28322
28324
|
},
|
|
28323
|
-
// checkedValues -> modelValue
|
|
28324
|
-
modelValue: [String, Number, Array],
|
|
28325
|
-
// Value[]
|
|
28326
|
-
expandedValues: {
|
|
28327
|
-
type: Array,
|
|
28328
|
-
default: () => []
|
|
28329
|
-
},
|
|
28330
|
-
currentNodeValue: [String, Number],
|
|
28331
|
-
render: Function,
|
|
28332
28325
|
showCheckbox: {
|
|
28333
28326
|
type: Boolean,
|
|
28334
28327
|
default: false
|
|
28335
28328
|
},
|
|
28336
|
-
draggable: {
|
|
28337
|
-
type: Boolean,
|
|
28338
|
-
default: false
|
|
28339
|
-
},
|
|
28340
|
-
allowDrag: Function,
|
|
28341
|
-
allowDrop: Function,
|
|
28342
|
-
lazy: {
|
|
28343
|
-
type: Boolean,
|
|
28344
|
-
default: false
|
|
28345
|
-
},
|
|
28346
|
-
highlightCurrent: Boolean,
|
|
28347
|
-
loadData: Function,
|
|
28348
|
-
filterNode: Function,
|
|
28349
28329
|
accordion: {
|
|
28350
28330
|
type: Boolean,
|
|
28351
28331
|
default: false
|
|
28352
28332
|
},
|
|
28353
|
-
indent: {
|
|
28354
|
-
type: Number,
|
|
28355
|
-
default: 18
|
|
28356
|
-
},
|
|
28357
|
-
iconClass: String,
|
|
28358
|
-
keyValue: {
|
|
28359
|
-
type: Object,
|
|
28360
|
-
default: () => KEY_VALUE
|
|
28361
|
-
},
|
|
28362
28333
|
allowDispatch: {
|
|
28363
28334
|
type: Boolean,
|
|
28364
28335
|
default: true
|
|
28365
28336
|
}
|
|
28366
28337
|
};
|
|
28367
|
-
const treeKeys$1 = [
|
|
28368
|
-
"render",
|
|
28369
|
-
"renderAfterExpand",
|
|
28370
|
-
"showCheckbox",
|
|
28371
|
-
"accordion",
|
|
28372
|
-
"allowDispatch"
|
|
28373
|
-
];
|
|
28374
|
-
const props$3 = {
|
|
28375
|
-
...pick(props$4, treeKeys$1),
|
|
28376
|
-
node: {
|
|
28377
|
-
type: Object,
|
|
28378
|
-
default: () => ({})
|
|
28379
|
-
}
|
|
28380
|
-
};
|
|
28381
28338
|
const COMPONENT_NAME$5 = "vc-tree-node";
|
|
28382
28339
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
28383
28340
|
name: COMPONENT_NAME$5,
|
|
28384
|
-
props: props$
|
|
28341
|
+
props: props$4,
|
|
28385
28342
|
emits: ["node-expand"],
|
|
28386
28343
|
setup(props2, {
|
|
28387
28344
|
emit
|
|
@@ -28555,20 +28512,20 @@
|
|
|
28555
28512
|
}, null), node.states.loading && vue.createVNode(Spin, {
|
|
28556
28513
|
"size": 12,
|
|
28557
28514
|
"class": "vc-tree-node__loading-icon"
|
|
28558
|
-
}, null), props2.
|
|
28559
|
-
"render": props2.
|
|
28515
|
+
}, null), props2.renderNodeLabel ? vue.createVNode(Customer, {
|
|
28516
|
+
"render": props2.renderNodeLabel,
|
|
28560
28517
|
"store": node,
|
|
28561
28518
|
"row": node.states.data
|
|
28562
28519
|
}, null) : vue.createVNode("span", null, [node.getter.label])]), vue.createVNode(TransitionCollapse, null, {
|
|
28563
|
-
default: () => [(!props2.
|
|
28520
|
+
default: () => [(!props2.renderNodeAfterExpand || childNodeRendered.value) && vue.withDirectives(vue.createVNode("div", {
|
|
28564
28521
|
"aria-expanded": expanded.value,
|
|
28565
28522
|
"class": "vc-tree-node__children",
|
|
28566
28523
|
"role": "group"
|
|
28567
28524
|
}, [node.childNodes.map((child) => {
|
|
28568
28525
|
return vue.createVNode(TreeNodeContent, {
|
|
28569
28526
|
"key": getNodeKey(child),
|
|
28570
|
-
"
|
|
28571
|
-
"
|
|
28527
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
28528
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28572
28529
|
"showCheckbox": props2.showCheckbox,
|
|
28573
28530
|
"allowDispatch": props2.allowDispatch,
|
|
28574
28531
|
"accordion": props2.accordion,
|
|
@@ -28794,10 +28751,89 @@
|
|
|
28794
28751
|
treeItemArray
|
|
28795
28752
|
};
|
|
28796
28753
|
};
|
|
28754
|
+
const selectKeys = [
|
|
28755
|
+
"separator",
|
|
28756
|
+
"numerable",
|
|
28757
|
+
"nullValue"
|
|
28758
|
+
];
|
|
28759
|
+
const treeNodeContentKeys = [
|
|
28760
|
+
"renderNodeLabel",
|
|
28761
|
+
"renderNodeAfterExpand",
|
|
28762
|
+
"showCheckbox",
|
|
28763
|
+
"accordion",
|
|
28764
|
+
"allowDispatch"
|
|
28765
|
+
];
|
|
28766
|
+
const props$3 = {
|
|
28767
|
+
...pick(props$19, selectKeys),
|
|
28768
|
+
...pick(props$4, treeNodeContentKeys),
|
|
28769
|
+
// 暂不支持,仅作为默认值
|
|
28770
|
+
max: {
|
|
28771
|
+
type: Number,
|
|
28772
|
+
default: Infinity,
|
|
28773
|
+
validator: (v) => v >= 1
|
|
28774
|
+
},
|
|
28775
|
+
// 确保所有value是唯一的; 否则会出现问题
|
|
28776
|
+
data: {
|
|
28777
|
+
type: Array,
|
|
28778
|
+
default: () => []
|
|
28779
|
+
},
|
|
28780
|
+
emptyText: {
|
|
28781
|
+
type: String,
|
|
28782
|
+
default: "暂无数据"
|
|
28783
|
+
},
|
|
28784
|
+
checkStrictly: {
|
|
28785
|
+
type: Boolean,
|
|
28786
|
+
default: false
|
|
28787
|
+
},
|
|
28788
|
+
defaultExpandAll: Boolean,
|
|
28789
|
+
expandOnClickNode: {
|
|
28790
|
+
type: Boolean,
|
|
28791
|
+
default: true
|
|
28792
|
+
},
|
|
28793
|
+
checkOnClickNode: Boolean,
|
|
28794
|
+
checkDescendants: {
|
|
28795
|
+
type: Boolean,
|
|
28796
|
+
default: false
|
|
28797
|
+
},
|
|
28798
|
+
autoExpandParent: {
|
|
28799
|
+
type: Boolean,
|
|
28800
|
+
default: true
|
|
28801
|
+
},
|
|
28802
|
+
// checkedValues -> modelValue
|
|
28803
|
+
modelValue: [String, Number, Array],
|
|
28804
|
+
// Value[]
|
|
28805
|
+
expandedValues: {
|
|
28806
|
+
type: Array,
|
|
28807
|
+
default: () => []
|
|
28808
|
+
},
|
|
28809
|
+
currentNodeValue: [String, Number],
|
|
28810
|
+
draggable: {
|
|
28811
|
+
type: Boolean,
|
|
28812
|
+
default: false
|
|
28813
|
+
},
|
|
28814
|
+
allowDrag: Function,
|
|
28815
|
+
allowDrop: Function,
|
|
28816
|
+
lazy: {
|
|
28817
|
+
type: Boolean,
|
|
28818
|
+
default: false
|
|
28819
|
+
},
|
|
28820
|
+
highlightCurrent: Boolean,
|
|
28821
|
+
loadData: Function,
|
|
28822
|
+
filterNode: Function,
|
|
28823
|
+
indent: {
|
|
28824
|
+
type: Number,
|
|
28825
|
+
default: 18
|
|
28826
|
+
},
|
|
28827
|
+
iconClass: String,
|
|
28828
|
+
keyValue: {
|
|
28829
|
+
type: Object,
|
|
28830
|
+
default: () => KEY_VALUE
|
|
28831
|
+
}
|
|
28832
|
+
};
|
|
28797
28833
|
const COMPONENT_NAME$4 = "vc-tree";
|
|
28798
28834
|
const Tree2 = /* @__PURE__ */ vue.defineComponent({
|
|
28799
28835
|
name: COMPONENT_NAME$4,
|
|
28800
|
-
props: props$
|
|
28836
|
+
props: props$3,
|
|
28801
28837
|
emits: ["update:modelValue", "change", "check-change", "current-change", "node-click", "node-contextmenu", "node-collapse", "node-expand", "check", "node-drag-start", "node-drag-end", "node-drop", "node-drag-leave", "node-drag-enter", "node-drag-over"],
|
|
28802
28838
|
setup(props2, {
|
|
28803
28839
|
expose,
|
|
@@ -28971,8 +29007,8 @@
|
|
|
28971
29007
|
}, [root.childNodes.map((child) => {
|
|
28972
29008
|
return vue.createVNode(TreeNodeContent, {
|
|
28973
29009
|
"key": getNodeKey(child),
|
|
28974
|
-
"
|
|
28975
|
-
"
|
|
29010
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29011
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28976
29012
|
"showCheckbox": props2.showCheckbox,
|
|
28977
29013
|
"allowDispatch": props2.allowDispatch,
|
|
28978
29014
|
"accordion": props2.accordion,
|
|
@@ -28993,11 +29029,12 @@
|
|
|
28993
29029
|
const treeKeys = [
|
|
28994
29030
|
"checkStrictly",
|
|
28995
29031
|
"data",
|
|
28996
|
-
"max"
|
|
29032
|
+
"max",
|
|
29033
|
+
"renderNodeLabel"
|
|
28997
29034
|
];
|
|
28998
29035
|
const props$2 = {
|
|
28999
29036
|
...props$19,
|
|
29000
|
-
...pick(props$
|
|
29037
|
+
...pick(props$3, treeKeys)
|
|
29001
29038
|
};
|
|
29002
29039
|
const COMPONENT_NAME$3 = "vc-tree-select";
|
|
29003
29040
|
const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -29208,6 +29245,7 @@
|
|
|
29208
29245
|
"checkStrictly": props2.checkStrictly,
|
|
29209
29246
|
"allowDispatch": false,
|
|
29210
29247
|
"showCheckbox": true,
|
|
29248
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29211
29249
|
"onChange": handleChange
|
|
29212
29250
|
}, null)]
|
|
29213
29251
|
})]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deot/vc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@deot/vc-components": "^1.0.
|
|
23
|
-
"@deot/vc-hooks": "^1.0.
|
|
24
|
-
"@deot/vc-shared": "^1.0.
|
|
22
|
+
"@deot/vc-components": "^1.0.41",
|
|
23
|
+
"@deot/vc-hooks": "^1.0.41",
|
|
24
|
+
"@deot/vc-shared": "^1.0.41"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"vue": "*"
|