hzzt-plus 1.0.4 → 1.0.6
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 +505 -193
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +500 -194
- 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 +5 -1
- package/es/component.mjs.map +1 -1
- package/es/components/click-input/index.d.ts +638 -0
- package/es/components/click-input/index.mjs +9 -0
- package/es/components/click-input/index.mjs.map +1 -0
- package/es/components/click-input/src/click-input.d.ts +22 -0
- package/es/components/click-input/src/click-input.mjs +26 -0
- package/es/components/click-input/src/click-input.mjs.map +1 -0
- package/es/components/click-input/src/click-input.vue.d.ts +638 -0
- package/es/components/click-input/src/click-input2.mjs +89 -0
- package/es/components/click-input/src/click-input2.mjs.map +1 -0
- package/es/components/click-input/style/css.d.ts +2 -0
- package/es/components/click-input/style/css.mjs +3 -0
- package/es/components/click-input/style/css.mjs.map +1 -0
- package/es/components/click-input/style/index.d.ts +2 -0
- package/es/components/click-input/style/index.mjs +3 -0
- package/es/components/click-input/style/index.mjs.map +1 -0
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +0 -67
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +67 -0
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/index.d.ts +2 -0
- package/es/components/index.mjs +5 -1
- package/es/components/index.mjs.map +1 -1
- package/es/components/scan/index.mjs +2 -2
- package/es/components/scan/src/scan.mjs +23 -144
- package/es/components/scan/src/scan.mjs.map +1 -1
- package/es/components/scan/src/scan2.mjs +144 -23
- package/es/components/scan/src/scan2.mjs.map +1 -1
- package/es/components/select/index.d.ts +5 -0
- package/es/components/select/index.mjs +9 -0
- package/es/components/select/index.mjs.map +1 -0
- package/es/components/select/src/select.d.ts +38 -0
- package/es/components/select/src/select.mjs +43 -0
- package/es/components/select/src/select.mjs.map +1 -0
- package/es/components/select/src/select.vue.d.ts +13241 -0
- package/es/components/select/src/select2.mjs +183 -0
- package/es/components/select/src/select2.mjs.map +1 -0
- package/es/components/select/style/css.d.ts +2 -0
- package/es/components/select/style/css.mjs +3 -0
- package/es/components/select/style/css.mjs.map +1 -0
- package/es/components/select/style/index.d.ts +2 -0
- package/es/components/select/style/index.mjs +3 -0
- package/es/components/select/style/index.mjs.map +1 -0
- package/es/components/select-input/index.d.ts +6 -6
- package/es/components/select-input/src/select-input.d.ts +1 -7
- package/es/components/select-input/src/select-input.mjs.map +1 -1
- package/es/components/select-input/src/select-input.vue.d.ts +1 -1
- package/es/components/select-input/src/select-input2.mjs.map +1 -1
- package/es/index.mjs +5 -1
- 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 +2 -0
- package/lib/component.js +5 -1
- package/lib/component.js.map +1 -1
- package/lib/components/click-input/index.d.ts +638 -0
- package/lib/components/click-input/index.js +16 -0
- package/lib/components/click-input/index.js.map +1 -0
- package/lib/components/click-input/src/click-input.d.ts +22 -0
- package/lib/components/click-input/src/click-input.js +31 -0
- package/lib/components/click-input/src/click-input.js.map +1 -0
- package/lib/components/click-input/src/click-input.vue.d.ts +638 -0
- package/lib/components/click-input/src/click-input2.js +93 -0
- package/lib/components/click-input/src/click-input2.js.map +1 -0
- package/lib/components/click-input/style/css.d.ts +2 -0
- package/lib/components/click-input/style/css.js +6 -0
- package/lib/components/click-input/style/css.js.map +1 -0
- package/lib/components/click-input/style/index.d.ts +2 -0
- package/lib/components/click-input/style/index.js +6 -0
- package/lib/components/click-input/style/index.js.map +1 -0
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +0 -70
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +70 -0
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +11 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/scan/index.js +2 -2
- package/lib/components/scan/src/scan.js +24 -144
- package/lib/components/scan/src/scan.js.map +1 -1
- package/lib/components/scan/src/scan2.js +144 -24
- package/lib/components/scan/src/scan2.js.map +1 -1
- package/lib/components/select/index.d.ts +5 -0
- package/lib/components/select/index.js +16 -0
- package/lib/components/select/index.js.map +1 -0
- package/lib/components/select/src/select.d.ts +38 -0
- package/lib/components/select/src/select.js +48 -0
- package/lib/components/select/src/select.js.map +1 -0
- package/lib/components/select/src/select.vue.d.ts +13241 -0
- package/lib/components/select/src/select2.js +187 -0
- package/lib/components/select/src/select2.js.map +1 -0
- package/lib/components/select/style/css.d.ts +2 -0
- package/lib/components/select/style/css.js +6 -0
- package/lib/components/select/style/css.js.map +1 -0
- package/lib/components/select/style/index.d.ts +2 -0
- package/lib/components/select/style/index.js +6 -0
- package/lib/components/select/style/index.js.map +1 -0
- package/lib/components/select-input/index.d.ts +6 -6
- package/lib/components/select-input/src/select-input.d.ts +1 -7
- package/lib/components/select-input/src/select-input.js.map +1 -1
- package/lib/components/select-input/src/select-input.vue.d.ts +1 -1
- package/lib/components/select-input/src/select-input2.js.map +1 -1
- package/lib/index.js +41 -31
- 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-click-input.css +1 -0
- package/theme/hzzt-select.css +1 -0
- package/theme/index.css +1 -1
- package/theme/src/click-input.scss +19 -0
- package/theme/src/index.scss +2 -0
- package/theme/src/mixins/mixins.scss +3 -0
- package/theme/src/select.scss +10 -0
- package/web-types.json +1 -1
|
@@ -1,28 +1,149 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { isString } from '@vue/shared';
|
|
1
|
+
import { createElementVNode, defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, toDisplayString } from 'vue';
|
|
2
|
+
import { ElInput } from 'element-plus';
|
|
3
|
+
import { scanProps, scanEmits } from './scan.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
5
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { style: { "width": "0", "height": "0", "overflow": "hidden" } }, [
|
|
7
|
+
/* @__PURE__ */ createElementVNode("input", {
|
|
8
|
+
readonly: "",
|
|
9
|
+
style: { "width": "0", "height": "0", "overflow": "hidden" }
|
|
10
|
+
}),
|
|
11
|
+
/* @__PURE__ */ createElementVNode("input", {
|
|
12
|
+
readonly: "",
|
|
13
|
+
type: "password",
|
|
14
|
+
autocomplete: "off",
|
|
15
|
+
style: { "width": "0", "height": "0", "overflow": "hidden" }
|
|
16
|
+
})
|
|
17
|
+
], -1);
|
|
18
|
+
const _hoisted_2 = {
|
|
19
|
+
class: "width-100%",
|
|
20
|
+
style: { "overflow": "hidden" }
|
|
21
|
+
};
|
|
22
|
+
const __default__ = defineComponent({
|
|
23
|
+
inheritAttrs: false,
|
|
24
|
+
name: "HzztScan"
|
|
25
|
+
});
|
|
26
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
|
+
...__default__,
|
|
28
|
+
props: scanProps,
|
|
29
|
+
emits: scanEmits,
|
|
30
|
+
setup(__props, { expose, emit }) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const readonly = ref(true);
|
|
33
|
+
const innerValue = ref(" ");
|
|
34
|
+
const inputRef = ref();
|
|
35
|
+
const showValue = computed(() => {
|
|
36
|
+
if (innerValue.value === " ") {
|
|
37
|
+
return ` ${props.placeholder}`;
|
|
38
|
+
} else {
|
|
39
|
+
return innerValue.value;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const inputType = computed(() => {
|
|
43
|
+
if (innerValue.value && !readonly.value) {
|
|
44
|
+
return "password";
|
|
45
|
+
} else {
|
|
46
|
+
return "text";
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
watch(() => props.modelValue, (v) => {
|
|
50
|
+
if (!v) {
|
|
51
|
+
innerValue.value = " ";
|
|
52
|
+
} else {
|
|
53
|
+
innerValue.value = ` ${changeLetter(v)}`;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
watch(() => innerValue.value, (v) => {
|
|
57
|
+
if (!v) {
|
|
58
|
+
innerValue.value = " ";
|
|
59
|
+
}
|
|
60
|
+
const str = innerValue.value[0] === " " ? innerValue.value.slice(1) : innerValue.value;
|
|
61
|
+
const final = changeLetter(str != null ? str : "");
|
|
62
|
+
emit("update:modelValue", final);
|
|
63
|
+
emit("input", final);
|
|
64
|
+
});
|
|
65
|
+
function changeLetter(v) {
|
|
66
|
+
if (props.letter === "upper") {
|
|
67
|
+
return v.toLocaleUpperCase();
|
|
68
|
+
} else if (props.letter === "lower") {
|
|
69
|
+
return v.toLocaleLowerCase();
|
|
70
|
+
} else {
|
|
71
|
+
return v;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function inputFocus() {
|
|
75
|
+
readonly.value = false;
|
|
76
|
+
}
|
|
77
|
+
function inputBlur() {
|
|
78
|
+
readonly.value = true;
|
|
79
|
+
}
|
|
80
|
+
function inputChange() {
|
|
81
|
+
emit("change", props.modelValue);
|
|
82
|
+
}
|
|
83
|
+
function focus() {
|
|
84
|
+
readonly.value = false;
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
inputRef.value.focus();
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function blur() {
|
|
90
|
+
readonly.value = true;
|
|
91
|
+
inputRef.value.blur();
|
|
92
|
+
}
|
|
93
|
+
function clear() {
|
|
94
|
+
inputRef.value.clear();
|
|
95
|
+
}
|
|
96
|
+
expose({
|
|
97
|
+
focus,
|
|
98
|
+
blur,
|
|
99
|
+
clear
|
|
100
|
+
});
|
|
101
|
+
return (_ctx, _cache) => {
|
|
102
|
+
return openBlock(), createElementBlock("div", {
|
|
103
|
+
class: normalizeClass(["hzzt-scan", _ctx.$attrs.class]),
|
|
104
|
+
style: normalizeStyle([{ "position": "relative" }, _ctx.$attrs.style])
|
|
105
|
+
}, [
|
|
106
|
+
_hoisted_1,
|
|
107
|
+
createVNode(unref(ElInput), mergeProps({
|
|
108
|
+
ref_key: "inputRef",
|
|
109
|
+
ref: inputRef,
|
|
110
|
+
modelValue: innerValue.value,
|
|
111
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event)
|
|
112
|
+
}, {
|
|
113
|
+
..._ctx.$attrs,
|
|
114
|
+
class: "",
|
|
115
|
+
style: "",
|
|
116
|
+
onChange: ""
|
|
117
|
+
}, {
|
|
118
|
+
readonly: readonly.value,
|
|
119
|
+
type: unref(inputType),
|
|
120
|
+
class: "hzzt-scan-input-original",
|
|
121
|
+
autocomplete: "off",
|
|
122
|
+
onFocus: inputFocus,
|
|
123
|
+
onBlur: inputBlur,
|
|
124
|
+
onChange: inputChange
|
|
125
|
+
}), createSlots({
|
|
126
|
+
_: 2
|
|
127
|
+
}, [
|
|
128
|
+
renderList(_ctx.$slots, (_, key, index) => {
|
|
129
|
+
return {
|
|
130
|
+
name: key,
|
|
131
|
+
fn: withCtx(() => [
|
|
132
|
+
renderSlot(_ctx.$slots, key)
|
|
133
|
+
])
|
|
134
|
+
};
|
|
135
|
+
})
|
|
136
|
+
]), 1040, ["modelValue", "readonly", "type"]),
|
|
137
|
+
createElementVNode("div", {
|
|
138
|
+
class: normalizeClass(["hzzt-scan-input-backup", { "placeholder-color": innerValue.value === " " }])
|
|
139
|
+
}, [
|
|
140
|
+
createElementVNode("div", _hoisted_2, toDisplayString(unref(showValue)), 1)
|
|
141
|
+
], 2)
|
|
142
|
+
], 6);
|
|
143
|
+
};
|
|
19
144
|
}
|
|
20
145
|
});
|
|
21
|
-
|
|
22
|
-
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
|
23
|
-
[CHANGE_EVENT]: (value) => isString(value),
|
|
24
|
-
[INPUT_EVENT]: (value) => isString(value)
|
|
25
|
-
};
|
|
146
|
+
var Scan = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "scan.vue"]]);
|
|
26
147
|
|
|
27
|
-
export {
|
|
148
|
+
export { Scan as default };
|
|
28
149
|
//# sourceMappingURL=scan2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan2.mjs","sources":["../../../../../../packages/components/scan/src/scan.
|
|
1
|
+
{"version":3,"file":"scan2.mjs","sources":["../../../../../../packages/components/scan/src/scan.vue"],"sourcesContent":["<template>\n <div\n class=\"hzzt-scan\"\n style=\"position: relative\"\n :class=\"$attrs.class\"\n :style=\"$attrs.style\"\n >\n <div style=\"width: 0; height: 0; overflow: hidden\">\n <input readonly style=\"width: 0; height: 0; overflow: hidden\" />\n <input\n readonly\n type=\"password\"\n autocomplete=\"off\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n\n <el-input\n ref=\"inputRef\"\n v-model=\"innerValue\"\n v-bind=\"{\n ...$attrs,\n class: '',\n style: '',\n onChange: '',\n }\"\n :readonly=\"readonly\"\n :type=\"inputType\"\n class=\"hzzt-scan-input-original\"\n autocomplete=\"off\"\n @focus=\"inputFocus\"\n @blur=\"inputBlur\"\n @change=\"inputChange\"\n >\n <template v-for=\"(_, key, index) in $slots\" :key=\"index\" #[key]>\n <slot :name=\"key\" />\n </template>\n </el-input>\n <div\n class=\"hzzt-scan-input-backup\"\n :class=\"{ 'placeholder-color': innerValue === ' ' }\"\n >\n <div class=\"width-100%\" style=\"overflow: hidden\">\n {{ showValue }}\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElInput } from 'element-plus'\nimport { scanEmits, scanProps } from './scan'\n\ndefineOptions({\n inheritAttrs: false,\n name: 'HzztScan',\n})\n\nconst props = defineProps(scanProps)\n\nconst emit = defineEmits(scanEmits)\n\nconst readonly = ref(true)\nconst innerValue = ref(' ')\nconst inputRef = ref()\n\nconst showValue = computed(() => {\n if (innerValue.value === ' ') {\n return ` ${props.placeholder}`\n } else {\n return innerValue.value\n }\n})\n\nconst inputType = computed(() => {\n if (innerValue.value && !readonly.value) {\n return 'password'\n } else {\n return 'text'\n }\n})\n\nwatch(\n () => props.modelValue,\n (v) => {\n if (!v) {\n innerValue.value = ' '\n } else {\n innerValue.value = ` ${changeLetter(v)}`\n }\n }\n)\n\nwatch(\n () => innerValue.value,\n (v) => {\n if (!v) {\n innerValue.value = ' '\n }\n const str =\n innerValue.value[0] === ' ' ? innerValue.value.slice(1) : innerValue.value\n const final = changeLetter(str ?? '')\n emit('update:modelValue', final)\n emit('input', final)\n }\n)\n\nfunction changeLetter(v: string) {\n if (props.letter === 'upper') {\n return v.toLocaleUpperCase()\n } else if (props.letter === 'lower') {\n return v.toLocaleLowerCase()\n } else {\n return v\n }\n}\n\nfunction inputFocus() {\n readonly.value = false\n}\n\nfunction inputBlur() {\n readonly.value = true\n}\n\nfunction inputChange() {\n emit('change', props.modelValue)\n}\n\nfunction focus() {\n readonly.value = false\n setTimeout(() => {\n inputRef.value.focus()\n })\n}\n\nfunction blur() {\n readonly.value = true\n inputRef.value.blur()\n}\n\nfunction clear() {\n inputRef.value.clear()\n}\n\ndefineExpose({\n focus,\n blur,\n clear,\n})\n</script>\n"],"names":["_defineComponent","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createVNode","_unref","_mergeProps"],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../utils/index.mjs';
|
|
2
|
+
import Select from './src/select2.mjs';
|
|
3
|
+
export { selectEmits, selectProps } from './src/select.mjs';
|
|
4
|
+
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
|
+
|
|
6
|
+
const HzztSelect = withInstall(Select);
|
|
7
|
+
|
|
8
|
+
export { HzztSelect, HzztSelect as default };
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/select/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\nimport Select from './src/select.vue'\nimport type { SFCWithInstall } from '@hzzt-plus/utils'\n\nexport const HzztSelect: SFCWithInstall<typeof Select> = withInstall(Select)\nexport default HzztSelect\n\nexport * from './src/select'\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,WAAW,CAAC,MAAM;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type Select from './select.vue';
|
|
3
|
+
declare type OptionCommon = Record<string, any>;
|
|
4
|
+
export declare type Option = OptionCommon & {
|
|
5
|
+
created?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type OptionGroup = OptionCommon;
|
|
8
|
+
export declare type OptionType = Option | OptionGroup;
|
|
9
|
+
export declare const selectProps: {
|
|
10
|
+
selectProps: ObjectConstructor;
|
|
11
|
+
options: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => OptionType[]) | (() => OptionType[]) | ((new (...args: any[]) => OptionType[]) | (() => OptionType[]))[], unknown, unknown, () => never[], boolean>;
|
|
12
|
+
modelValue: import("hzzt-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string | null | undefined) | ((new (...args: any[]) => string & {}) | (() => string | null | undefined))[], unknown, unknown, string, boolean>;
|
|
13
|
+
disabled: BooleanConstructor;
|
|
14
|
+
readonly: BooleanConstructor;
|
|
15
|
+
clearable: BooleanConstructor;
|
|
16
|
+
replace: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
17
|
+
placeholder: StringConstructor;
|
|
18
|
+
size: {
|
|
19
|
+
readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
20
|
+
readonly required: false;
|
|
21
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
22
|
+
__epPropKey: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare type SelectProps = ExtractPropTypes<typeof selectProps>;
|
|
26
|
+
export declare const selectEmits: {
|
|
27
|
+
"update:modelValue": (value: string | undefined) => boolean;
|
|
28
|
+
input: (value: string | undefined) => boolean;
|
|
29
|
+
change: (value: string | undefined) => boolean;
|
|
30
|
+
'arrow-down': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
31
|
+
'arrow-up': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
32
|
+
'arrow-left': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
33
|
+
'arrow-right': (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
34
|
+
enter: (e: KeyboardEvent | Event) => Event | KeyboardEvent;
|
|
35
|
+
};
|
|
36
|
+
export declare type SelectEmits = typeof selectEmits;
|
|
37
|
+
export declare type SelectInstance = InstanceType<typeof Select>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
6
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
7
|
+
import { isString } from '@vue/shared';
|
|
8
|
+
|
|
9
|
+
const selectProps = buildProps({
|
|
10
|
+
selectProps: Object,
|
|
11
|
+
options: {
|
|
12
|
+
type: definePropType(Array),
|
|
13
|
+
default: () => []
|
|
14
|
+
},
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: definePropType([
|
|
17
|
+
String
|
|
18
|
+
]),
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
readonly: Boolean,
|
|
23
|
+
clearable: Boolean,
|
|
24
|
+
replace: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
},
|
|
28
|
+
placeholder: String,
|
|
29
|
+
size: useSizeProp
|
|
30
|
+
});
|
|
31
|
+
const selectEmits = {
|
|
32
|
+
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
|
33
|
+
"input": (value) => isString(value),
|
|
34
|
+
"change": (value) => isString(value),
|
|
35
|
+
"arrow-down": (e) => e,
|
|
36
|
+
"arrow-up": (e) => e,
|
|
37
|
+
"arrow-left": (e) => e,
|
|
38
|
+
"arrow-right": (e) => e,
|
|
39
|
+
"enter": (e) => e
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { selectEmits, selectProps };
|
|
43
|
+
//# sourceMappingURL=select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.mjs","sources":["../../../../../../packages/components/select/src/select.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport type {ExtractPropTypes} from 'vue'\nimport type Select from './select.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\n\n\ntype OptionCommon = Record<string, any>\n\nexport type Option = OptionCommon & {\n created?: boolean\n}\n\nexport type OptionGroup = OptionCommon\n\nexport type OptionType = Option | OptionGroup\n\nexport const selectProps = buildProps({\n selectProps: Object,\n options: {\n type: definePropType<OptionType[]>(Array),\n default: () => [],\n },\n modelValue: {\n type: definePropType<string | null | undefined>([\n String,\n ]),\n default: '',\n },\n disabled: Boolean,\n readonly: Boolean,\n clearable: Boolean,\n replace: {\n type: Boolean,\n default: true,\n },\n placeholder: String,\n size: useSizeProp,\n})\n\nexport type SelectProps = ExtractPropTypes<typeof selectProps>\n\nexport const selectEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | undefined) => isString(value),\n 'input': (value: string | undefined) => isString(value),\n 'change': (value: string | undefined) => isString(value),\n 'arrow-down': (e: KeyboardEvent | Event) => e,\n 'arrow-up': (e: KeyboardEvent | Event) => e,\n 'arrow-left': (e: KeyboardEvent | Event) => e,\n 'arrow-right': (e: KeyboardEvent | Event) => e,\n 'enter': (e: KeyboardEvent | Event) => e,\n}\nexport type SelectEmits = typeof selectEmits\n\n\nexport type SelectInstance = InstanceType<typeof Select>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,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,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACrC,EAAE,QAAQ,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACtC,EAAE,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC;AACxB,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC;AACtB,EAAE,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC;AACxB,EAAE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC;AACzB,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC;AACnB;;;;"}
|