@deot/vc 1.0.39 → 1.0.40
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 +169 -132
- package/dist/index.umd.cjs +169 -132
- 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,
|
|
@@ -11549,7 +11549,7 @@ var Vc = (function (exports, vue) {
|
|
|
11549
11549
|
if (container && e.target && !container.contains(e.target) && !path?.some((item) => utils.eleInRegExp(item, aliveRegExp))) {
|
|
11550
11550
|
/* istanbul ignore else -- @preserve */
|
|
11551
11551
|
if (leaf.wrapper && leaf.wrapper?.[aliveVisibleKey]) {
|
|
11552
|
-
leaf.wrapper[aliveVisibleKey] = false;
|
|
11552
|
+
typeof leaf.wrapper[aliveVisibleKey] === "function" ? leaf.wrapper[aliveVisibleKey](false) : leaf.wrapper[aliveVisibleKey] = false;
|
|
11553
11553
|
}
|
|
11554
11554
|
leaveDelay ? setTimeout($onDestroyed, leaveDelay) : $onDestroyed();
|
|
11555
11555
|
}
|
|
@@ -12140,6 +12140,8 @@ var Vc = (function (exports, vue) {
|
|
|
12140
12140
|
const props$19 = {
|
|
12141
12141
|
...pick(props$1c, popoverKeys$1),
|
|
12142
12142
|
...pick(props$1g, inputKeys$2),
|
|
12143
|
+
renderOption: [Function],
|
|
12144
|
+
renderOptionGroup: [Function],
|
|
12143
12145
|
data: {
|
|
12144
12146
|
type: Array,
|
|
12145
12147
|
default: () => []
|
|
@@ -13449,7 +13451,7 @@ var Vc = (function (exports, vue) {
|
|
|
13449
13451
|
default: true
|
|
13450
13452
|
}
|
|
13451
13453
|
};
|
|
13452
|
-
function _isSlot$
|
|
13454
|
+
function _isSlot$2(s) {
|
|
13453
13455
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13454
13456
|
}
|
|
13455
13457
|
const COMPONENT_NAME$1w = "vc-expand";
|
|
@@ -13473,7 +13475,7 @@ var Vc = (function (exports, vue) {
|
|
|
13473
13475
|
enter: 200,
|
|
13474
13476
|
leave: 200
|
|
13475
13477
|
}
|
|
13476
|
-
}, _isSlot$
|
|
13478
|
+
}, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
|
|
13477
13479
|
default: () => [(props2.alive || !props2.alive && isActive.value) && slots.default?.()]
|
|
13478
13480
|
}), [[vue.vShow, isActive.value]])) ? _slot : {
|
|
13479
13481
|
default: () => [_slot]
|
|
@@ -13609,7 +13611,7 @@ var Vc = (function (exports, vue) {
|
|
|
13609
13611
|
const formatter = (format, arr) => {
|
|
13610
13612
|
return format.replace("DD", arr[0]).replace("HH", arr[1]).replace("mm", arr[2]).replace("ss", arr[3]).replace("SSS", arr[4]);
|
|
13611
13613
|
};
|
|
13612
|
-
function _isSlot$
|
|
13614
|
+
function _isSlot$1(s) {
|
|
13613
13615
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13614
13616
|
}
|
|
13615
13617
|
const COMPONENT_NAME$1t = "vc-countdown";
|
|
@@ -13738,7 +13740,7 @@ var Vc = (function (exports, vue) {
|
|
|
13738
13740
|
// @ts-ignore
|
|
13739
13741
|
vue.createVNode(Content, {
|
|
13740
13742
|
"class": "vc-countdown"
|
|
13741
|
-
}, _isSlot$
|
|
13743
|
+
}, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
|
|
13742
13744
|
default: () => [_slot]
|
|
13743
13745
|
})
|
|
13744
13746
|
);
|
|
@@ -20662,7 +20664,9 @@ var Vc = (function (exports, vue) {
|
|
|
20662
20664
|
filterable: {
|
|
20663
20665
|
type: Boolean,
|
|
20664
20666
|
default: true
|
|
20665
|
-
}
|
|
20667
|
+
},
|
|
20668
|
+
render: [Function],
|
|
20669
|
+
row: Object
|
|
20666
20670
|
};
|
|
20667
20671
|
const COMPONENT_NAME$J = "vc-select-option";
|
|
20668
20672
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20676,7 +20680,7 @@ var Vc = (function (exports, vue) {
|
|
|
20676
20680
|
const v = String(props2.label || props2.value);
|
|
20677
20681
|
return v.trim();
|
|
20678
20682
|
});
|
|
20679
|
-
const
|
|
20683
|
+
const isChecked = vue.computed(() => {
|
|
20680
20684
|
const {
|
|
20681
20685
|
current
|
|
20682
20686
|
} = owner.exposed;
|
|
@@ -20693,13 +20697,22 @@ var Vc = (function (exports, vue) {
|
|
|
20693
20697
|
const regex = owner.exposed.searchRegex.value;
|
|
20694
20698
|
return regex.test(formatterLabel.value) || !props2.filterable;
|
|
20695
20699
|
});
|
|
20696
|
-
const
|
|
20697
|
-
|
|
20700
|
+
const customOptions = vue.computed(() => {
|
|
20701
|
+
return {
|
|
20702
|
+
store: {
|
|
20703
|
+
last: isLast.value,
|
|
20704
|
+
checked: isChecked.value,
|
|
20705
|
+
click: handleClick
|
|
20706
|
+
},
|
|
20707
|
+
row: props2.row
|
|
20708
|
+
};
|
|
20709
|
+
});
|
|
20710
|
+
const handleClick = () => {
|
|
20698
20711
|
if (props2.disabled) return;
|
|
20699
|
-
if (!owner.exposed.multiple.value &&
|
|
20712
|
+
if (!owner.exposed.multiple.value && isChecked.value) {
|
|
20700
20713
|
owner.exposed.close();
|
|
20701
20714
|
return;
|
|
20702
|
-
} else if (
|
|
20715
|
+
} else if (isChecked.value) {
|
|
20703
20716
|
owner.exposed.remove(props2.value, formatterLabel.value);
|
|
20704
20717
|
return;
|
|
20705
20718
|
}
|
|
@@ -20710,15 +20723,17 @@ var Vc = (function (exports, vue) {
|
|
|
20710
20723
|
};
|
|
20711
20724
|
return () => {
|
|
20712
20725
|
if (!isActive.value) return;
|
|
20713
|
-
return vue.createVNode(
|
|
20726
|
+
return typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20727
|
+
"render": props2.render
|
|
20728
|
+
}, customOptions.value), null) : slots.default ? slots.default(customOptions.value) : vue.createVNode("div", {
|
|
20714
20729
|
"disabled": props2.disabled && "disabled",
|
|
20715
20730
|
"class": [{
|
|
20716
|
-
"is-select":
|
|
20731
|
+
"is-select": isChecked.value,
|
|
20717
20732
|
"is-last": isLast.value
|
|
20718
20733
|
}, "vc-select-option"],
|
|
20719
|
-
"onClick":
|
|
20734
|
+
"onClick": vue.withModifiers(handleClick, ["stop"]),
|
|
20720
20735
|
"onMousedown": handlePrevent
|
|
20721
|
-
}, [
|
|
20736
|
+
}, [formatterLabel.value, isChecked.value && vue.createVNode(Icon, {
|
|
20722
20737
|
"type": "correct"
|
|
20723
20738
|
}, null)]);
|
|
20724
20739
|
};
|
|
@@ -20731,7 +20746,9 @@ var Vc = (function (exports, vue) {
|
|
|
20731
20746
|
},
|
|
20732
20747
|
label: {
|
|
20733
20748
|
type: [String, Number]
|
|
20734
|
-
}
|
|
20749
|
+
},
|
|
20750
|
+
row: Object,
|
|
20751
|
+
render: [Function]
|
|
20735
20752
|
};
|
|
20736
20753
|
const COMPONENT_NAME$I = "vc-select-option-group";
|
|
20737
20754
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20744,18 +20761,24 @@ var Vc = (function (exports, vue) {
|
|
|
20744
20761
|
const v = String(props2.label || props2.value);
|
|
20745
20762
|
return v.trim();
|
|
20746
20763
|
});
|
|
20764
|
+
const customOptions = vue.computed(() => {
|
|
20765
|
+
return {
|
|
20766
|
+
row: props2.row
|
|
20767
|
+
};
|
|
20768
|
+
});
|
|
20747
20769
|
return () => {
|
|
20748
20770
|
return vue.createVNode("div", {
|
|
20749
20771
|
"class": "vc-select-option-group"
|
|
20750
|
-
}, [vue.createVNode(
|
|
20772
|
+
}, [typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20773
|
+
"render": props2.render
|
|
20774
|
+
}, customOptions.value), null) : slots.title ? slots.title({
|
|
20775
|
+
row: props2.row
|
|
20776
|
+
}) : vue.createVNode("div", {
|
|
20751
20777
|
"class": "vc-select-option-group__title"
|
|
20752
20778
|
}, [formatterLabel.value]), vue.createVNode("div", null, [slots?.default?.()])]);
|
|
20753
20779
|
};
|
|
20754
20780
|
}
|
|
20755
20781
|
});
|
|
20756
|
-
function _isSlot$1(s) {
|
|
20757
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
20758
|
-
}
|
|
20759
20782
|
const COMPONENT_NAME$H = "vc-select";
|
|
20760
20783
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
20761
20784
|
name: COMPONENT_NAME$H,
|
|
@@ -20971,29 +20994,41 @@ var Vc = (function (exports, vue) {
|
|
|
20971
20994
|
"max-height": "200px"
|
|
20972
20995
|
}, {
|
|
20973
20996
|
default: () => [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
|
|
20974
|
-
|
|
20975
|
-
|
|
20997
|
+
return Array.isArray(item.children) && item.children.length ? vue.createVNode(OptionGroup, {
|
|
20998
|
+
"row": item,
|
|
20976
20999
|
"value": item.value,
|
|
20977
21000
|
"label": item.label,
|
|
20978
|
-
"key": item.value
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
21001
|
+
"key": item.value,
|
|
21002
|
+
"render": props2.renderOptionGroup
|
|
21003
|
+
}, {
|
|
21004
|
+
title: slots?.optionGroup,
|
|
21005
|
+
default: () => {
|
|
21006
|
+
return item.children.map(($item) => {
|
|
21007
|
+
return vue.createVNode(Option, {
|
|
21008
|
+
"key": $item.value,
|
|
21009
|
+
"row": $item,
|
|
21010
|
+
"value": $item.value,
|
|
21011
|
+
"label": $item.label,
|
|
21012
|
+
"disabled": $item.disabled,
|
|
21013
|
+
"filterable": $item.filterable,
|
|
21014
|
+
"render": props2.renderOption
|
|
21015
|
+
}, {
|
|
21016
|
+
default: slots?.option
|
|
21017
|
+
});
|
|
21018
|
+
});
|
|
21019
|
+
}
|
|
20989
21020
|
}) : vue.createVNode(Option, {
|
|
20990
21021
|
"key": item.value,
|
|
21022
|
+
"row": item,
|
|
20991
21023
|
"value": item.value,
|
|
20992
21024
|
"label": item.label,
|
|
20993
21025
|
"disabled": item.disabled,
|
|
20994
|
-
"filterable": item.filterable
|
|
20995
|
-
|
|
20996
|
-
|
|
21026
|
+
"filterable": item.filterable,
|
|
21027
|
+
"render": props2.renderOption
|
|
21028
|
+
}, {
|
|
21029
|
+
default: slots?.option
|
|
21030
|
+
});
|
|
21031
|
+
})]) : slots?.default?.()]
|
|
20997
21032
|
})]);
|
|
20998
21033
|
}
|
|
20999
21034
|
});
|
|
@@ -28273,112 +28308,33 @@ var Vc = (function (exports, vue) {
|
|
|
28273
28308
|
}
|
|
28274
28309
|
};
|
|
28275
28310
|
};
|
|
28276
|
-
const selectKeys = [
|
|
28277
|
-
"separator",
|
|
28278
|
-
"numerable",
|
|
28279
|
-
"nullValue"
|
|
28280
|
-
];
|
|
28281
28311
|
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
|
|
28312
|
+
node: {
|
|
28313
|
+
type: Object,
|
|
28314
|
+
default: () => ({})
|
|
28315
28315
|
},
|
|
28316
|
-
|
|
28316
|
+
renderNodeLabel: Function,
|
|
28317
|
+
renderNodeAfterExpand: {
|
|
28317
28318
|
type: Boolean,
|
|
28318
28319
|
default: true
|
|
28319
28320
|
},
|
|
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
28321
|
showCheckbox: {
|
|
28330
28322
|
type: Boolean,
|
|
28331
28323
|
default: false
|
|
28332
28324
|
},
|
|
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
28325
|
accordion: {
|
|
28347
28326
|
type: Boolean,
|
|
28348
28327
|
default: false
|
|
28349
28328
|
},
|
|
28350
|
-
indent: {
|
|
28351
|
-
type: Number,
|
|
28352
|
-
default: 18
|
|
28353
|
-
},
|
|
28354
|
-
iconClass: String,
|
|
28355
|
-
keyValue: {
|
|
28356
|
-
type: Object,
|
|
28357
|
-
default: () => KEY_VALUE
|
|
28358
|
-
},
|
|
28359
28329
|
allowDispatch: {
|
|
28360
28330
|
type: Boolean,
|
|
28361
28331
|
default: true
|
|
28362
28332
|
}
|
|
28363
28333
|
};
|
|
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
28334
|
const COMPONENT_NAME$5 = "vc-tree-node";
|
|
28379
28335
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
28380
28336
|
name: COMPONENT_NAME$5,
|
|
28381
|
-
props: props$
|
|
28337
|
+
props: props$4,
|
|
28382
28338
|
emits: ["node-expand"],
|
|
28383
28339
|
setup(props2, {
|
|
28384
28340
|
emit
|
|
@@ -28552,20 +28508,20 @@ var Vc = (function (exports, vue) {
|
|
|
28552
28508
|
}, null), node.states.loading && vue.createVNode(Spin, {
|
|
28553
28509
|
"size": 12,
|
|
28554
28510
|
"class": "vc-tree-node__loading-icon"
|
|
28555
|
-
}, null), props2.
|
|
28556
|
-
"render": props2.
|
|
28511
|
+
}, null), props2.renderNodeLabel ? vue.createVNode(Customer, {
|
|
28512
|
+
"render": props2.renderNodeLabel,
|
|
28557
28513
|
"store": node,
|
|
28558
28514
|
"row": node.states.data
|
|
28559
28515
|
}, null) : vue.createVNode("span", null, [node.getter.label])]), vue.createVNode(TransitionCollapse, null, {
|
|
28560
|
-
default: () => [(!props2.
|
|
28516
|
+
default: () => [(!props2.renderNodeAfterExpand || childNodeRendered.value) && vue.withDirectives(vue.createVNode("div", {
|
|
28561
28517
|
"aria-expanded": expanded.value,
|
|
28562
28518
|
"class": "vc-tree-node__children",
|
|
28563
28519
|
"role": "group"
|
|
28564
28520
|
}, [node.childNodes.map((child) => {
|
|
28565
28521
|
return vue.createVNode(TreeNodeContent, {
|
|
28566
28522
|
"key": getNodeKey(child),
|
|
28567
|
-
"
|
|
28568
|
-
"
|
|
28523
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
28524
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28569
28525
|
"showCheckbox": props2.showCheckbox,
|
|
28570
28526
|
"allowDispatch": props2.allowDispatch,
|
|
28571
28527
|
"accordion": props2.accordion,
|
|
@@ -28791,10 +28747,89 @@ var Vc = (function (exports, vue) {
|
|
|
28791
28747
|
treeItemArray
|
|
28792
28748
|
};
|
|
28793
28749
|
};
|
|
28750
|
+
const selectKeys = [
|
|
28751
|
+
"separator",
|
|
28752
|
+
"numerable",
|
|
28753
|
+
"nullValue"
|
|
28754
|
+
];
|
|
28755
|
+
const treeNodeContentKeys = [
|
|
28756
|
+
"renderNodeLabel",
|
|
28757
|
+
"renderNodeAfterExpand",
|
|
28758
|
+
"showCheckbox",
|
|
28759
|
+
"accordion",
|
|
28760
|
+
"allowDispatch"
|
|
28761
|
+
];
|
|
28762
|
+
const props$3 = {
|
|
28763
|
+
...pick(props$19, selectKeys),
|
|
28764
|
+
...pick(props$4, treeNodeContentKeys),
|
|
28765
|
+
// 暂不支持,仅作为默认值
|
|
28766
|
+
max: {
|
|
28767
|
+
type: Number,
|
|
28768
|
+
default: Infinity,
|
|
28769
|
+
validator: (v) => v >= 1
|
|
28770
|
+
},
|
|
28771
|
+
// 确保所有value是唯一的; 否则会出现问题
|
|
28772
|
+
data: {
|
|
28773
|
+
type: Array,
|
|
28774
|
+
default: () => []
|
|
28775
|
+
},
|
|
28776
|
+
emptyText: {
|
|
28777
|
+
type: String,
|
|
28778
|
+
default: "暂无数据"
|
|
28779
|
+
},
|
|
28780
|
+
checkStrictly: {
|
|
28781
|
+
type: Boolean,
|
|
28782
|
+
default: false
|
|
28783
|
+
},
|
|
28784
|
+
defaultExpandAll: Boolean,
|
|
28785
|
+
expandOnClickNode: {
|
|
28786
|
+
type: Boolean,
|
|
28787
|
+
default: true
|
|
28788
|
+
},
|
|
28789
|
+
checkOnClickNode: Boolean,
|
|
28790
|
+
checkDescendants: {
|
|
28791
|
+
type: Boolean,
|
|
28792
|
+
default: false
|
|
28793
|
+
},
|
|
28794
|
+
autoExpandParent: {
|
|
28795
|
+
type: Boolean,
|
|
28796
|
+
default: true
|
|
28797
|
+
},
|
|
28798
|
+
// checkedValues -> modelValue
|
|
28799
|
+
modelValue: [String, Number, Array],
|
|
28800
|
+
// Value[]
|
|
28801
|
+
expandedValues: {
|
|
28802
|
+
type: Array,
|
|
28803
|
+
default: () => []
|
|
28804
|
+
},
|
|
28805
|
+
currentNodeValue: [String, Number],
|
|
28806
|
+
draggable: {
|
|
28807
|
+
type: Boolean,
|
|
28808
|
+
default: false
|
|
28809
|
+
},
|
|
28810
|
+
allowDrag: Function,
|
|
28811
|
+
allowDrop: Function,
|
|
28812
|
+
lazy: {
|
|
28813
|
+
type: Boolean,
|
|
28814
|
+
default: false
|
|
28815
|
+
},
|
|
28816
|
+
highlightCurrent: Boolean,
|
|
28817
|
+
loadData: Function,
|
|
28818
|
+
filterNode: Function,
|
|
28819
|
+
indent: {
|
|
28820
|
+
type: Number,
|
|
28821
|
+
default: 18
|
|
28822
|
+
},
|
|
28823
|
+
iconClass: String,
|
|
28824
|
+
keyValue: {
|
|
28825
|
+
type: Object,
|
|
28826
|
+
default: () => KEY_VALUE
|
|
28827
|
+
}
|
|
28828
|
+
};
|
|
28794
28829
|
const COMPONENT_NAME$4 = "vc-tree";
|
|
28795
28830
|
const Tree2 = /* @__PURE__ */ vue.defineComponent({
|
|
28796
28831
|
name: COMPONENT_NAME$4,
|
|
28797
|
-
props: props$
|
|
28832
|
+
props: props$3,
|
|
28798
28833
|
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
28834
|
setup(props2, {
|
|
28800
28835
|
expose,
|
|
@@ -28968,8 +29003,8 @@ var Vc = (function (exports, vue) {
|
|
|
28968
29003
|
}, [root.childNodes.map((child) => {
|
|
28969
29004
|
return vue.createVNode(TreeNodeContent, {
|
|
28970
29005
|
"key": getNodeKey(child),
|
|
28971
|
-
"
|
|
28972
|
-
"
|
|
29006
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29007
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28973
29008
|
"showCheckbox": props2.showCheckbox,
|
|
28974
29009
|
"allowDispatch": props2.allowDispatch,
|
|
28975
29010
|
"accordion": props2.accordion,
|
|
@@ -28990,11 +29025,12 @@ var Vc = (function (exports, vue) {
|
|
|
28990
29025
|
const treeKeys = [
|
|
28991
29026
|
"checkStrictly",
|
|
28992
29027
|
"data",
|
|
28993
|
-
"max"
|
|
29028
|
+
"max",
|
|
29029
|
+
"renderNodeLabel"
|
|
28994
29030
|
];
|
|
28995
29031
|
const props$2 = {
|
|
28996
29032
|
...props$19,
|
|
28997
|
-
...pick(props$
|
|
29033
|
+
...pick(props$3, treeKeys)
|
|
28998
29034
|
};
|
|
28999
29035
|
const COMPONENT_NAME$3 = "vc-tree-select";
|
|
29000
29036
|
const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -29205,6 +29241,7 @@ var Vc = (function (exports, vue) {
|
|
|
29205
29241
|
"checkStrictly": props2.checkStrictly,
|
|
29206
29242
|
"allowDispatch": false,
|
|
29207
29243
|
"showCheckbox": true,
|
|
29244
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29208
29245
|
"onChange": handleChange
|
|
29209
29246
|
}, null)]
|
|
29210
29247
|
})]);
|
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,
|
|
@@ -11552,7 +11552,7 @@
|
|
|
11552
11552
|
if (container && e.target && !container.contains(e.target) && !path?.some((item) => utils.eleInRegExp(item, aliveRegExp))) {
|
|
11553
11553
|
/* istanbul ignore else -- @preserve */
|
|
11554
11554
|
if (leaf.wrapper && leaf.wrapper?.[aliveVisibleKey]) {
|
|
11555
|
-
leaf.wrapper[aliveVisibleKey] = false;
|
|
11555
|
+
typeof leaf.wrapper[aliveVisibleKey] === "function" ? leaf.wrapper[aliveVisibleKey](false) : leaf.wrapper[aliveVisibleKey] = false;
|
|
11556
11556
|
}
|
|
11557
11557
|
leaveDelay ? setTimeout($onDestroyed, leaveDelay) : $onDestroyed();
|
|
11558
11558
|
}
|
|
@@ -12143,6 +12143,8 @@
|
|
|
12143
12143
|
const props$19 = {
|
|
12144
12144
|
...pick(props$1c, popoverKeys$1),
|
|
12145
12145
|
...pick(props$1g, inputKeys$2),
|
|
12146
|
+
renderOption: [Function],
|
|
12147
|
+
renderOptionGroup: [Function],
|
|
12146
12148
|
data: {
|
|
12147
12149
|
type: Array,
|
|
12148
12150
|
default: () => []
|
|
@@ -13452,7 +13454,7 @@
|
|
|
13452
13454
|
default: true
|
|
13453
13455
|
}
|
|
13454
13456
|
};
|
|
13455
|
-
function _isSlot$
|
|
13457
|
+
function _isSlot$2(s) {
|
|
13456
13458
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13457
13459
|
}
|
|
13458
13460
|
const COMPONENT_NAME$1w = "vc-expand";
|
|
@@ -13476,7 +13478,7 @@
|
|
|
13476
13478
|
enter: 200,
|
|
13477
13479
|
leave: 200
|
|
13478
13480
|
}
|
|
13479
|
-
}, _isSlot$
|
|
13481
|
+
}, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
|
|
13480
13482
|
default: () => [(props2.alive || !props2.alive && isActive.value) && slots.default?.()]
|
|
13481
13483
|
}), [[vue.vShow, isActive.value]])) ? _slot : {
|
|
13482
13484
|
default: () => [_slot]
|
|
@@ -13612,7 +13614,7 @@
|
|
|
13612
13614
|
const formatter = (format, arr) => {
|
|
13613
13615
|
return format.replace("DD", arr[0]).replace("HH", arr[1]).replace("mm", arr[2]).replace("ss", arr[3]).replace("SSS", arr[4]);
|
|
13614
13616
|
};
|
|
13615
|
-
function _isSlot$
|
|
13617
|
+
function _isSlot$1(s) {
|
|
13616
13618
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13617
13619
|
}
|
|
13618
13620
|
const COMPONENT_NAME$1t = "vc-countdown";
|
|
@@ -13741,7 +13743,7 @@
|
|
|
13741
13743
|
// @ts-ignore
|
|
13742
13744
|
vue.createVNode(Content, {
|
|
13743
13745
|
"class": "vc-countdown"
|
|
13744
|
-
}, _isSlot$
|
|
13746
|
+
}, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
|
|
13745
13747
|
default: () => [_slot]
|
|
13746
13748
|
})
|
|
13747
13749
|
);
|
|
@@ -20665,7 +20667,9 @@
|
|
|
20665
20667
|
filterable: {
|
|
20666
20668
|
type: Boolean,
|
|
20667
20669
|
default: true
|
|
20668
|
-
}
|
|
20670
|
+
},
|
|
20671
|
+
render: [Function],
|
|
20672
|
+
row: Object
|
|
20669
20673
|
};
|
|
20670
20674
|
const COMPONENT_NAME$J = "vc-select-option";
|
|
20671
20675
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20679,7 +20683,7 @@
|
|
|
20679
20683
|
const v = String(props2.label || props2.value);
|
|
20680
20684
|
return v.trim();
|
|
20681
20685
|
});
|
|
20682
|
-
const
|
|
20686
|
+
const isChecked = vue.computed(() => {
|
|
20683
20687
|
const {
|
|
20684
20688
|
current
|
|
20685
20689
|
} = owner.exposed;
|
|
@@ -20696,13 +20700,22 @@
|
|
|
20696
20700
|
const regex = owner.exposed.searchRegex.value;
|
|
20697
20701
|
return regex.test(formatterLabel.value) || !props2.filterable;
|
|
20698
20702
|
});
|
|
20699
|
-
const
|
|
20700
|
-
|
|
20703
|
+
const customOptions = vue.computed(() => {
|
|
20704
|
+
return {
|
|
20705
|
+
store: {
|
|
20706
|
+
last: isLast.value,
|
|
20707
|
+
checked: isChecked.value,
|
|
20708
|
+
click: handleClick
|
|
20709
|
+
},
|
|
20710
|
+
row: props2.row
|
|
20711
|
+
};
|
|
20712
|
+
});
|
|
20713
|
+
const handleClick = () => {
|
|
20701
20714
|
if (props2.disabled) return;
|
|
20702
|
-
if (!owner.exposed.multiple.value &&
|
|
20715
|
+
if (!owner.exposed.multiple.value && isChecked.value) {
|
|
20703
20716
|
owner.exposed.close();
|
|
20704
20717
|
return;
|
|
20705
|
-
} else if (
|
|
20718
|
+
} else if (isChecked.value) {
|
|
20706
20719
|
owner.exposed.remove(props2.value, formatterLabel.value);
|
|
20707
20720
|
return;
|
|
20708
20721
|
}
|
|
@@ -20713,15 +20726,17 @@
|
|
|
20713
20726
|
};
|
|
20714
20727
|
return () => {
|
|
20715
20728
|
if (!isActive.value) return;
|
|
20716
|
-
return vue.createVNode(
|
|
20729
|
+
return typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20730
|
+
"render": props2.render
|
|
20731
|
+
}, customOptions.value), null) : slots.default ? slots.default(customOptions.value) : vue.createVNode("div", {
|
|
20717
20732
|
"disabled": props2.disabled && "disabled",
|
|
20718
20733
|
"class": [{
|
|
20719
|
-
"is-select":
|
|
20734
|
+
"is-select": isChecked.value,
|
|
20720
20735
|
"is-last": isLast.value
|
|
20721
20736
|
}, "vc-select-option"],
|
|
20722
|
-
"onClick":
|
|
20737
|
+
"onClick": vue.withModifiers(handleClick, ["stop"]),
|
|
20723
20738
|
"onMousedown": handlePrevent
|
|
20724
|
-
}, [
|
|
20739
|
+
}, [formatterLabel.value, isChecked.value && vue.createVNode(Icon, {
|
|
20725
20740
|
"type": "correct"
|
|
20726
20741
|
}, null)]);
|
|
20727
20742
|
};
|
|
@@ -20734,7 +20749,9 @@
|
|
|
20734
20749
|
},
|
|
20735
20750
|
label: {
|
|
20736
20751
|
type: [String, Number]
|
|
20737
|
-
}
|
|
20752
|
+
},
|
|
20753
|
+
row: Object,
|
|
20754
|
+
render: [Function]
|
|
20738
20755
|
};
|
|
20739
20756
|
const COMPONENT_NAME$I = "vc-select-option-group";
|
|
20740
20757
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20747,18 +20764,24 @@
|
|
|
20747
20764
|
const v = String(props2.label || props2.value);
|
|
20748
20765
|
return v.trim();
|
|
20749
20766
|
});
|
|
20767
|
+
const customOptions = vue.computed(() => {
|
|
20768
|
+
return {
|
|
20769
|
+
row: props2.row
|
|
20770
|
+
};
|
|
20771
|
+
});
|
|
20750
20772
|
return () => {
|
|
20751
20773
|
return vue.createVNode("div", {
|
|
20752
20774
|
"class": "vc-select-option-group"
|
|
20753
|
-
}, [vue.createVNode(
|
|
20775
|
+
}, [typeof props2.render === "function" ? vue.createVNode(Customer, vue.mergeProps({
|
|
20776
|
+
"render": props2.render
|
|
20777
|
+
}, customOptions.value), null) : slots.title ? slots.title({
|
|
20778
|
+
row: props2.row
|
|
20779
|
+
}) : vue.createVNode("div", {
|
|
20754
20780
|
"class": "vc-select-option-group__title"
|
|
20755
20781
|
}, [formatterLabel.value]), vue.createVNode("div", null, [slots?.default?.()])]);
|
|
20756
20782
|
};
|
|
20757
20783
|
}
|
|
20758
20784
|
});
|
|
20759
|
-
function _isSlot$1(s) {
|
|
20760
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
20761
|
-
}
|
|
20762
20785
|
const COMPONENT_NAME$H = "vc-select";
|
|
20763
20786
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
20764
20787
|
name: COMPONENT_NAME$H,
|
|
@@ -20974,29 +20997,41 @@
|
|
|
20974
20997
|
"max-height": "200px"
|
|
20975
20998
|
}, {
|
|
20976
20999
|
default: () => [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
|
|
20977
|
-
|
|
20978
|
-
|
|
21000
|
+
return Array.isArray(item.children) && item.children.length ? vue.createVNode(OptionGroup, {
|
|
21001
|
+
"row": item,
|
|
20979
21002
|
"value": item.value,
|
|
20980
21003
|
"label": item.label,
|
|
20981
|
-
"key": item.value
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
|
|
20991
|
-
|
|
21004
|
+
"key": item.value,
|
|
21005
|
+
"render": props2.renderOptionGroup
|
|
21006
|
+
}, {
|
|
21007
|
+
title: slots?.optionGroup,
|
|
21008
|
+
default: () => {
|
|
21009
|
+
return item.children.map(($item) => {
|
|
21010
|
+
return vue.createVNode(Option, {
|
|
21011
|
+
"key": $item.value,
|
|
21012
|
+
"row": $item,
|
|
21013
|
+
"value": $item.value,
|
|
21014
|
+
"label": $item.label,
|
|
21015
|
+
"disabled": $item.disabled,
|
|
21016
|
+
"filterable": $item.filterable,
|
|
21017
|
+
"render": props2.renderOption
|
|
21018
|
+
}, {
|
|
21019
|
+
default: slots?.option
|
|
21020
|
+
});
|
|
21021
|
+
});
|
|
21022
|
+
}
|
|
20992
21023
|
}) : vue.createVNode(Option, {
|
|
20993
21024
|
"key": item.value,
|
|
21025
|
+
"row": item,
|
|
20994
21026
|
"value": item.value,
|
|
20995
21027
|
"label": item.label,
|
|
20996
21028
|
"disabled": item.disabled,
|
|
20997
|
-
"filterable": item.filterable
|
|
20998
|
-
|
|
20999
|
-
|
|
21029
|
+
"filterable": item.filterable,
|
|
21030
|
+
"render": props2.renderOption
|
|
21031
|
+
}, {
|
|
21032
|
+
default: slots?.option
|
|
21033
|
+
});
|
|
21034
|
+
})]) : slots?.default?.()]
|
|
21000
21035
|
})]);
|
|
21001
21036
|
}
|
|
21002
21037
|
});
|
|
@@ -28276,112 +28311,33 @@
|
|
|
28276
28311
|
}
|
|
28277
28312
|
};
|
|
28278
28313
|
};
|
|
28279
|
-
const selectKeys = [
|
|
28280
|
-
"separator",
|
|
28281
|
-
"numerable",
|
|
28282
|
-
"nullValue"
|
|
28283
|
-
];
|
|
28284
28314
|
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
|
|
28315
|
+
node: {
|
|
28316
|
+
type: Object,
|
|
28317
|
+
default: () => ({})
|
|
28318
28318
|
},
|
|
28319
|
-
|
|
28319
|
+
renderNodeLabel: Function,
|
|
28320
|
+
renderNodeAfterExpand: {
|
|
28320
28321
|
type: Boolean,
|
|
28321
28322
|
default: true
|
|
28322
28323
|
},
|
|
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
28324
|
showCheckbox: {
|
|
28333
28325
|
type: Boolean,
|
|
28334
28326
|
default: false
|
|
28335
28327
|
},
|
|
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
28328
|
accordion: {
|
|
28350
28329
|
type: Boolean,
|
|
28351
28330
|
default: false
|
|
28352
28331
|
},
|
|
28353
|
-
indent: {
|
|
28354
|
-
type: Number,
|
|
28355
|
-
default: 18
|
|
28356
|
-
},
|
|
28357
|
-
iconClass: String,
|
|
28358
|
-
keyValue: {
|
|
28359
|
-
type: Object,
|
|
28360
|
-
default: () => KEY_VALUE
|
|
28361
|
-
},
|
|
28362
28332
|
allowDispatch: {
|
|
28363
28333
|
type: Boolean,
|
|
28364
28334
|
default: true
|
|
28365
28335
|
}
|
|
28366
28336
|
};
|
|
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
28337
|
const COMPONENT_NAME$5 = "vc-tree-node";
|
|
28382
28338
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
28383
28339
|
name: COMPONENT_NAME$5,
|
|
28384
|
-
props: props$
|
|
28340
|
+
props: props$4,
|
|
28385
28341
|
emits: ["node-expand"],
|
|
28386
28342
|
setup(props2, {
|
|
28387
28343
|
emit
|
|
@@ -28555,20 +28511,20 @@
|
|
|
28555
28511
|
}, null), node.states.loading && vue.createVNode(Spin, {
|
|
28556
28512
|
"size": 12,
|
|
28557
28513
|
"class": "vc-tree-node__loading-icon"
|
|
28558
|
-
}, null), props2.
|
|
28559
|
-
"render": props2.
|
|
28514
|
+
}, null), props2.renderNodeLabel ? vue.createVNode(Customer, {
|
|
28515
|
+
"render": props2.renderNodeLabel,
|
|
28560
28516
|
"store": node,
|
|
28561
28517
|
"row": node.states.data
|
|
28562
28518
|
}, null) : vue.createVNode("span", null, [node.getter.label])]), vue.createVNode(TransitionCollapse, null, {
|
|
28563
|
-
default: () => [(!props2.
|
|
28519
|
+
default: () => [(!props2.renderNodeAfterExpand || childNodeRendered.value) && vue.withDirectives(vue.createVNode("div", {
|
|
28564
28520
|
"aria-expanded": expanded.value,
|
|
28565
28521
|
"class": "vc-tree-node__children",
|
|
28566
28522
|
"role": "group"
|
|
28567
28523
|
}, [node.childNodes.map((child) => {
|
|
28568
28524
|
return vue.createVNode(TreeNodeContent, {
|
|
28569
28525
|
"key": getNodeKey(child),
|
|
28570
|
-
"
|
|
28571
|
-
"
|
|
28526
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
28527
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28572
28528
|
"showCheckbox": props2.showCheckbox,
|
|
28573
28529
|
"allowDispatch": props2.allowDispatch,
|
|
28574
28530
|
"accordion": props2.accordion,
|
|
@@ -28794,10 +28750,89 @@
|
|
|
28794
28750
|
treeItemArray
|
|
28795
28751
|
};
|
|
28796
28752
|
};
|
|
28753
|
+
const selectKeys = [
|
|
28754
|
+
"separator",
|
|
28755
|
+
"numerable",
|
|
28756
|
+
"nullValue"
|
|
28757
|
+
];
|
|
28758
|
+
const treeNodeContentKeys = [
|
|
28759
|
+
"renderNodeLabel",
|
|
28760
|
+
"renderNodeAfterExpand",
|
|
28761
|
+
"showCheckbox",
|
|
28762
|
+
"accordion",
|
|
28763
|
+
"allowDispatch"
|
|
28764
|
+
];
|
|
28765
|
+
const props$3 = {
|
|
28766
|
+
...pick(props$19, selectKeys),
|
|
28767
|
+
...pick(props$4, treeNodeContentKeys),
|
|
28768
|
+
// 暂不支持,仅作为默认值
|
|
28769
|
+
max: {
|
|
28770
|
+
type: Number,
|
|
28771
|
+
default: Infinity,
|
|
28772
|
+
validator: (v) => v >= 1
|
|
28773
|
+
},
|
|
28774
|
+
// 确保所有value是唯一的; 否则会出现问题
|
|
28775
|
+
data: {
|
|
28776
|
+
type: Array,
|
|
28777
|
+
default: () => []
|
|
28778
|
+
},
|
|
28779
|
+
emptyText: {
|
|
28780
|
+
type: String,
|
|
28781
|
+
default: "暂无数据"
|
|
28782
|
+
},
|
|
28783
|
+
checkStrictly: {
|
|
28784
|
+
type: Boolean,
|
|
28785
|
+
default: false
|
|
28786
|
+
},
|
|
28787
|
+
defaultExpandAll: Boolean,
|
|
28788
|
+
expandOnClickNode: {
|
|
28789
|
+
type: Boolean,
|
|
28790
|
+
default: true
|
|
28791
|
+
},
|
|
28792
|
+
checkOnClickNode: Boolean,
|
|
28793
|
+
checkDescendants: {
|
|
28794
|
+
type: Boolean,
|
|
28795
|
+
default: false
|
|
28796
|
+
},
|
|
28797
|
+
autoExpandParent: {
|
|
28798
|
+
type: Boolean,
|
|
28799
|
+
default: true
|
|
28800
|
+
},
|
|
28801
|
+
// checkedValues -> modelValue
|
|
28802
|
+
modelValue: [String, Number, Array],
|
|
28803
|
+
// Value[]
|
|
28804
|
+
expandedValues: {
|
|
28805
|
+
type: Array,
|
|
28806
|
+
default: () => []
|
|
28807
|
+
},
|
|
28808
|
+
currentNodeValue: [String, Number],
|
|
28809
|
+
draggable: {
|
|
28810
|
+
type: Boolean,
|
|
28811
|
+
default: false
|
|
28812
|
+
},
|
|
28813
|
+
allowDrag: Function,
|
|
28814
|
+
allowDrop: Function,
|
|
28815
|
+
lazy: {
|
|
28816
|
+
type: Boolean,
|
|
28817
|
+
default: false
|
|
28818
|
+
},
|
|
28819
|
+
highlightCurrent: Boolean,
|
|
28820
|
+
loadData: Function,
|
|
28821
|
+
filterNode: Function,
|
|
28822
|
+
indent: {
|
|
28823
|
+
type: Number,
|
|
28824
|
+
default: 18
|
|
28825
|
+
},
|
|
28826
|
+
iconClass: String,
|
|
28827
|
+
keyValue: {
|
|
28828
|
+
type: Object,
|
|
28829
|
+
default: () => KEY_VALUE
|
|
28830
|
+
}
|
|
28831
|
+
};
|
|
28797
28832
|
const COMPONENT_NAME$4 = "vc-tree";
|
|
28798
28833
|
const Tree2 = /* @__PURE__ */ vue.defineComponent({
|
|
28799
28834
|
name: COMPONENT_NAME$4,
|
|
28800
|
-
props: props$
|
|
28835
|
+
props: props$3,
|
|
28801
28836
|
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
28837
|
setup(props2, {
|
|
28803
28838
|
expose,
|
|
@@ -28971,8 +29006,8 @@
|
|
|
28971
29006
|
}, [root.childNodes.map((child) => {
|
|
28972
29007
|
return vue.createVNode(TreeNodeContent, {
|
|
28973
29008
|
"key": getNodeKey(child),
|
|
28974
|
-
"
|
|
28975
|
-
"
|
|
29009
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29010
|
+
"renderNodeAfterExpand": props2.renderNodeAfterExpand,
|
|
28976
29011
|
"showCheckbox": props2.showCheckbox,
|
|
28977
29012
|
"allowDispatch": props2.allowDispatch,
|
|
28978
29013
|
"accordion": props2.accordion,
|
|
@@ -28993,11 +29028,12 @@
|
|
|
28993
29028
|
const treeKeys = [
|
|
28994
29029
|
"checkStrictly",
|
|
28995
29030
|
"data",
|
|
28996
|
-
"max"
|
|
29031
|
+
"max",
|
|
29032
|
+
"renderNodeLabel"
|
|
28997
29033
|
];
|
|
28998
29034
|
const props$2 = {
|
|
28999
29035
|
...props$19,
|
|
29000
|
-
...pick(props$
|
|
29036
|
+
...pick(props$3, treeKeys)
|
|
29001
29037
|
};
|
|
29002
29038
|
const COMPONENT_NAME$3 = "vc-tree-select";
|
|
29003
29039
|
const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -29208,6 +29244,7 @@
|
|
|
29208
29244
|
"checkStrictly": props2.checkStrictly,
|
|
29209
29245
|
"allowDispatch": false,
|
|
29210
29246
|
"showCheckbox": true,
|
|
29247
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
29211
29248
|
"onChange": handleChange
|
|
29212
29249
|
}, null)]
|
|
29213
29250
|
})]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deot/vc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
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.40",
|
|
23
|
+
"@deot/vc-hooks": "^1.0.40",
|
|
24
|
+
"@deot/vc-shared": "^1.0.40"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"vue": "*"
|