hzzt-plus 1.0.7 → 2.0.1
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +575 -366
- package/dist/index.full.min.js +10 -10
- 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 +576 -368
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/collapse/index.d.ts +161 -8
- package/es/components/collapse/src/collapse.vue.d.ts +161 -8
- package/es/components/collapse/src/collapse2.mjs +50 -29
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/icon/index.mjs +4 -0
- package/es/components/icon/index.mjs.map +1 -1
- package/es/components/icon/src/components/index.d.ts +2 -0
- package/es/components/icon/src/components/index.mjs +3 -0
- package/es/components/icon/src/components/index.mjs.map +1 -0
- package/es/components/icon/src/components/minus-square-outline.mjs +29 -0
- package/es/components/icon/src/components/minus-square-outline.mjs.map +1 -0
- package/es/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
- package/es/components/icon/src/components/plus-square-outline.mjs +29 -0
- package/es/components/icon/src/components/plus-square-outline.mjs.map +1 -0
- package/es/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +3 -2
- package/es/components/index.mjs.map +1 -1
- package/es/components/input-range/index.mjs +2 -2
- package/es/components/input-range/src/input-range.mjs +76 -26
- package/es/components/input-range/src/input-range.mjs.map +1 -1
- package/es/components/input-range/src/input-range2.mjs +26 -76
- package/es/components/input-range/src/input-range2.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/src/index.mjs +49 -21
- package/es/components/pagination/src/index.mjs.map +1 -1
- package/es/components/pagination/src/index.vue.d.ts +2 -2
- package/es/components/scroll/index.d.ts +5 -0
- package/es/components/scroll/index.mjs +9 -0
- package/es/components/scroll/index.mjs.map +1 -0
- package/es/components/scroll/src/scroll.d.ts +2 -0
- package/es/components/scroll/src/scroll.mjs +88 -0
- package/es/components/scroll/src/scroll.mjs.map +1 -0
- package/es/components/scroll/src/scroll.vue.d.ts +147 -0
- package/es/components/scroll/src/scroll2.mjs +2 -0
- package/es/components/scroll/src/scroll2.mjs.map +1 -0
- package/es/components/scroll/style/css.d.ts +2 -0
- package/es/components/scroll/style/css.mjs +3 -0
- package/es/components/scroll/style/css.mjs.map +1 -0
- package/es/components/scroll/style/index.d.ts +2 -0
- package/es/components/scroll/style/index.mjs +3 -0
- package/es/components/scroll/style/index.mjs.map +1 -0
- package/es/components/select-input/index.d.ts +43 -4
- package/es/components/select-input/index.mjs +2 -2
- package/es/components/select-input/src/select-input.d.ts +1 -1
- package/es/components/select-input/src/select-input.mjs +45 -124
- package/es/components/select-input/src/select-input.mjs.map +1 -1
- package/es/components/select-input/src/select-input.vue.d.ts +43 -4
- package/es/components/select-input/src/select-input2.mjs +124 -45
- package/es/components/select-input/src/select-input2.mjs.map +1 -1
- package/es/components/select-textarea/src/select-textarea.d.ts +2 -1
- package/es/components/select-textarea/src/select-textarea.mjs +2 -1
- package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
- package/es/components/select-textarea/src/select-textarea.vue.d.ts +53 -4
- package/es/components/select-textarea/src/select-textarea2.mjs +14 -9
- package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
- package/es/components/title/src/title.d.ts +6 -0
- package/es/components/title/src/title.mjs +4 -1
- package/es/components/title/src/title.mjs.map +1 -1
- package/es/components/title/src/title.vue.d.ts +39 -0
- package/es/components/title/src/title2.mjs +28 -12
- package/es/components/title/src/title2.mjs.map +1 -1
- package/es/index.mjs +3 -2
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/collapse/index.d.ts +161 -8
- package/lib/components/collapse/src/collapse.vue.d.ts +161 -8
- package/lib/components/collapse/src/collapse2.js +49 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/icon/index.js +4 -0
- package/lib/components/icon/index.js.map +1 -1
- package/lib/components/icon/src/components/index.d.ts +2 -0
- package/lib/components/icon/src/components/index.js +12 -0
- package/lib/components/icon/src/components/index.js.map +1 -0
- package/lib/components/icon/src/components/minus-square-outline.js +33 -0
- package/lib/components/icon/src/components/minus-square-outline.js.map +1 -0
- package/lib/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
- package/lib/components/icon/src/components/plus-square-outline.js +33 -0
- package/lib/components/icon/src/components/plus-square-outline.js.map +1 -0
- package/lib/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +4 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/input-range/index.js +2 -2
- package/lib/components/input-range/src/input-range.js +76 -27
- package/lib/components/input-range/src/input-range.js.map +1 -1
- package/lib/components/input-range/src/input-range2.js +27 -76
- package/lib/components/input-range/src/input-range2.js.map +1 -1
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/src/index.js +48 -20
- package/lib/components/pagination/src/index.js.map +1 -1
- package/lib/components/pagination/src/index.vue.d.ts +2 -2
- package/lib/components/scroll/index.d.ts +5 -0
- package/lib/components/scroll/index.js +14 -0
- package/lib/components/scroll/index.js.map +1 -0
- package/lib/components/scroll/src/scroll.d.ts +2 -0
- package/lib/components/scroll/src/scroll.js +92 -0
- package/lib/components/scroll/src/scroll.js.map +1 -0
- package/lib/components/scroll/src/scroll.vue.d.ts +147 -0
- package/lib/components/scroll/src/scroll2.js +3 -0
- package/lib/components/scroll/src/scroll2.js.map +1 -0
- package/lib/components/scroll/style/css.d.ts +2 -0
- package/lib/components/scroll/style/css.js +6 -0
- package/lib/components/scroll/style/css.js.map +1 -0
- package/lib/components/scroll/style/index.d.ts +2 -0
- package/lib/components/scroll/style/index.js +6 -0
- package/lib/components/scroll/style/index.js.map +1 -0
- package/lib/components/select-input/index.d.ts +43 -4
- package/lib/components/select-input/index.js +2 -2
- package/lib/components/select-input/src/select-input.d.ts +1 -1
- package/lib/components/select-input/src/select-input.js +46 -124
- package/lib/components/select-input/src/select-input.js.map +1 -1
- package/lib/components/select-input/src/select-input.vue.d.ts +43 -4
- package/lib/components/select-input/src/select-input2.js +124 -46
- package/lib/components/select-input/src/select-input2.js.map +1 -1
- package/lib/components/select-textarea/src/select-textarea.d.ts +2 -1
- package/lib/components/select-textarea/src/select-textarea.js +2 -1
- package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
- package/lib/components/select-textarea/src/select-textarea.vue.d.ts +53 -4
- package/lib/components/select-textarea/src/select-textarea2.js +13 -8
- package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
- package/lib/components/title/src/title.d.ts +6 -0
- package/lib/components/title/src/title.js +4 -1
- package/lib/components/title/src/title.js.map +1 -1
- package/lib/components/title/src/title.vue.d.ts +39 -0
- package/lib/components/title/src/title2.js +27 -11
- package/lib/components/title/src/title2.js.map +1 -1
- package/lib/index.js +34 -32
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/tags.json +1 -1
- package/theme/hzzt-collapse.css +1 -1
- package/theme/hzzt-pagination.css +1 -1
- package/theme/hzzt-scan.css +1 -1
- package/theme/hzzt-scroll.css +1 -0
- package/theme/hzzt-title.css +1 -1
- package/theme/index.css +1 -1
- package/theme/src/collapse.scss +45 -39
- package/theme/src/index.scss +1 -0
- package/theme/src/pagination.scss +24 -6
- package/theme/src/scan.scss +3 -3
- package/theme/src/scroll.scss +42 -0
- package/theme/src/title.scss +14 -5
- package/web-types.json +1 -1
|
@@ -5,7 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
disabled: BooleanConstructor;
|
|
6
6
|
replace: BooleanConstructor;
|
|
7
7
|
label: StringConstructor;
|
|
8
|
-
|
|
8
|
+
options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => OptionType[]) | (() => OptionType[]) | ((new (...args: any[]) => OptionType[]) | (() => OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
9
9
|
inputProps: ObjectConstructor;
|
|
10
10
|
customProps: ObjectConstructor;
|
|
11
11
|
position: import("../../../utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
disabled: BooleanConstructor;
|
|
30
30
|
replace: BooleanConstructor;
|
|
31
31
|
label: StringConstructor;
|
|
32
|
-
|
|
32
|
+
options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => OptionType[]) | (() => OptionType[]) | ((new (...args: any[]) => OptionType[]) | (() => OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
33
33
|
inputProps: ObjectConstructor;
|
|
34
34
|
customProps: ObjectConstructor;
|
|
35
35
|
position: import("../../../utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
@@ -89,13 +89,46 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
89
89
|
HzztTitle: import("vue").DefineComponent<{
|
|
90
90
|
readonly label: StringConstructor;
|
|
91
91
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
92
|
+
readonly size: {
|
|
93
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
94
|
+
readonly required: false;
|
|
95
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
96
|
+
__epPropKey: true;
|
|
97
|
+
};
|
|
92
98
|
}, {
|
|
93
99
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
94
100
|
readonly label: StringConstructor;
|
|
95
101
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
102
|
+
readonly size: {
|
|
103
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
104
|
+
readonly required: false;
|
|
105
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
106
|
+
__epPropKey: true;
|
|
107
|
+
};
|
|
96
108
|
}>> & {
|
|
97
109
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
98
110
|
}>>;
|
|
111
|
+
formSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
112
|
+
ns: {
|
|
113
|
+
namespace: import("vue").ComputedRef<string>;
|
|
114
|
+
b: (blockSuffix?: string) => string;
|
|
115
|
+
e: (element?: string | undefined) => string;
|
|
116
|
+
m: (modifier?: string | undefined) => string;
|
|
117
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
118
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
119
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
120
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
121
|
+
is: {
|
|
122
|
+
(name: string, state: boolean | undefined): string;
|
|
123
|
+
(name: string): string;
|
|
124
|
+
};
|
|
125
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
126
|
+
cssVarName: (name: string) => string;
|
|
127
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
128
|
+
cssVarBlockName: (name: string) => string;
|
|
129
|
+
};
|
|
130
|
+
trueSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
131
|
+
nameKls: import("vue").ComputedRef<string[]>;
|
|
99
132
|
slots: Readonly<{
|
|
100
133
|
[name: string]: import("vue").Slot | undefined;
|
|
101
134
|
}>;
|
|
@@ -103,6 +136,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
103
136
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
104
137
|
readonly label: StringConstructor;
|
|
105
138
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
139
|
+
readonly size: {
|
|
140
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
141
|
+
readonly required: false;
|
|
142
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
143
|
+
__epPropKey: true;
|
|
144
|
+
};
|
|
106
145
|
}>>, {
|
|
107
146
|
readonly sideline: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
108
147
|
}>;
|
|
@@ -793,7 +832,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
793
832
|
disabled: BooleanConstructor;
|
|
794
833
|
replace: BooleanConstructor;
|
|
795
834
|
label: StringConstructor;
|
|
796
|
-
|
|
835
|
+
options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => OptionType[]) | (() => OptionType[]) | ((new (...args: any[]) => OptionType[]) | (() => OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
797
836
|
inputProps: ObjectConstructor;
|
|
798
837
|
customProps: ObjectConstructor;
|
|
799
838
|
position: import("../../../utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
@@ -816,10 +855,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
816
855
|
onInput?: ((value: string | undefined) => any) | undefined;
|
|
817
856
|
}, {
|
|
818
857
|
disabled: boolean;
|
|
858
|
+
options: OptionType[];
|
|
819
859
|
modelValue: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown>;
|
|
820
860
|
replace: boolean;
|
|
821
861
|
split: string;
|
|
822
|
-
data: OptionType[];
|
|
823
862
|
position: string;
|
|
824
863
|
indexType: string;
|
|
825
864
|
}>;
|
|
@@ -1,50 +1,129 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createVNode, mergeProps, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
+
import { selectInputProps, selectInputEmits } from './select-input.mjs';
|
|
2
3
|
import '../../../hooks/index.mjs';
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useFormSize, useFormDisabled, ElInput, ElLink } from 'element-plus';
|
|
5
|
+
import HzztTitle from '../../title/src/title2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
+
import { useGlobalSize } from '../../../hooks/use-size/index.mjs';
|
|
9
|
+
import { numberToLetter } from '../../../hooks/use-letter/index.mjs';
|
|
8
10
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Number
|
|
14
|
-
]),
|
|
15
|
-
default: ""
|
|
16
|
-
},
|
|
17
|
-
indexType: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: "number"
|
|
20
|
-
},
|
|
21
|
-
disabled: Boolean,
|
|
22
|
-
replace: Boolean,
|
|
23
|
-
label: String,
|
|
24
|
-
data: {
|
|
25
|
-
type: definePropType(Array),
|
|
26
|
-
default: () => []
|
|
27
|
-
},
|
|
28
|
-
inputProps: Object,
|
|
29
|
-
customProps: Object,
|
|
30
|
-
position: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: "left"
|
|
33
|
-
},
|
|
34
|
-
formatLabel: {
|
|
35
|
-
type: Function
|
|
36
|
-
},
|
|
37
|
-
split: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: ""
|
|
40
|
-
},
|
|
41
|
-
size: useSizeProp
|
|
11
|
+
const _hoisted_1 = { slot: "append" };
|
|
12
|
+
const _hoisted_2 = { key: 0 };
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: "HzztSelectInput"
|
|
42
15
|
});
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: selectInputProps,
|
|
19
|
+
emits: selectInputEmits,
|
|
20
|
+
setup(__props, { emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const inputVal = ref(props.modelValue);
|
|
23
|
+
const nsInput = useNamespace("select-input");
|
|
24
|
+
const formSize = useFormSize();
|
|
25
|
+
const formDisabled = useFormDisabled();
|
|
26
|
+
const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
|
|
27
|
+
const trueDisabled = computed(() => props.disabled || formDisabled.value);
|
|
28
|
+
const containerCls = computed(() => [
|
|
29
|
+
nsInput.b(),
|
|
30
|
+
nsInput.m(trueSize.value)
|
|
31
|
+
]);
|
|
32
|
+
const inputContainerCls = computed(() => [
|
|
33
|
+
"flex",
|
|
34
|
+
props.position === "top" ? "column" : "row align-items-center"
|
|
35
|
+
]);
|
|
36
|
+
const inputCls = computed(() => [
|
|
37
|
+
"flex-1",
|
|
38
|
+
props.label ? props.position === "top" ? "margin-b-1" : "margin-l-1" : ""
|
|
39
|
+
]);
|
|
40
|
+
const _inputProps = computed(() => ({
|
|
41
|
+
disabled: trueDisabled.value,
|
|
42
|
+
clearable: true,
|
|
43
|
+
...props.inputProps
|
|
44
|
+
}));
|
|
45
|
+
watch(() => props.modelValue, (v) => {
|
|
46
|
+
inputVal.value = v;
|
|
47
|
+
});
|
|
48
|
+
function input(val) {
|
|
49
|
+
emit("update:modelValue", val);
|
|
50
|
+
emit("input", val);
|
|
51
|
+
}
|
|
52
|
+
function change(val) {
|
|
53
|
+
emit("change", val);
|
|
54
|
+
}
|
|
55
|
+
function getLinkName(item, index) {
|
|
56
|
+
let prefix = "";
|
|
57
|
+
if (props.indexType == "number") {
|
|
58
|
+
prefix = `\uFF08${index + 1}\uFF09`;
|
|
59
|
+
} else if (props.indexType == "letter") {
|
|
60
|
+
prefix = `\uFF08${numberToLetter(index)}\uFF09`;
|
|
61
|
+
}
|
|
62
|
+
return prefix + (item.label || item.value);
|
|
63
|
+
}
|
|
64
|
+
function select(item) {
|
|
65
|
+
const value = item.value || item.label;
|
|
66
|
+
let content = "";
|
|
67
|
+
if (!inputVal.value)
|
|
68
|
+
inputVal.value = "";
|
|
69
|
+
if (props.formatLabel) {
|
|
70
|
+
content = props.formatLabel(value);
|
|
71
|
+
} else if (props.replace) {
|
|
72
|
+
content = value;
|
|
73
|
+
} else {
|
|
74
|
+
content = inputVal.value ? `${inputVal.value}${props.split}${value}` : value;
|
|
75
|
+
}
|
|
76
|
+
inputVal.value = content;
|
|
77
|
+
input(content);
|
|
78
|
+
change(content);
|
|
79
|
+
}
|
|
80
|
+
return (_ctx, _cache) => {
|
|
81
|
+
return openBlock(), createElementBlock("div", {
|
|
82
|
+
class: normalizeClass(unref(containerCls))
|
|
83
|
+
}, [
|
|
84
|
+
createElementVNode("div", {
|
|
85
|
+
class: normalizeClass(unref(inputContainerCls))
|
|
86
|
+
}, [
|
|
87
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
88
|
+
createVNode(HzztTitle, { label: _ctx.label }, null, 8, ["label"])
|
|
89
|
+
]),
|
|
90
|
+
createVNode(unref(ElInput), mergeProps({
|
|
91
|
+
ref: "inputRef",
|
|
92
|
+
class: unref(inputCls),
|
|
93
|
+
modelValue: inputVal.value,
|
|
94
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event)
|
|
95
|
+
}, unref(_inputProps), {
|
|
96
|
+
onInput: input,
|
|
97
|
+
onChange: change
|
|
98
|
+
}), {
|
|
99
|
+
default: withCtx(() => [
|
|
100
|
+
createElementVNode("template", _hoisted_1, [
|
|
101
|
+
renderSlot(_ctx.$slots, "append")
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
_: 3
|
|
105
|
+
}, 16, ["class", "modelValue"])
|
|
106
|
+
], 2),
|
|
107
|
+
_ctx.options.length && !unref(trueDisabled) ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
108
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
|
|
109
|
+
return openBlock(), createBlock(unref(ElLink), mergeProps({
|
|
110
|
+
key: index,
|
|
111
|
+
class: "margin-r-4"
|
|
112
|
+
}, _ctx.customProps, {
|
|
113
|
+
onClick: ($event) => select(item)
|
|
114
|
+
}), {
|
|
115
|
+
default: withCtx(() => [
|
|
116
|
+
createTextVNode(toDisplayString(getLinkName(item, index)), 1)
|
|
117
|
+
]),
|
|
118
|
+
_: 2
|
|
119
|
+
}, 1040, ["onClick"]);
|
|
120
|
+
}), 128))
|
|
121
|
+
])) : createCommentVNode("v-if", true)
|
|
122
|
+
], 2);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
var SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "select-input.vue"]]);
|
|
48
127
|
|
|
49
|
-
export {
|
|
128
|
+
export { SelectInput as default };
|
|
50
129
|
//# sourceMappingURL=select-input2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-input2.mjs","sources":["../../../../../../packages/components/select-input/src/select-input.
|
|
1
|
+
{"version":3,"file":"select-input2.mjs","sources":["../../../../../../packages/components/select-input/src/select-input.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <div :class=\"inputContainerCls\">\n <slot name=\"title\">\n <hzzt-title :label=\"label\"></hzzt-title>\n </slot>\n <el-input ref=\"inputRef\"\n :class=\"inputCls\"\n v-model=\"inputVal\"\n v-bind=\"_inputProps\"\n @input=\"input\"\n @change=\"change\"\n >\n <template slot=\"append\">\n <slot name=\"append\"></slot>\n </template>\n </el-input>\n </div>\n <div v-if=\"options.length&&!trueDisabled\">\n <el-link v-for=\"(item, index) in options\" :key=\"index\" class=\"margin-r-4\" v-bind=\"customProps\" @click=\"select(item)\">\n {{ getLinkName(item, index) }}\n </el-link>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {computed, ref, watch} from 'vue'\n import {selectInputEmits, selectInputProps} from './select-input'\n import {useGlobalSize, useNamespace, numberToLetter} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import HzztTitle from \"@hzzt-plus/components/title/src/title.vue\";\n import {ElInput, ElLink} from 'element-plus'\n import {OptionType} from \"@hzzt-plus/components/select/src/select\";\n\n defineOptions({\n name: 'HzztSelectInput',\n })\n\n const props = defineProps(selectInputProps)\n const emit = defineEmits(selectInputEmits)\n\n const inputVal = ref(props.modelValue);\n\n const nsInput = useNamespace('select-input')\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 nsInput.b(),\n nsInput.m(trueSize.value),\n ])\n\n const inputContainerCls = computed(() => [\n 'flex',\n props.position === 'top' ? 'column' : 'row align-items-center'\n ])\n\n const inputCls = computed(() => [\n 'flex-1',\n props.label ? props.position === 'top' ? 'margin-b-1' : 'margin-l-1' : ''\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n clearable: true,\n ...props.inputProps,\n }))\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v;\n })\n\n function input(val: string) {\n emit('update:modelValue', val);\n emit('input', val);\n }\n\n function change(val: string) {\n emit('change', val);\n }\n\n function getLinkName(item: OptionType, index: number) {\n let prefix = '';\n if (props.indexType == 'number') {\n prefix = `(${index + 1})`\n } else if (props.indexType == 'letter') {\n prefix = `(${numberToLetter(index)})`\n }\n return prefix + (item.label || item.value);\n }\n\n function select(item: OptionType) {\n const value = item.value||item.label;\n let content = '';\n if (!inputVal.value) inputVal.value = '';\n if (props.formatLabel) {\n content = props.formatLabel(value);\n } else if (props.replace) {\n content = value;\n } else {\n content = inputVal.value ? `${inputVal.value}${props.split}${value}` : value;\n }\n inputVal.value = content;\n input(content);\n change(content);\n }\n\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;mCAmCgB,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAErC,IAAM,MAAA,OAAA,GAAU,aAAa,cAAc,CAAA,CAAA;AAC3C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA;AAEA,MAAA;AAEA,MAAM,OAAA,CAA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|
|
13
|
-
|
|
13
|
+
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => OptionType[]) | (() => OptionType[]) | ((new (...args: any[]) => OptionType[]) | (() => OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
14
14
|
inputProps: ObjectConstructor;
|
|
15
|
+
selectProps: ObjectConstructor;
|
|
15
16
|
replace: BooleanConstructor;
|
|
16
17
|
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, string, boolean>;
|
|
17
18
|
};
|
|
@@ -11,11 +11,12 @@ const selectTextareaProps = buildProps({
|
|
|
11
11
|
size: useSizeProp,
|
|
12
12
|
disabled: Boolean,
|
|
13
13
|
label: String,
|
|
14
|
-
|
|
14
|
+
options: {
|
|
15
15
|
type: definePropType(Array),
|
|
16
16
|
default: () => []
|
|
17
17
|
},
|
|
18
18
|
inputProps: Object,
|
|
19
|
+
selectProps: Object,
|
|
19
20
|
replace: Boolean,
|
|
20
21
|
modelValue: {
|
|
21
22
|
type: definePropType([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-textarea.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.ts"],"sourcesContent":["import {buildProps, definePropType, isString, isNumber, isBoolean} from '@hzzt-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type SelectTextarea from './select-textarea.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport {OptionType} from \"@hzzt-plus/components\";\nimport {CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const selectTextareaProps = buildProps({\n size: useSizeProp,\n disabled: Boolean,\n label: String,\n
|
|
1
|
+
{"version":3,"file":"select-textarea.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.ts"],"sourcesContent":["import {buildProps, definePropType, isString, isNumber, isBoolean} from '@hzzt-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type SelectTextarea from './select-textarea.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport {OptionType} from \"@hzzt-plus/components\";\nimport {CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const selectTextareaProps = buildProps({\n size: useSizeProp,\n disabled: Boolean,\n label: String,\n options: {\n type: definePropType<OptionType[]>(Array),\n default: () => [],\n },\n inputProps: Object,\n selectProps: Object,\n replace: Boolean,\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n ]),\n default: '',\n },\n})\n\nexport type SelectTextareaProps = ExtractPropTypes<typeof selectTextareaProps>\n\nexport const selectTextareaEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [INPUT_EVENT]: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n select: (val: string | number | boolean | undefined) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\nexport type SelectTextareaEmits = typeof selectTextareaEmits\n\nexport type SelectTextareaInstance = InstanceType<typeof SelectTextarea>\n"],"names":[],"mappings":";;;;;;;;;AAGY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,mBAAmB,GAAG;AACnC,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC3E,EAAE,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC1E,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACnE;;;;"}
|
|
@@ -7,8 +7,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
};
|
|
8
8
|
disabled: BooleanConstructor;
|
|
9
9
|
label: StringConstructor;
|
|
10
|
-
|
|
10
|
+
options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
11
11
|
inputProps: ObjectConstructor;
|
|
12
|
+
selectProps: ObjectConstructor;
|
|
12
13
|
replace: BooleanConstructor;
|
|
13
14
|
modelValue: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, string, boolean>;
|
|
14
15
|
}, {
|
|
@@ -21,8 +22,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
22
|
};
|
|
22
23
|
disabled: BooleanConstructor;
|
|
23
24
|
label: StringConstructor;
|
|
24
|
-
|
|
25
|
+
options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
25
26
|
inputProps: ObjectConstructor;
|
|
27
|
+
selectProps: ObjectConstructor;
|
|
26
28
|
replace: BooleanConstructor;
|
|
27
29
|
modelValue: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, string, boolean>;
|
|
28
30
|
}>> & {
|
|
@@ -63,19 +65,59 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
65
|
disabled: boolean;
|
|
64
66
|
clearable: boolean;
|
|
65
67
|
}>;
|
|
68
|
+
_selectProps: import("vue").ComputedRef<{
|
|
69
|
+
options: import("../..").OptionType[];
|
|
70
|
+
size: "" | "default" | "small" | "large";
|
|
71
|
+
filterable: boolean;
|
|
72
|
+
clearable: boolean;
|
|
73
|
+
allowCreate: boolean;
|
|
74
|
+
}>;
|
|
66
75
|
input: (val: string) => void;
|
|
67
76
|
change: (val: string) => void;
|
|
68
77
|
selectChange: (val: string) => void;
|
|
69
78
|
HzztTitle: import("vue").DefineComponent<{
|
|
70
79
|
readonly label: StringConstructor;
|
|
71
80
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
81
|
+
readonly size: {
|
|
82
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
83
|
+
readonly required: false;
|
|
84
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
85
|
+
__epPropKey: true;
|
|
86
|
+
};
|
|
72
87
|
}, {
|
|
73
88
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
74
89
|
readonly label: StringConstructor;
|
|
75
90
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
91
|
+
readonly size: {
|
|
92
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
93
|
+
readonly required: false;
|
|
94
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
95
|
+
__epPropKey: true;
|
|
96
|
+
};
|
|
76
97
|
}>> & {
|
|
77
98
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
78
99
|
}>>;
|
|
100
|
+
formSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
101
|
+
ns: {
|
|
102
|
+
namespace: import("vue").ComputedRef<string>;
|
|
103
|
+
b: (blockSuffix?: string) => string;
|
|
104
|
+
e: (element?: string | undefined) => string;
|
|
105
|
+
m: (modifier?: string | undefined) => string;
|
|
106
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
107
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
108
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
109
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
110
|
+
is: {
|
|
111
|
+
(name: string, state: boolean | undefined): string;
|
|
112
|
+
(name: string): string;
|
|
113
|
+
};
|
|
114
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
115
|
+
cssVarName: (name: string) => string;
|
|
116
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
117
|
+
cssVarBlockName: (name: string) => string;
|
|
118
|
+
};
|
|
119
|
+
trueSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
120
|
+
nameKls: import("vue").ComputedRef<string[]>;
|
|
79
121
|
slots: Readonly<{
|
|
80
122
|
[name: string]: import("vue").Slot | undefined;
|
|
81
123
|
}>;
|
|
@@ -83,6 +125,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
125
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
84
126
|
readonly label: StringConstructor;
|
|
85
127
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
128
|
+
readonly size: {
|
|
129
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
130
|
+
readonly required: false;
|
|
131
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
132
|
+
__epPropKey: true;
|
|
133
|
+
};
|
|
86
134
|
}>>, {
|
|
87
135
|
readonly sideline: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
88
136
|
}>;
|
|
@@ -13057,8 +13105,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13057
13105
|
};
|
|
13058
13106
|
disabled: BooleanConstructor;
|
|
13059
13107
|
label: StringConstructor;
|
|
13060
|
-
|
|
13108
|
+
options: import("../../../utils").EpPropFinalized<(new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]) | ((new (...args: any[]) => import("../..").OptionType[]) | (() => import("../..").OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
13061
13109
|
inputProps: ObjectConstructor;
|
|
13110
|
+
selectProps: ObjectConstructor;
|
|
13062
13111
|
replace: BooleanConstructor;
|
|
13063
13112
|
modelValue: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, string, boolean>;
|
|
13064
13113
|
}>> & {
|
|
@@ -13068,8 +13117,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13068
13117
|
onSelect?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
13069
13118
|
}, {
|
|
13070
13119
|
disabled: boolean;
|
|
13120
|
+
options: import("../..").OptionType[];
|
|
13071
13121
|
modelValue: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown>;
|
|
13072
13122
|
replace: boolean;
|
|
13073
|
-
data: import("../..").OptionType[];
|
|
13074
13123
|
}>;
|
|
13075
13124
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createVNode, createBlock,
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createVNode, createBlock, mergeProps, createCommentVNode } from 'vue';
|
|
2
2
|
import { selectTextareaProps, selectTextareaEmits } from './select-textarea.mjs';
|
|
3
3
|
import '../../../hooks/index.mjs';
|
|
4
4
|
import { useFormSize, useFormDisabled, ElSelectV2, ElInput } from 'element-plus';
|
|
@@ -37,6 +37,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
37
|
...props.inputProps,
|
|
38
38
|
type: "textarea"
|
|
39
39
|
}));
|
|
40
|
+
const _selectProps = computed(() => ({
|
|
41
|
+
options: props.options,
|
|
42
|
+
size: trueSize.value,
|
|
43
|
+
filterable: true,
|
|
44
|
+
clearable: true,
|
|
45
|
+
allowCreate: true,
|
|
46
|
+
...props.selectProps
|
|
47
|
+
}));
|
|
40
48
|
watch(() => props.modelValue, (v) => {
|
|
41
49
|
inputVal.value = v;
|
|
42
50
|
});
|
|
@@ -68,21 +76,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
68
76
|
createElementVNode("div", _hoisted_2, [
|
|
69
77
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
70
78
|
createVNode(HzztTitle, {
|
|
79
|
+
size: unref(trueSize),
|
|
71
80
|
class: "margin-l-1",
|
|
72
81
|
label: _ctx.label
|
|
73
|
-
}, null, 8, ["label"])
|
|
82
|
+
}, null, 8, ["size", "label"])
|
|
74
83
|
]),
|
|
75
|
-
!unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), {
|
|
84
|
+
!unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), mergeProps({
|
|
76
85
|
key: 0,
|
|
77
86
|
class: "flex-1",
|
|
78
87
|
modelValue: selectValue.value,
|
|
79
88
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
clearable: "",
|
|
83
|
-
onChange: selectChange,
|
|
84
|
-
options: _ctx.data
|
|
85
|
-
}, null, 8, ["modelValue", "options"])) : createCommentVNode("v-if", true),
|
|
89
|
+
onChange: selectChange
|
|
90
|
+
}, unref(_selectProps)), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
86
91
|
renderSlot(_ctx.$slots, "right")
|
|
87
92
|
]),
|
|
88
93
|
createVNode(unref(ElInput), mergeProps({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-textarea2.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <div class=\"flex column\">\n <div class=\"flex align-items-center\">\n <slot name=\"title\">\n <hzzt-title class=\"margin-l-1\" :label=\"label\"></hzzt-title>\n </slot>\n <el-select-v2 class=\"flex-1\" v-model=\"selectValue\"
|
|
1
|
+
{"version":3,"file":"select-textarea2.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <div class=\"flex column\">\n <div class=\"flex align-items-center\">\n <slot name=\"title\">\n <hzzt-title :size=\"trueSize\" class=\"margin-l-1\" :label=\"label\"></hzzt-title>\n </slot>\n <el-select-v2 class=\"flex-1\" v-model=\"selectValue\" @change=\"selectChange\"\n v-if=\"!trueDisabled\" v-bind=\"_selectProps\"></el-select-v2>\n <slot name=\"right\"></slot>\n </div>\n <el-input ref=\"inputRef\" class=\"flex-1 margin-t-1\" v-model=\"inputVal\" v-bind=\"_inputProps\"\n @input=\"input\"\n @change=\"change\"></el-input>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {selectTextareaProps, selectTextareaEmits} from './select-textarea'\n import {computed, ref, watch} from \"vue\";\n import {useGlobalSize, useNamespace, insertCursorPosition} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import HzztTitle from \"@hzzt-plus/components/title/src/title.vue\";\n import {ElInput, ElSelectV2} from 'element-plus'\n\n defineOptions({\n name: 'HzztSelectTextarea',\n })\n\n const props = defineProps(selectTextareaProps)\n const emit = defineEmits(selectTextareaEmits)\n\n const inputVal = ref(props.modelValue);\n const selectValue = ref('');\n const inputRef = ref();\n\n const nsInput = useNamespace('select-textarea')\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 nsInput.b(),\n nsInput.m(trueSize.value),\n ])\n\n const _inputProps = computed(() => ({\n disabled: trueDisabled.value,\n clearable: true,\n ...props.inputProps,\n type: 'textarea',\n }))\n\n const _selectProps = computed(() => ({\n options: props.options,\n size: trueSize.value,\n filterable: true,\n clearable: true,\n allowCreate: true,\n ...props.selectProps,\n }))\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v;\n })\n\n function input(val: string) {\n emit('update:modelValue', val);\n emit('input', val);\n }\n\n function change(val: string) {\n emit('change', val);\n }\n\n function selectChange(val: string) {\n if (!inputVal.value && inputVal.value !== 0) inputVal.value = '';\n selectValue.value = '';\n let content = val;\n if (!props.replace) {\n const inputEl = inputRef.value.$el.getElementsByTagName('textarea')[0];\n content = insertCursorPosition(inputEl, val);\n }\n input(content);\n change(content);\n emit('select', val);\n }\n\n\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;mCA0BgB,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACrC,IAAM,MAAA,WAAA,GAAc,IAAI,EAAE,CAAA,CAAA;AAC1B,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAM,MAAA,OAAA,GAAU,aAAa,iBAAiB,CAAA,CAAA;AAC9C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA;AAEA,MAAA;AAEA,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,KAAA,CAClC;AAAU,IACV,MAAA,WAAU,GAAA,QAAc,CAAA,OAAA;AAAA,MACzB,QAAA,EAAA,YAAA,CAAA,KAAA;AAED,MAAM,SAAA,EAAA,IAAA;AAA8B,MAClC,mBAAuB;AAAA,MACvB,IAAW,EAAA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AA,CAAA,OAAA,CAAA,CAAA;AACA,MAAA,IAAA,CAAA,QAAa,EAAA,GAAA,CAAA,CAAA;AACb,KAAA;AACA,IAAA,OAAK,aAAa,KAAA;AAAA,MACpB,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,6 +3,12 @@ import type Title from './title.vue';
|
|
|
3
3
|
export declare const titleProps: {
|
|
4
4
|
readonly label: StringConstructor;
|
|
5
5
|
readonly sideline: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
6
|
+
readonly size: {
|
|
7
|
+
readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
8
|
+
readonly required: false;
|
|
9
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
10
|
+
__epPropKey: true;
|
|
11
|
+
};
|
|
6
12
|
};
|
|
7
13
|
export declare type TitleProps = ExtractPropTypes<typeof titleProps>;
|
|
8
14
|
export declare type TitleInstance = InstanceType<typeof Title>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import '../../../utils/index.mjs';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
2
3
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
3
5
|
|
|
4
6
|
const titleProps = buildProps({
|
|
5
7
|
label: String,
|
|
6
8
|
sideline: {
|
|
7
9
|
type: Boolean,
|
|
8
10
|
default: true
|
|
9
|
-
}
|
|
11
|
+
},
|
|
12
|
+
size: useSizeProp
|
|
10
13
|
});
|
|
11
14
|
|
|
12
15
|
export { titleProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.mjs","sources":["../../../../../../packages/components/title/src/title.ts"],"sourcesContent":["import { buildProps } from '@hzzt-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Title from './title.vue'\n\nexport const titleProps = buildProps({\n label: String,\n sideline: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type TitleProps = ExtractPropTypes<typeof titleProps>\n\nexport type TitleInstance = InstanceType<typeof Title>\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"title.mjs","sources":["../../../../../../packages/components/title/src/title.ts"],"sourcesContent":["import { buildProps } from '@hzzt-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Title from './title.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\n\nexport const titleProps = buildProps({\n label: String,\n sideline: {\n type: Boolean,\n default: true,\n },\n size: useSizeProp,\n} as const)\nexport type TitleProps = ExtractPropTypes<typeof titleProps>\n\nexport type TitleInstance = InstanceType<typeof Title>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,CAAC;;;;"}
|