hzzt-plus 2.0.8 → 2.0.9
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.css +1 -1
- package/dist/index.full.js +45 -3
- package/dist/index.full.min.js +14 -14
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +14 -14
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +45 -3
- package/es/components/cascader/src/cascader.d.ts +1 -0
- package/es/components/cascader/src/cascader.mjs +4 -0
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +7 -0
- package/es/components/cascader/src/cascader2.mjs +37 -3
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +4 -0
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/lib/components/cascader/src/cascader.d.ts +1 -0
- package/lib/components/cascader/src/cascader.js +4 -0
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +7 -0
- package/lib/components/cascader/src/cascader2.js +37 -3
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +4 -0
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/package.json +1 -1
- package/theme/hzzt-cascader.css +1 -1
- package/theme/index.css +1 -1
- package/theme/src/cascader.scss +3 -0
- package/web-types.json +1 -1
package/dist/index.full.mjs
CHANGED
|
@@ -25944,6 +25944,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
25944
25944
|
emit("update:modelValue", false);
|
|
25945
25945
|
expand.value = false;
|
|
25946
25946
|
}
|
|
25947
|
+
watch(() => props.defaultActive, (v) => {
|
|
25948
|
+
emit("update:modelValue", v);
|
|
25949
|
+
expand.value = v;
|
|
25950
|
+
});
|
|
25947
25951
|
watch(() => props.modelValue, (v) => {
|
|
25948
25952
|
expand.value = v;
|
|
25949
25953
|
});
|
|
@@ -27641,6 +27645,10 @@ const cascaderProps = buildProps$1({
|
|
|
27641
27645
|
type: String,
|
|
27642
27646
|
default: ""
|
|
27643
27647
|
},
|
|
27648
|
+
joinSeparator: {
|
|
27649
|
+
type: String,
|
|
27650
|
+
default: ","
|
|
27651
|
+
},
|
|
27644
27652
|
modelValue: {
|
|
27645
27653
|
type: definePropType$1([
|
|
27646
27654
|
String
|
|
@@ -27714,7 +27722,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
27714
27722
|
clearable: props.clearable,
|
|
27715
27723
|
placeholder: props.placeholder,
|
|
27716
27724
|
readonly: props.readonly,
|
|
27717
|
-
...attrs
|
|
27725
|
+
...attrs,
|
|
27726
|
+
class: "",
|
|
27727
|
+
style: ""
|
|
27718
27728
|
}));
|
|
27719
27729
|
const _cascaderProps = computed(() => ({
|
|
27720
27730
|
options: props.options,
|
|
@@ -27728,6 +27738,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
27728
27738
|
showAllLevels: true,
|
|
27729
27739
|
...props.cascaderProps
|
|
27730
27740
|
}));
|
|
27741
|
+
const isMultiple = computed(() => {
|
|
27742
|
+
var _a;
|
|
27743
|
+
return !!((_a = _cascaderProps.value.props) == null ? void 0 : _a.multiple);
|
|
27744
|
+
});
|
|
27731
27745
|
watch(() => props.modelValue, (v) => {
|
|
27732
27746
|
inputVal.value = v;
|
|
27733
27747
|
getCascaderVal();
|
|
@@ -27751,14 +27765,42 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
27751
27765
|
target.focus();
|
|
27752
27766
|
}
|
|
27753
27767
|
function cascaderChange(val) {
|
|
27768
|
+
var _a;
|
|
27754
27769
|
const separator = _cascaderProps.value.separator || "/";
|
|
27755
|
-
|
|
27770
|
+
const joinSeparator = (_a = props.joinSeparator) != null ? _a : ",";
|
|
27771
|
+
if (isMultiple.value) {
|
|
27772
|
+
const list = isArray$1(val) ? val : [];
|
|
27773
|
+
const items = list.map((item) => {
|
|
27774
|
+
var _a2;
|
|
27775
|
+
if (isArray$1(item)) {
|
|
27776
|
+
return _cascaderProps.value.showAllLevels === false ? String((_a2 = item[item.length - 1]) != null ? _a2 : "") : item.join(separator);
|
|
27777
|
+
}
|
|
27778
|
+
return String(item != null ? item : "");
|
|
27779
|
+
});
|
|
27780
|
+
inputVal.value = items.join(joinSeparator);
|
|
27781
|
+
} else {
|
|
27782
|
+
inputVal.value = val ? isArray$1(val) ? _cascaderProps.value.showAllLevels === false ? val[val.length - 1] : val.join(separator) : [val].join(separator) : "";
|
|
27783
|
+
}
|
|
27756
27784
|
input(inputVal.value);
|
|
27757
27785
|
change(inputVal.value);
|
|
27758
27786
|
}
|
|
27759
27787
|
function getCascaderVal() {
|
|
27788
|
+
var _a;
|
|
27760
27789
|
const separator = _cascaderProps.value.separator || "/";
|
|
27761
|
-
|
|
27790
|
+
const joinSeparator = (_a = props.joinSeparator) != null ? _a : ",";
|
|
27791
|
+
if (isMultiple.value) {
|
|
27792
|
+
const raw = props.modelValue || "";
|
|
27793
|
+
if (!raw) {
|
|
27794
|
+
cascaderVal.value = [];
|
|
27795
|
+
return;
|
|
27796
|
+
}
|
|
27797
|
+
const parts = raw.split(joinSeparator).filter((s) => s !== "");
|
|
27798
|
+
if (_cascaderProps.value.showAllLevels === false) {
|
|
27799
|
+
cascaderVal.value = parts.map((id) => getCascaderId(id, props.options));
|
|
27800
|
+
} else {
|
|
27801
|
+
cascaderVal.value = parts.map((p) => p.split(separator));
|
|
27802
|
+
}
|
|
27803
|
+
} else if (_cascaderProps.value.showAllLevels === false) {
|
|
27762
27804
|
const list = getCascaderId(props.modelValue, props.options);
|
|
27763
27805
|
cascaderVal.value = list.join(separator);
|
|
27764
27806
|
} else {
|
|
@@ -23,6 +23,7 @@ export declare const cascaderProps: {
|
|
|
23
23
|
};
|
|
24
24
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => CascaderOption[]) | (() => CascaderOption[]) | ((new (...args: any[]) => CascaderOption[]) | (() => CascaderOption[]))[], unknown, unknown, () => CascaderOption[], boolean>;
|
|
25
25
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
26
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
26
27
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
27
28
|
};
|
|
28
29
|
export declare type CascaderProps = ExtractPropTypes<typeof cascaderProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport type {ExtractPropTypes} from 'vue'\nimport type Cascader from './cascader.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport type CascaderNodeValue = string | number\n\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport const cascaderProps = buildProps({\n cascaderProps: {\n type: Object,\n default: () => ({\n showAllLevels: true,\n }),\n },\n disabled: Boolean,\n readonly: Boolean,\n clearable: Boolean,\n size: useSizeProp,\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n placeholder: {\n type: String,\n default: '',\n },\n modelValue: {\n type: definePropType<string | undefined>([\n String,\n ]),\n default: '',\n },\n})\n\nexport type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport const cascaderEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | undefined) => isString(value),\n input: (value: string | undefined) => isString(value),\n change: (value: string | undefined) => isString(value),\n}\nexport type CascaderEmits = typeof cascaderEmits\n\n\nexport type CascaderInstance = InstanceType<typeof Cascader>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,aAAa,EAAE,IAAI;AACzB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACpC;;;;"}
|
|
1
|
+
{"version":3,"file":"cascader.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport type {ExtractPropTypes} from 'vue'\nimport type Cascader from './cascader.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport type CascaderNodeValue = string | number\n\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport const cascaderProps = buildProps({\n cascaderProps: {\n type: Object,\n default: () => ({\n showAllLevels: true,\n }),\n },\n disabled: Boolean,\n readonly: Boolean,\n clearable: Boolean,\n size: useSizeProp,\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n placeholder: {\n type: String,\n default: '',\n },\n joinSeparator: {\n type: String,\n default: ',',\n },\n modelValue: {\n type: definePropType<string | undefined>([\n String,\n ]),\n default: '',\n },\n})\n\nexport type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport const cascaderEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | undefined) => isString(value),\n input: (value: string | undefined) => isString(value),\n change: (value: string | undefined) => isString(value),\n}\nexport type CascaderEmits = typeof cascaderEmits\n\n\nexport type CascaderInstance = InstanceType<typeof Cascader>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,aAAa,EAAE,IAAI;AACzB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACpC;;;;"}
|
|
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]) | ((new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]))[], unknown, unknown, () => import("./cascader").CascaderOption[], boolean>;
|
|
16
16
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
17
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
17
18
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
18
19
|
}, {
|
|
19
20
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -31,6 +32,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
32
|
};
|
|
32
33
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]) | ((new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]))[], unknown, unknown, () => import("./cascader").CascaderOption[], boolean>;
|
|
33
34
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
35
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
34
36
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
35
37
|
}>> & {
|
|
36
38
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
@@ -71,6 +73,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
71
73
|
inputCls: import("vue").ComputedRef<string[]>;
|
|
72
74
|
cascaderCls: import("vue").ComputedRef<string[]>;
|
|
73
75
|
_inputProps: import("vue").ComputedRef<{
|
|
76
|
+
class: string;
|
|
77
|
+
style: string;
|
|
74
78
|
disabled: boolean;
|
|
75
79
|
size: "" | "default" | "small" | "large";
|
|
76
80
|
clearable: boolean;
|
|
@@ -88,6 +92,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
92
|
separator: string;
|
|
89
93
|
showAllLevels: boolean;
|
|
90
94
|
}>;
|
|
95
|
+
isMultiple: import("vue").ComputedRef<boolean>;
|
|
91
96
|
input: (str: string) => void;
|
|
92
97
|
change: (str: string) => void;
|
|
93
98
|
click: (e: MouseEvent) => void;
|
|
@@ -2276,6 +2281,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2276
2281
|
};
|
|
2277
2282
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]) | ((new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]))[], unknown, unknown, () => import("./cascader").CascaderOption[], boolean>;
|
|
2278
2283
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
2284
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
2279
2285
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
2280
2286
|
}>> & {
|
|
2281
2287
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
@@ -2288,6 +2294,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2288
2294
|
clearable: boolean;
|
|
2289
2295
|
options: import("./cascader").CascaderOption[];
|
|
2290
2296
|
placeholder: string;
|
|
2297
|
+
joinSeparator: string;
|
|
2291
2298
|
modelValue: import("hzzt-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown>;
|
|
2292
2299
|
}>;
|
|
2293
2300
|
export default _default;
|
|
@@ -45,7 +45,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
clearable: props.clearable,
|
|
46
46
|
placeholder: props.placeholder,
|
|
47
47
|
readonly: props.readonly,
|
|
48
|
-
...attrs
|
|
48
|
+
...attrs,
|
|
49
|
+
class: "",
|
|
50
|
+
style: ""
|
|
49
51
|
}));
|
|
50
52
|
const _cascaderProps = computed(() => ({
|
|
51
53
|
options: props.options,
|
|
@@ -59,6 +61,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
61
|
showAllLevels: true,
|
|
60
62
|
...props.cascaderProps
|
|
61
63
|
}));
|
|
64
|
+
const isMultiple = computed(() => {
|
|
65
|
+
var _a;
|
|
66
|
+
return !!((_a = _cascaderProps.value.props) == null ? void 0 : _a.multiple);
|
|
67
|
+
});
|
|
62
68
|
watch(() => props.modelValue, (v) => {
|
|
63
69
|
inputVal.value = v;
|
|
64
70
|
getCascaderVal();
|
|
@@ -82,14 +88,42 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
88
|
target.focus();
|
|
83
89
|
}
|
|
84
90
|
function cascaderChange(val) {
|
|
91
|
+
var _a;
|
|
85
92
|
const separator = _cascaderProps.value.separator || "/";
|
|
86
|
-
|
|
93
|
+
const joinSeparator = (_a = props.joinSeparator) != null ? _a : ",";
|
|
94
|
+
if (isMultiple.value) {
|
|
95
|
+
const list = isArray(val) ? val : [];
|
|
96
|
+
const items = list.map((item) => {
|
|
97
|
+
var _a2;
|
|
98
|
+
if (isArray(item)) {
|
|
99
|
+
return _cascaderProps.value.showAllLevels === false ? String((_a2 = item[item.length - 1]) != null ? _a2 : "") : item.join(separator);
|
|
100
|
+
}
|
|
101
|
+
return String(item != null ? item : "");
|
|
102
|
+
});
|
|
103
|
+
inputVal.value = items.join(joinSeparator);
|
|
104
|
+
} else {
|
|
105
|
+
inputVal.value = val ? isArray(val) ? _cascaderProps.value.showAllLevels === false ? val[val.length - 1] : val.join(separator) : [val].join(separator) : "";
|
|
106
|
+
}
|
|
87
107
|
input(inputVal.value);
|
|
88
108
|
change(inputVal.value);
|
|
89
109
|
}
|
|
90
110
|
function getCascaderVal() {
|
|
111
|
+
var _a;
|
|
91
112
|
const separator = _cascaderProps.value.separator || "/";
|
|
92
|
-
|
|
113
|
+
const joinSeparator = (_a = props.joinSeparator) != null ? _a : ",";
|
|
114
|
+
if (isMultiple.value) {
|
|
115
|
+
const raw = props.modelValue || "";
|
|
116
|
+
if (!raw) {
|
|
117
|
+
cascaderVal.value = [];
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const parts = raw.split(joinSeparator).filter((s) => s !== "");
|
|
121
|
+
if (_cascaderProps.value.showAllLevels === false) {
|
|
122
|
+
cascaderVal.value = parts.map((id) => getCascaderId(id, props.options));
|
|
123
|
+
} else {
|
|
124
|
+
cascaderVal.value = parts.map((p) => p.split(separator));
|
|
125
|
+
}
|
|
126
|
+
} else if (_cascaderProps.value.showAllLevels === false) {
|
|
93
127
|
const list = getCascaderId(props.modelValue, props.options);
|
|
94
128
|
cascaderVal.value = list.join(separator);
|
|
95
129
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader2.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n :class=\"inputCls\"\n v-model=\"inputVal\"\n ref=\"inputRef\"\n v-bind=\"_inputProps\"\n @input=\"input\"\n @click=\"click\"\n @change=\"change\"\n >\n </el-input>\n <el-cascader :class=\"cascaderCls\" v-model=\"cascaderVal\" ref=\"cascaderRef\" v-bind=\"_cascaderProps\"\n @change=\"cascaderChange\">\n </el-cascader>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {cascaderEmits, cascaderProps} from './cascader'\n import {computed, ref, useAttrs, watch} from \"vue\";\n import {CascaderProps, useFormDisabled, useFormSize, CascaderValue} from \"element-plus\";\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {isArray} from '@hzzt-plus/utils'\n import {ElInput, ElCascader} from 'element-plus'\n import {getCascaderId} from \"./hooks/utils\";\n\n defineOptions({\n name: 'HzztCascader',\n })\n\n const props = defineProps(cascaderProps)\n const emit = defineEmits(cascaderEmits)\n\n const attrs = useAttrs();\n\n const inputVal = ref(props.modelValue);\n const cascaderVal = ref();\n const inputRef = ref();\n const cascaderRef = ref();\n\n const nsCascader = useNamespace('cascader');\n\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const containerCls = computed(() => [\n 'relative',\n nsCascader.b(),\n nsCascader.m(trueSize.value),\n ])\n\n const inputCls = computed(() => [\n nsCascader.e('input'),\n ])\n\n const cascaderCls = computed(() => [\n nsCascader.e('cascader'),\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n readonly: props.readonly,\n ...attrs,\n }))\n\n const _cascaderProps = computed(() => ({\n options: props.options,\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n props: {checkStrictly: true, expandTrigger: 'hover'} as CascaderProps,\n filterable: true,\n separator: '/',\n showAllLevels: true,\n ...props.cascaderProps,\n }))\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v;\n getCascaderVal();\n })\n\n watch(() => props.options, (v) => {\n if (!v) return;\n getCascaderVal();\n })\n\n getCascaderVal();\n\n function input(str: string) {\n emit('update:modelValue', str)\n emit('input', str)\n }\n\n function change(str: string) {\n emit('change', str)\n }\n\n function click(e: MouseEvent) {\n cascaderRef.value.togglePopperVisible();\n const target = e.target as HTMLInputElement;\n target.focus();\n }\n\n function cascaderChange(val: CascaderValue) {\n const separator = _cascaderProps.value.separator || '/';\n inputVal.value = val ? isArray(val) ? val.join(separator) : [val].join(separator) : '';\n input(inputVal.value);\n change(inputVal.value);\n }\n\n function getCascaderVal() {\n const separator = _cascaderProps.value.separator || '/';\n if (_cascaderProps.value.showAllLevels === false) {\n const list = getCascaderId(props.modelValue, props.options);\n cascaderVal.value = list.join(separator);\n } else {\n cascaderVal.value = (props.modelValue || '').split(separator);\n }\n }\n\n\n</script>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"cascader2.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n :class=\"inputCls\"\n v-model=\"inputVal\"\n ref=\"inputRef\"\n v-bind=\"_inputProps\"\n @input=\"input\"\n @click=\"click\"\n @change=\"change\"\n >\n </el-input>\n <el-cascader :class=\"cascaderCls\" v-model=\"cascaderVal\" ref=\"cascaderRef\" v-bind=\"_cascaderProps\"\n @change=\"cascaderChange\">\n </el-cascader>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {cascaderEmits, cascaderProps, CascaderNodeValue} from './cascader'\n import {computed, ref, useAttrs, watch} from \"vue\";\n import {CascaderProps, useFormDisabled, useFormSize, CascaderValue} from \"element-plus\";\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {isArray} from '@hzzt-plus/utils'\n import {ElInput, ElCascader} from 'element-plus'\n import {getCascaderId} from \"./hooks/utils\";\n\n defineOptions({\n name: 'HzztCascader',\n })\n\n const props = defineProps(cascaderProps)\n const emit = defineEmits(cascaderEmits)\n\n const attrs = useAttrs();\n\n const inputVal = ref(props.modelValue);\n const cascaderVal = ref();\n const inputRef = ref();\n const cascaderRef = ref();\n\n const nsCascader = useNamespace('cascader');\n\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const containerCls = computed(() => [\n 'relative',\n nsCascader.b(),\n nsCascader.m(trueSize.value),\n ])\n\n const inputCls = computed(() => [\n nsCascader.e('input'),\n ])\n\n const cascaderCls = computed(() => [\n nsCascader.e('cascader'),\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n readonly: props.readonly,\n ...attrs,\n class: '',\n style: ''\n }))\n\n const _cascaderProps = computed(() => ({\n options: props.options,\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n props: {checkStrictly: true, expandTrigger: 'hover'} as CascaderProps,\n filterable: true,\n separator: '/',\n showAllLevels: true,\n ...props.cascaderProps,\n }))\n\n const isMultiple = computed(() => !!_cascaderProps.value.props?.multiple)\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v;\n getCascaderVal();\n })\n\n watch(() => props.options, (v) => {\n if (!v) return;\n getCascaderVal();\n })\n\n getCascaderVal();\n\n function input(str: string) {\n emit('update:modelValue', str)\n emit('input', str)\n }\n\n function change(str: string) {\n emit('change', str)\n }\n\n function click(e: MouseEvent) {\n cascaderRef.value.togglePopperVisible();\n const target = e.target as HTMLInputElement;\n target.focus();\n }\n\n function cascaderChange(val: CascaderValue) {\n const separator = _cascaderProps.value.separator || '/';\n const joinSeparator = props.joinSeparator ?? ',';\n if (isMultiple.value) {\n const list = (isArray(val) ? val : []) as Array<CascaderNodeValue | CascaderNodeValue[]>;\n const items = list.map((item) => {\n if (isArray(item)) {\n return _cascaderProps.value.showAllLevels === false\n ? String(item[item.length - 1] ?? '')\n : item.join(separator);\n }\n return String(item ?? '');\n });\n inputVal.value = items.join(joinSeparator);\n } else {\n inputVal.value = val ? isArray(val) ? _cascaderProps.value.showAllLevels === false ? (val[val.length - 1] as string) : val.join(separator) : [val].join(separator) : '';\n }\n input(inputVal.value);\n change(inputVal.value);\n }\n\n function getCascaderVal() {\n const separator = _cascaderProps.value.separator || '/';\n const joinSeparator = props.joinSeparator ?? ',';\n if (isMultiple.value) {\n const raw = props.modelValue || '';\n if (!raw) {\n cascaderVal.value = [];\n return;\n }\n const parts = raw.split(joinSeparator).filter((s) => s !== '');\n if (_cascaderProps.value.showAllLevels === false) {\n cascaderVal.value = parts.map((id) => getCascaderId(id, props.options));\n } else {\n cascaderVal.value = parts.map((p) => p.split(separator));\n }\n } else if (_cascaderProps.value.showAllLevels === false) {\n const list = getCascaderId(props.modelValue, props.options);\n cascaderVal.value = list.join(separator);\n } else {\n cascaderVal.value = (props.modelValue || '').split(separator);\n }\n }\n\n\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;mCA2BgB,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA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AAA,MAAA,IAAA,cAAqB,CAAA,KAAoB,CAAA,aAAA,UAAmB,EAAA;AAAA,QAC9D,MAAA,IAAA,GAAA,aAAA,CAAA,KAAA,CAAA,UAAA,EAAA,KAAA,CAAA,OAAA,CAAA,CAAA;AAAA,QACF,WAAA,CAAA,KAAA,GAAA,IAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -44,6 +44,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
emit("update:modelValue", false);
|
|
45
45
|
expand.value = false;
|
|
46
46
|
}
|
|
47
|
+
watch(() => props.defaultActive, (v) => {
|
|
48
|
+
emit("update:modelValue", v);
|
|
49
|
+
expand.value = v;
|
|
50
|
+
});
|
|
47
51
|
watch(() => props.modelValue, (v) => {
|
|
48
52
|
expand.value = v;
|
|
49
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse flex column\">\n <div class=\"hzzt-collapse__top\">\n <div class=\"hzzt-collapse__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div v-if=\"showLine\" class=\"hzzt-collapse__line\" />\n <slot name=\"toggle-btn\">\n <div class=\"hzzt-collapse__btn\" @click=\"toggle\">\n <hzzt-icon :name=\"!expand ? 'hzzt-plus-square-outline' : 'hzzt-minus-square-outline'\"\n class=\"hzzt-collapse__icon\" size=\"14\" />\n <span>{{ expand ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand') }}</span>\n </div>\n </slot>\n </div>\n <div v-show=\"expand\" class=\"hzzt-collapse__content flex-1\">\n <slot />\n </div>\n\n <slot :active=\"expand\" name=\"active\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {useLocale} from '@hzzt-plus/hooks'\n import HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n import {ref, watch} from 'vue'\n\n defineOptions({\n name: 'HzztCollapse',\n })\n const {t} = useLocale()\n const props = defineProps({\n defaultActive: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n showLine: {\n type: Boolean,\n default: true,\n },\n modelValue: {\n type: Boolean,\n default: true,\n },\n })\n const emit = defineEmits(['update:modelValue'])\n\n const expand = ref(props.modelValue)\n\n if (!props.defaultActive) {\n emit('update:modelValue', false);\n expand.value = false;\n }\n\n watch(() => props.modelValue, (v) => {\n expand.value = v;\n })\n\n function toggle() {\n expand.value = !expand.value;\n emit('update:modelValue', expand.value);\n }\n\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;mCA8BgB,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAM,MAAA,EAAC,CAAC,EAAA,GAAI,SAAU,EAAA,CAAA;AAqBtB,IAAM,MAAA,MAAA,GAAS,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAEnC,IAAI,IAAA,CAAC,MAAM,aAAe,EAAA;AACxB,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,MAAA,CAAO,KAAQ,GAAA,KAAA,CAAA;AAAA,KACjB;AAEA,IAAA,KAAA,CAAM,MAAM,KAAA,CAAM,UAAY,EAAA,CAAC,CAAM,KAAA;AACnC,MAAA,MAAA,CAAO,KAAQ,GAAA,CAAA,CAAA;AAAA,KAChB,CAAA,CAAA;AAED,IAAA,SAAS,MAAS,GAAA;AAChB,MAAO,MAAA,CAAA,KAAA,GAAQ,CAAC,MAAO,CAAA,KAAA,CAAA;AACvB,MAAK,IAAA,CAAA,mBAAA,EAAqB,OAAO,KAAK,CAAA,CAAA;AAAA,KACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse flex column\">\n <div class=\"hzzt-collapse__top\">\n <div class=\"hzzt-collapse__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div v-if=\"showLine\" class=\"hzzt-collapse__line\" />\n <slot name=\"toggle-btn\">\n <div class=\"hzzt-collapse__btn\" @click=\"toggle\">\n <hzzt-icon :name=\"!expand ? 'hzzt-plus-square-outline' : 'hzzt-minus-square-outline'\"\n class=\"hzzt-collapse__icon\" size=\"14\" />\n <span>{{ expand ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand') }}</span>\n </div>\n </slot>\n </div>\n <div v-show=\"expand\" class=\"hzzt-collapse__content flex-1\">\n <slot />\n </div>\n\n <slot :active=\"expand\" name=\"active\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {useLocale} from '@hzzt-plus/hooks'\n import HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n import {ref, watch} from 'vue'\n\n defineOptions({\n name: 'HzztCollapse',\n })\n const {t} = useLocale()\n const props = defineProps({\n defaultActive: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n showLine: {\n type: Boolean,\n default: true,\n },\n modelValue: {\n type: Boolean,\n default: true,\n },\n })\n const emit = defineEmits(['update:modelValue'])\n\n const expand = ref(props.modelValue)\n\n if (!props.defaultActive) {\n emit('update:modelValue', false);\n expand.value = false;\n }\n\n watch(() => props.defaultActive, (v) => {\n emit('update:modelValue', v);\n expand.value = v;\n })\n\n watch(() => props.modelValue, (v) => {\n expand.value = v;\n })\n\n function toggle() {\n expand.value = !expand.value;\n emit('update:modelValue', expand.value);\n }\n\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;mCA8BgB,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAM,MAAA,EAAC,CAAC,EAAA,GAAI,SAAU,EAAA,CAAA;AAqBtB,IAAM,MAAA,MAAA,GAAS,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAEnC,IAAI,IAAA,CAAC,MAAM,aAAe,EAAA;AACxB,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,MAAA,CAAO,KAAQ,GAAA,KAAA,CAAA;AAAA,KACjB;AAEA,IAAA,KAAA,CAAM,MAAM,KAAA,CAAM,aAAe,EAAA,CAAC,CAAM,KAAA;AACtC,MAAA,IAAA,CAAK,qBAAqB,CAAC,CAAA,CAAA;AAC3B,MAAA,MAAA,CAAO,KAAQ,GAAA,CAAA,CAAA;AAAA,KAChB,CAAA,CAAA;AAED,IAAA,KAAA,CAAM,MAAM,KAAA,CAAM,UAAY,EAAA,CAAC,CAAM,KAAA;AACnC,MAAA,MAAA,CAAO,KAAQ,GAAA,CAAA,CAAA;AAAA,KAChB,CAAA,CAAA;AAED,IAAA,SAAS,MAAS,GAAA;AAChB,MAAO,MAAA,CAAA,KAAA,GAAQ,CAAC,MAAO,CAAA,KAAA,CAAA;AACvB,MAAK,IAAA,CAAA,mBAAA,EAAqB,OAAO,KAAK,CAAA,CAAA;AAAA,KACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -23,6 +23,7 @@ export declare const cascaderProps: {
|
|
|
23
23
|
};
|
|
24
24
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => CascaderOption[]) | (() => CascaderOption[]) | ((new (...args: any[]) => CascaderOption[]) | (() => CascaderOption[]))[], unknown, unknown, () => CascaderOption[], boolean>;
|
|
25
25
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
26
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
26
27
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
27
28
|
};
|
|
28
29
|
export declare type CascaderProps = ExtractPropTypes<typeof cascaderProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader.js","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport type {ExtractPropTypes} from 'vue'\nimport type Cascader from './cascader.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport type CascaderNodeValue = string | number\n\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport const cascaderProps = buildProps({\n cascaderProps: {\n type: Object,\n default: () => ({\n showAllLevels: true,\n }),\n },\n disabled: Boolean,\n readonly: Boolean,\n clearable: Boolean,\n size: useSizeProp,\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n placeholder: {\n type: String,\n default: '',\n },\n modelValue: {\n type: definePropType<string | undefined>([\n String,\n ]),\n default: '',\n },\n})\n\nexport type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport const cascaderEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | undefined) => isString(value),\n input: (value: string | undefined) => isString(value),\n change: (value: string | undefined) => isString(value),\n}\nexport type CascaderEmits = typeof cascaderEmits\n\n\nexport type CascaderInstance = InstanceType<typeof Cascader>\n"],"names":["buildProps","useSizeProp","definePropType","UPDATE_MODEL_EVENT","isString"],"mappings":";;;;;;;;;;;;AAGY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,aAAa,EAAE,IAAI;AACzB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKC,eAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACpC;;;;;"}
|
|
1
|
+
{"version":3,"file":"cascader.js","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport type {ExtractPropTypes} from 'vue'\nimport type Cascader from './cascader.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport type CascaderNodeValue = string | number\n\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport const cascaderProps = buildProps({\n cascaderProps: {\n type: Object,\n default: () => ({\n showAllLevels: true,\n }),\n },\n disabled: Boolean,\n readonly: Boolean,\n clearable: Boolean,\n size: useSizeProp,\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n placeholder: {\n type: String,\n default: '',\n },\n joinSeparator: {\n type: String,\n default: ',',\n },\n modelValue: {\n type: definePropType<string | undefined>([\n String,\n ]),\n default: '',\n },\n})\n\nexport type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport const cascaderEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | undefined) => isString(value),\n input: (value: string | undefined) => isString(value),\n change: (value: string | undefined) => isString(value),\n}\nexport type CascaderEmits = typeof cascaderEmits\n\n\nexport type CascaderInstance = InstanceType<typeof Cascader>\n"],"names":["buildProps","useSizeProp","definePropType","UPDATE_MODEL_EVENT","isString"],"mappings":";;;;;;;;;;;;AAGY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,aAAa,EAAE,IAAI;AACzB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKC,eAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACpC;;;;;"}
|
|
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]) | ((new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]))[], unknown, unknown, () => import("./cascader").CascaderOption[], boolean>;
|
|
16
16
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
17
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
17
18
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
18
19
|
}, {
|
|
19
20
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -31,6 +32,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
32
|
};
|
|
32
33
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]) | ((new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]))[], unknown, unknown, () => import("./cascader").CascaderOption[], boolean>;
|
|
33
34
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
35
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
34
36
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
35
37
|
}>> & {
|
|
36
38
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
@@ -71,6 +73,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
71
73
|
inputCls: import("vue").ComputedRef<string[]>;
|
|
72
74
|
cascaderCls: import("vue").ComputedRef<string[]>;
|
|
73
75
|
_inputProps: import("vue").ComputedRef<{
|
|
76
|
+
class: string;
|
|
77
|
+
style: string;
|
|
74
78
|
disabled: boolean;
|
|
75
79
|
size: "" | "default" | "small" | "large";
|
|
76
80
|
clearable: boolean;
|
|
@@ -88,6 +92,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
92
|
separator: string;
|
|
89
93
|
showAllLevels: boolean;
|
|
90
94
|
}>;
|
|
95
|
+
isMultiple: import("vue").ComputedRef<boolean>;
|
|
91
96
|
input: (str: string) => void;
|
|
92
97
|
change: (str: string) => void;
|
|
93
98
|
click: (e: MouseEvent) => void;
|
|
@@ -2276,6 +2281,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2276
2281
|
};
|
|
2277
2282
|
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]) | ((new (...args: any[]) => import("./cascader").CascaderOption[]) | (() => import("./cascader").CascaderOption[]))[], unknown, unknown, () => import("./cascader").CascaderOption[], boolean>;
|
|
2278
2283
|
placeholder: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
2284
|
+
joinSeparator: import("hzzt-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
2279
2285
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown, string, boolean>;
|
|
2280
2286
|
}>> & {
|
|
2281
2287
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
@@ -2288,6 +2294,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2288
2294
|
clearable: boolean;
|
|
2289
2295
|
options: import("./cascader").CascaderOption[];
|
|
2290
2296
|
placeholder: string;
|
|
2297
|
+
joinSeparator: string;
|
|
2291
2298
|
modelValue: import("hzzt-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string & {}) | (() => string | undefined) | ((new (...args: any[]) => string & {}) | (() => string | undefined))[], unknown, unknown>;
|
|
2292
2299
|
}>;
|
|
2293
2300
|
export default _default;
|
|
@@ -49,7 +49,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
49
|
clearable: props.clearable,
|
|
50
50
|
placeholder: props.placeholder,
|
|
51
51
|
readonly: props.readonly,
|
|
52
|
-
...attrs
|
|
52
|
+
...attrs,
|
|
53
|
+
class: "",
|
|
54
|
+
style: ""
|
|
53
55
|
}));
|
|
54
56
|
const _cascaderProps = vue.computed(() => ({
|
|
55
57
|
options: props.options,
|
|
@@ -63,6 +65,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
65
|
showAllLevels: true,
|
|
64
66
|
...props.cascaderProps
|
|
65
67
|
}));
|
|
68
|
+
const isMultiple = vue.computed(() => {
|
|
69
|
+
var _a;
|
|
70
|
+
return !!((_a = _cascaderProps.value.props) == null ? void 0 : _a.multiple);
|
|
71
|
+
});
|
|
66
72
|
vue.watch(() => props.modelValue, (v) => {
|
|
67
73
|
inputVal.value = v;
|
|
68
74
|
getCascaderVal();
|
|
@@ -86,14 +92,42 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
92
|
target.focus();
|
|
87
93
|
}
|
|
88
94
|
function cascaderChange(val) {
|
|
95
|
+
var _a;
|
|
89
96
|
const separator = _cascaderProps.value.separator || "/";
|
|
90
|
-
|
|
97
|
+
const joinSeparator = (_a = props.joinSeparator) != null ? _a : ",";
|
|
98
|
+
if (isMultiple.value) {
|
|
99
|
+
const list = shared.isArray(val) ? val : [];
|
|
100
|
+
const items = list.map((item) => {
|
|
101
|
+
var _a2;
|
|
102
|
+
if (shared.isArray(item)) {
|
|
103
|
+
return _cascaderProps.value.showAllLevels === false ? String((_a2 = item[item.length - 1]) != null ? _a2 : "") : item.join(separator);
|
|
104
|
+
}
|
|
105
|
+
return String(item != null ? item : "");
|
|
106
|
+
});
|
|
107
|
+
inputVal.value = items.join(joinSeparator);
|
|
108
|
+
} else {
|
|
109
|
+
inputVal.value = val ? shared.isArray(val) ? _cascaderProps.value.showAllLevels === false ? val[val.length - 1] : val.join(separator) : [val].join(separator) : "";
|
|
110
|
+
}
|
|
91
111
|
input(inputVal.value);
|
|
92
112
|
change(inputVal.value);
|
|
93
113
|
}
|
|
94
114
|
function getCascaderVal() {
|
|
115
|
+
var _a;
|
|
95
116
|
const separator = _cascaderProps.value.separator || "/";
|
|
96
|
-
|
|
117
|
+
const joinSeparator = (_a = props.joinSeparator) != null ? _a : ",";
|
|
118
|
+
if (isMultiple.value) {
|
|
119
|
+
const raw = props.modelValue || "";
|
|
120
|
+
if (!raw) {
|
|
121
|
+
cascaderVal.value = [];
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const parts = raw.split(joinSeparator).filter((s) => s !== "");
|
|
125
|
+
if (_cascaderProps.value.showAllLevels === false) {
|
|
126
|
+
cascaderVal.value = parts.map((id) => utils.getCascaderId(id, props.options));
|
|
127
|
+
} else {
|
|
128
|
+
cascaderVal.value = parts.map((p) => p.split(separator));
|
|
129
|
+
}
|
|
130
|
+
} else if (_cascaderProps.value.showAllLevels === false) {
|
|
97
131
|
const list = utils.getCascaderId(props.modelValue, props.options);
|
|
98
132
|
cascaderVal.value = list.join(separator);
|
|
99
133
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader2.js","sources":["../../../../../../packages/components/cascader/src/cascader.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n :class=\"inputCls\"\n v-model=\"inputVal\"\n ref=\"inputRef\"\n v-bind=\"_inputProps\"\n @input=\"input\"\n @click=\"click\"\n @change=\"change\"\n >\n </el-input>\n <el-cascader :class=\"cascaderCls\" v-model=\"cascaderVal\" ref=\"cascaderRef\" v-bind=\"_cascaderProps\"\n @change=\"cascaderChange\">\n </el-cascader>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {cascaderEmits, cascaderProps} from './cascader'\n import {computed, ref, useAttrs, watch} from \"vue\";\n import {CascaderProps, useFormDisabled, useFormSize, CascaderValue} from \"element-plus\";\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {isArray} from '@hzzt-plus/utils'\n import {ElInput, ElCascader} from 'element-plus'\n import {getCascaderId} from \"./hooks/utils\";\n\n defineOptions({\n name: 'HzztCascader',\n })\n\n const props = defineProps(cascaderProps)\n const emit = defineEmits(cascaderEmits)\n\n const attrs = useAttrs();\n\n const inputVal = ref(props.modelValue);\n const cascaderVal = ref();\n const inputRef = ref();\n const cascaderRef = ref();\n\n const nsCascader = useNamespace('cascader');\n\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const containerCls = computed(() => [\n 'relative',\n nsCascader.b(),\n nsCascader.m(trueSize.value),\n ])\n\n const inputCls = computed(() => [\n nsCascader.e('input'),\n ])\n\n const cascaderCls = computed(() => [\n nsCascader.e('cascader'),\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n readonly: props.readonly,\n ...attrs,\n }))\n\n const _cascaderProps = computed(() => ({\n options: props.options,\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n props: {checkStrictly: true, expandTrigger: 'hover'} as CascaderProps,\n filterable: true,\n separator: '/',\n showAllLevels: true,\n ...props.cascaderProps,\n }))\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v;\n getCascaderVal();\n })\n\n watch(() => props.options, (v) => {\n if (!v) return;\n getCascaderVal();\n })\n\n getCascaderVal();\n\n function input(str: string) {\n emit('update:modelValue', str)\n emit('input', str)\n }\n\n function change(str: string) {\n emit('change', str)\n }\n\n function click(e: MouseEvent) {\n cascaderRef.value.togglePopperVisible();\n const target = e.target as HTMLInputElement;\n target.focus();\n }\n\n function cascaderChange(val: CascaderValue) {\n const separator = _cascaderProps.value.separator || '/';\n inputVal.value = val ? isArray(val) ? val.join(separator) : [val].join(separator) : '';\n input(inputVal.value);\n change(inputVal.value);\n }\n\n function getCascaderVal() {\n const separator = _cascaderProps.value.separator || '/';\n if (_cascaderProps.value.showAllLevels === false) {\n const list = getCascaderId(props.modelValue, props.options);\n cascaderVal.value = list.join(separator);\n } else {\n cascaderVal.value = (props.modelValue || '').split(separator);\n }\n }\n\n\n</script>\n"],"names":["useAttrs","ref","useNamespace","useFormSize","useFormDisabled","computed","useGlobalSize","watch","isArray","getCascaderId"
|
|
1
|
+
{"version":3,"file":"cascader2.js","sources":["../../../../../../packages/components/cascader/src/cascader.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n :class=\"inputCls\"\n v-model=\"inputVal\"\n ref=\"inputRef\"\n v-bind=\"_inputProps\"\n @input=\"input\"\n @click=\"click\"\n @change=\"change\"\n >\n </el-input>\n <el-cascader :class=\"cascaderCls\" v-model=\"cascaderVal\" ref=\"cascaderRef\" v-bind=\"_cascaderProps\"\n @change=\"cascaderChange\">\n </el-cascader>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {cascaderEmits, cascaderProps, CascaderNodeValue} from './cascader'\n import {computed, ref, useAttrs, watch} from \"vue\";\n import {CascaderProps, useFormDisabled, useFormSize, CascaderValue} from \"element-plus\";\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {isArray} from '@hzzt-plus/utils'\n import {ElInput, ElCascader} from 'element-plus'\n import {getCascaderId} from \"./hooks/utils\";\n\n defineOptions({\n name: 'HzztCascader',\n })\n\n const props = defineProps(cascaderProps)\n const emit = defineEmits(cascaderEmits)\n\n const attrs = useAttrs();\n\n const inputVal = ref(props.modelValue);\n const cascaderVal = ref();\n const inputRef = ref();\n const cascaderRef = ref();\n\n const nsCascader = useNamespace('cascader');\n\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const containerCls = computed(() => [\n 'relative',\n nsCascader.b(),\n nsCascader.m(trueSize.value),\n ])\n\n const inputCls = computed(() => [\n nsCascader.e('input'),\n ])\n\n const cascaderCls = computed(() => [\n nsCascader.e('cascader'),\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n readonly: props.readonly,\n ...attrs,\n class: '',\n style: ''\n }))\n\n const _cascaderProps = computed(() => ({\n options: props.options,\n disabled: trueDisabled.value,\n size: trueSize.value,\n clearable: props.clearable,\n placeholder: props.placeholder,\n props: {checkStrictly: true, expandTrigger: 'hover'} as CascaderProps,\n filterable: true,\n separator: '/',\n showAllLevels: true,\n ...props.cascaderProps,\n }))\n\n const isMultiple = computed(() => !!_cascaderProps.value.props?.multiple)\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v;\n getCascaderVal();\n })\n\n watch(() => props.options, (v) => {\n if (!v) return;\n getCascaderVal();\n })\n\n getCascaderVal();\n\n function input(str: string) {\n emit('update:modelValue', str)\n emit('input', str)\n }\n\n function change(str: string) {\n emit('change', str)\n }\n\n function click(e: MouseEvent) {\n cascaderRef.value.togglePopperVisible();\n const target = e.target as HTMLInputElement;\n target.focus();\n }\n\n function cascaderChange(val: CascaderValue) {\n const separator = _cascaderProps.value.separator || '/';\n const joinSeparator = props.joinSeparator ?? ',';\n if (isMultiple.value) {\n const list = (isArray(val) ? val : []) as Array<CascaderNodeValue | CascaderNodeValue[]>;\n const items = list.map((item) => {\n if (isArray(item)) {\n return _cascaderProps.value.showAllLevels === false\n ? String(item[item.length - 1] ?? '')\n : item.join(separator);\n }\n return String(item ?? '');\n });\n inputVal.value = items.join(joinSeparator);\n } else {\n inputVal.value = val ? isArray(val) ? _cascaderProps.value.showAllLevels === false ? (val[val.length - 1] as string) : val.join(separator) : [val].join(separator) : '';\n }\n input(inputVal.value);\n change(inputVal.value);\n }\n\n function getCascaderVal() {\n const separator = _cascaderProps.value.separator || '/';\n const joinSeparator = props.joinSeparator ?? ',';\n if (isMultiple.value) {\n const raw = props.modelValue || '';\n if (!raw) {\n cascaderVal.value = [];\n return;\n }\n const parts = raw.split(joinSeparator).filter((s) => s !== '');\n if (_cascaderProps.value.showAllLevels === false) {\n cascaderVal.value = parts.map((id) => getCascaderId(id, props.options));\n } else {\n cascaderVal.value = parts.map((p) => p.split(separator));\n }\n } else if (_cascaderProps.value.showAllLevels === false) {\n const list = getCascaderId(props.modelValue, props.options);\n cascaderVal.value = list.join(separator);\n } else {\n cascaderVal.value = (props.modelValue || '').split(separator);\n }\n }\n\n\n</script>\n"],"names":["useAttrs","ref","useNamespace","useFormSize","useFormDisabled","computed","useGlobalSize","watch","isArray","getCascaderId"],"mappings":";;;;;;;;;;;;;;;uCA2BgB,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,QAAA,GAAWC,OAAI,CAAA,KAAA,CAAM,UAAU,CA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AA,CAAA,CAAA;AAAA,SAClC;AACL,OAAA,MAAA,IAAA,cAAqB,CAAA,KAAoB,CAAA,aAAA,UAAmB,EAAA;AAAA,QAC9D,MAAA,IAAA,GAAAA,mBAAA,CAAA,KAAA,CAAA,UAAA,EAAA,KAAA,CAAA,OAAA,CAAA,CAAA;AAAA,QACF,WAAA,CAAA,KAAA,GAAA,IAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -48,6 +48,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
48
48
|
emit("update:modelValue", false);
|
|
49
49
|
expand.value = false;
|
|
50
50
|
}
|
|
51
|
+
vue.watch(() => props.defaultActive, (v) => {
|
|
52
|
+
emit("update:modelValue", v);
|
|
53
|
+
expand.value = v;
|
|
54
|
+
});
|
|
51
55
|
vue.watch(() => props.modelValue, (v) => {
|
|
52
56
|
expand.value = v;
|
|
53
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse2.js","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse flex column\">\n <div class=\"hzzt-collapse__top\">\n <div class=\"hzzt-collapse__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div v-if=\"showLine\" class=\"hzzt-collapse__line\" />\n <slot name=\"toggle-btn\">\n <div class=\"hzzt-collapse__btn\" @click=\"toggle\">\n <hzzt-icon :name=\"!expand ? 'hzzt-plus-square-outline' : 'hzzt-minus-square-outline'\"\n class=\"hzzt-collapse__icon\" size=\"14\" />\n <span>{{ expand ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand') }}</span>\n </div>\n </slot>\n </div>\n <div v-show=\"expand\" class=\"hzzt-collapse__content flex-1\">\n <slot />\n </div>\n\n <slot :active=\"expand\" name=\"active\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {useLocale} from '@hzzt-plus/hooks'\n import HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n import {ref, watch} from 'vue'\n\n defineOptions({\n name: 'HzztCollapse',\n })\n const {t} = useLocale()\n const props = defineProps({\n defaultActive: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n showLine: {\n type: Boolean,\n default: true,\n },\n modelValue: {\n type: Boolean,\n default: true,\n },\n })\n const emit = defineEmits(['update:modelValue'])\n\n const expand = ref(props.modelValue)\n\n if (!props.defaultActive) {\n emit('update:modelValue', false);\n expand.value = false;\n }\n\n watch(() => props.modelValue, (v) => {\n expand.value = v;\n })\n\n function toggle() {\n expand.value = !expand.value;\n emit('update:modelValue', expand.value);\n }\n\n</script>\n"],"names":["useLocale","ref","watch"],"mappings":";;;;;;;;;;;;;;;;;;uCA8BgB,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAM,MAAA,EAAC,CAAC,EAAA,GAAIA,eAAU,EAAA,CAAA;AAqBtB,IAAM,MAAA,MAAA,GAASC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAEnC,IAAI,IAAA,CAAC,MAAM,aAAe,EAAA;AACxB,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,MAAA,CAAO,KAAQ,GAAA,KAAA,CAAA;AAAA,KACjB;AAEA,IAAAC,SAAA,CAAM,MAAM,KAAA,CAAM,UAAY,EAAA,CAAC,CAAM,KAAA;AACnC,MAAA,MAAA,CAAO,KAAQ,GAAA,CAAA,CAAA;AAAA,KAChB,CAAA,CAAA;AAED,IAAA,SAAS,MAAS,GAAA;AAChB,MAAO,MAAA,CAAA,KAAA,GAAQ,CAAC,MAAO,CAAA,KAAA,CAAA;AACvB,MAAK,IAAA,CAAA,mBAAA,EAAqB,OAAO,KAAK,CAAA,CAAA;AAAA,KACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"collapse2.js","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-collapse flex column\">\n <div class=\"hzzt-collapse__top\">\n <div class=\"hzzt-collapse__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div v-if=\"showLine\" class=\"hzzt-collapse__line\" />\n <slot name=\"toggle-btn\">\n <div class=\"hzzt-collapse__btn\" @click=\"toggle\">\n <hzzt-icon :name=\"!expand ? 'hzzt-plus-square-outline' : 'hzzt-minus-square-outline'\"\n class=\"hzzt-collapse__icon\" size=\"14\" />\n <span>{{ expand ? t('hzzt.collapse.retract') : t('hzzt.collapse.expand') }}</span>\n </div>\n </slot>\n </div>\n <div v-show=\"expand\" class=\"hzzt-collapse__content flex-1\">\n <slot />\n </div>\n\n <slot :active=\"expand\" name=\"active\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {useLocale} from '@hzzt-plus/hooks'\n import HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n import {ref, watch} from 'vue'\n\n defineOptions({\n name: 'HzztCollapse',\n })\n const {t} = useLocale()\n const props = defineProps({\n defaultActive: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n showLine: {\n type: Boolean,\n default: true,\n },\n modelValue: {\n type: Boolean,\n default: true,\n },\n })\n const emit = defineEmits(['update:modelValue'])\n\n const expand = ref(props.modelValue)\n\n if (!props.defaultActive) {\n emit('update:modelValue', false);\n expand.value = false;\n }\n\n watch(() => props.defaultActive, (v) => {\n emit('update:modelValue', v);\n expand.value = v;\n })\n\n watch(() => props.modelValue, (v) => {\n expand.value = v;\n })\n\n function toggle() {\n expand.value = !expand.value;\n emit('update:modelValue', expand.value);\n }\n\n</script>\n"],"names":["useLocale","ref","watch"],"mappings":";;;;;;;;;;;;;;;;;;uCA8BgB,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAM,MAAA,EAAC,CAAC,EAAA,GAAIA,eAAU,EAAA,CAAA;AAqBtB,IAAM,MAAA,MAAA,GAASC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAEnC,IAAI,IAAA,CAAC,MAAM,aAAe,EAAA;AACxB,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,MAAA,CAAO,KAAQ,GAAA,KAAA,CAAA;AAAA,KACjB;AAEA,IAAAC,SAAA,CAAM,MAAM,KAAA,CAAM,aAAe,EAAA,CAAC,CAAM,KAAA;AACtC,MAAA,IAAA,CAAK,qBAAqB,CAAC,CAAA,CAAA;AAC3B,MAAA,MAAA,CAAO,KAAQ,GAAA,CAAA,CAAA;AAAA,KAChB,CAAA,CAAA;AAED,IAAAA,SAAA,CAAM,MAAM,KAAA,CAAM,UAAY,EAAA,CAAC,CAAM,KAAA;AACnC,MAAA,MAAA,CAAO,KAAQ,GAAA,CAAA,CAAA;AAAA,KAChB,CAAA,CAAA;AAED,IAAA,SAAS,MAAS,GAAA;AAChB,MAAO,MAAA,CAAA,KAAA,GAAQ,CAAC,MAAO,CAAA,KAAA,CAAA;AACvB,MAAK,IAAA,CAAA,mBAAA,EAAqB,OAAO,KAAK,CAAA,CAAA;AAAA,KACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
package/theme/hzzt-cascader.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.hzzt-cascader__input{left:0;position:absolute;right:0;top:0;z-index:2}.hzzt-cascader__input .el-input__inner{cursor:pointer}.hzzt-cascader__cascader .el-input__suffix{z-index:3}.hzzt-cascader__cascader .el-input{--el-input-border:none;--el-input-focus-border:none;--el-input-focus-border-color:none}
|
|
1
|
+
.hzzt-cascader{line-height:1}.hzzt-cascader__input{left:0;position:absolute;right:0;top:0;z-index:2}.hzzt-cascader__input .el-input__inner{cursor:pointer}.hzzt-cascader__cascader{--el-input-width:100%;width:var(--el-input-width)}.hzzt-cascader__cascader .el-input__suffix{z-index:3}.hzzt-cascader__cascader .el-input{--el-input-border:none;--el-input-focus-border:none;--el-input-focus-border-color:none}
|