hzzt-plus 2.0.5 → 2.0.7
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.full.js +77 -74
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +77 -74
- 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/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +36 -122
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +122 -36
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/click-input/index.mjs +2 -2
- package/es/components/click-input/src/click-input.mjs +84 -21
- package/es/components/click-input/src/click-input.mjs.map +1 -1
- package/es/components/click-input/src/click-input2.mjs +21 -84
- package/es/components/click-input/src/click-input2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +0 -88
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +88 -0
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/icon/index.d.ts +432 -3
- package/es/components/icon/index.mjs +12 -11
- package/es/components/icon/index.mjs.map +1 -1
- package/es/components/icon/src/index.mjs +4 -1
- package/es/components/icon/src/index.mjs.map +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/input-range/index.mjs +2 -2
- package/es/components/input-range/src/input-range.mjs +26 -76
- package/es/components/input-range/src/input-range.mjs.map +1 -1
- package/es/components/input-range/src/input-range2.mjs +76 -26
- package/es/components/input-range/src/input-range2.mjs.map +1 -1
- package/es/components/lazy-list/index.mjs +2 -2
- package/es/components/lazy-list/src/lazy-list.mjs +22 -80
- package/es/components/lazy-list/src/lazy-list.mjs.map +1 -1
- package/es/components/lazy-list/src/lazy-list2.mjs +80 -22
- package/es/components/lazy-list/src/lazy-list2.mjs.map +1 -1
- package/es/components/select-input/index.mjs +2 -2
- 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-input2.mjs +124 -45
- package/es/components/select-input/src/select-input2.mjs.map +1 -1
- package/es/components/tab/index.d.ts +2 -0
- package/es/components/tab/src/index.mjs +10 -9
- package/es/components/tab/src/index.mjs.map +1 -1
- package/es/components/tab/src/index.vue.d.ts +2 -0
- package/es/index.mjs +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +36 -121
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +121 -36
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/click-input/index.js +2 -2
- package/lib/components/click-input/src/click-input.js +84 -22
- package/lib/components/click-input/src/click-input.js.map +1 -1
- package/lib/components/click-input/src/click-input2.js +22 -84
- package/lib/components/click-input/src/click-input2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +0 -91
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +91 -0
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/icon/index.d.ts +432 -3
- package/lib/components/icon/index.js +14 -13
- package/lib/components/icon/index.js.map +1 -1
- package/lib/components/icon/src/index.js +4 -1
- package/lib/components/icon/src/index.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/input-range/index.js +2 -2
- package/lib/components/input-range/src/input-range.js +27 -76
- package/lib/components/input-range/src/input-range.js.map +1 -1
- package/lib/components/input-range/src/input-range2.js +76 -27
- package/lib/components/input-range/src/input-range2.js.map +1 -1
- package/lib/components/lazy-list/index.js +2 -2
- package/lib/components/lazy-list/src/lazy-list.js +23 -80
- package/lib/components/lazy-list/src/lazy-list.js.map +1 -1
- package/lib/components/lazy-list/src/lazy-list2.js +80 -23
- package/lib/components/lazy-list/src/lazy-list2.js.map +1 -1
- package/lib/components/select-input/index.js +2 -2
- 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-input2.js +124 -46
- package/lib/components/select-input/src/select-input2.js.map +1 -1
- package/lib/components/tab/index.d.ts +2 -0
- package/lib/components/tab/src/index.js +9 -8
- package/lib/components/tab/src/index.js.map +1 -1
- package/lib/components/tab/src/index.vue.d.ts +2 -0
- package/lib/index.js +5 -5
- 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/web-types.json +1 -1
|
@@ -1,31 +1,81 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import { createElementVNode, defineComponent, ref, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import { inputRangeProps, inputRangeEmits } from './input-range.mjs';
|
|
3
|
+
import { useFormSize, useFormDisabled } from 'element-plus';
|
|
2
4
|
import '../../../hooks/index.mjs';
|
|
3
|
-
import '../../../
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
7
|
-
import { isArray } from '@vue/shared';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
+
import { useGlobalSize } from '../../../hooks/use-size/index.mjs';
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
default: () => []
|
|
13
|
-
},
|
|
14
|
-
size: useSizeProp,
|
|
15
|
-
disabled: Boolean,
|
|
16
|
-
clearable: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false
|
|
19
|
-
},
|
|
20
|
-
startPlaceholder: String,
|
|
21
|
-
endPlaceholder: String,
|
|
22
|
-
startProps: Object,
|
|
23
|
-
endProps: Object
|
|
9
|
+
const _hoisted_1 = /* @__PURE__ */ createElementVNode("span", { class: "margin-h-1" }, "\u2014\u2014", -1);
|
|
10
|
+
const __default__ = defineComponent({
|
|
11
|
+
name: "HzztInputRange"
|
|
24
12
|
});
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
...__default__,
|
|
15
|
+
props: inputRangeProps,
|
|
16
|
+
emits: inputRangeEmits,
|
|
17
|
+
setup(__props, { emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const startValue = ref(props.modelValue[0]);
|
|
20
|
+
const endValue = ref(props.modelValue[1]);
|
|
21
|
+
const nsInput = useNamespace("input-range");
|
|
22
|
+
const formSize = useFormSize();
|
|
23
|
+
const formDisabled = useFormDisabled();
|
|
24
|
+
const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
|
|
25
|
+
const trueDisabled = computed(() => props.disabled || formDisabled.value);
|
|
26
|
+
const containerCls = computed(() => [
|
|
27
|
+
nsInput.b(),
|
|
28
|
+
nsInput.m(trueSize.value)
|
|
29
|
+
]);
|
|
30
|
+
watch(() => props.modelValue, (v) => {
|
|
31
|
+
startValue.value = v[0];
|
|
32
|
+
endValue.value = v[1];
|
|
33
|
+
}, {
|
|
34
|
+
deep: true
|
|
35
|
+
});
|
|
36
|
+
function change() {
|
|
37
|
+
if (startValue.value || endValue.value) {
|
|
38
|
+
const modelValue = [startValue.value, endValue.value];
|
|
39
|
+
emit("update:modelValue", modelValue);
|
|
40
|
+
emit("change", modelValue);
|
|
41
|
+
} else if (!startValue.value && !endValue.value) {
|
|
42
|
+
emit("update:modelValue", []);
|
|
43
|
+
emit("change", []);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
const _component_el_input = resolveComponent("el-input");
|
|
48
|
+
return openBlock(), createElementBlock("div", {
|
|
49
|
+
class: normalizeClass(["flex align-items-center", unref(containerCls)])
|
|
50
|
+
}, [
|
|
51
|
+
createVNode(_component_el_input, mergeProps({
|
|
52
|
+
modelValue: startValue.value,
|
|
53
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => startValue.value = $event)
|
|
54
|
+
}, _ctx.startProps, {
|
|
55
|
+
clearable: _ctx.clearable,
|
|
56
|
+
placeholder: _ctx.startPlaceholder,
|
|
57
|
+
size: unref(trueSize),
|
|
58
|
+
disabled: unref(trueDisabled),
|
|
59
|
+
class: "flex-1",
|
|
60
|
+
onChange: change
|
|
61
|
+
}), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"]),
|
|
62
|
+
_hoisted_1,
|
|
63
|
+
createVNode(_component_el_input, mergeProps({
|
|
64
|
+
modelValue: endValue.value,
|
|
65
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => endValue.value = $event)
|
|
66
|
+
}, _ctx.endProps, {
|
|
67
|
+
clearable: _ctx.clearable,
|
|
68
|
+
placeholder: _ctx.endPlaceholder,
|
|
69
|
+
size: unref(trueSize),
|
|
70
|
+
disabled: unref(trueDisabled),
|
|
71
|
+
class: "flex-1",
|
|
72
|
+
onChange: change
|
|
73
|
+
}), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"])
|
|
74
|
+
], 2);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var InputRange = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "input-range.vue"]]);
|
|
29
79
|
|
|
30
|
-
export {
|
|
80
|
+
export { InputRange as default };
|
|
31
81
|
//# sourceMappingURL=input-range2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-range2.mjs","sources":["../../../../../../packages/components/input-range/src/input-range.
|
|
1
|
+
{"version":3,"file":"input-range2.mjs","sources":["../../../../../../packages/components/input-range/src/input-range.vue"],"sourcesContent":["<template>\n <div class=\"flex align-items-center\" :class=\"containerCls\">\n <el-input\n v-model=\"startValue\"\n v-bind=\"startProps\"\n :clearable=\"clearable\"\n :placeholder=\"startPlaceholder\"\n :size=\"trueSize\"\n :disabled=\"trueDisabled\"\n class=\"flex-1\"\n @change=\"change\"\n />\n <span class=\"margin-h-1\">——</span>\n <el-input\n v-model=\"endValue\"\n v-bind=\"endProps\"\n :clearable=\"clearable\"\n :placeholder=\"endPlaceholder\"\n :size=\"trueSize\"\n :disabled=\"trueDisabled\"\n class=\"flex-1\"\n @change=\"change\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {inputRangeEmits, inputRangeProps} from './input-range'\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import {computed, ref, watch} from \"vue\";\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n\n defineOptions({\n name: 'HzztInputRange',\n })\n\n const props = defineProps(inputRangeProps)\n const emit = defineEmits(inputRangeEmits)\n\n const startValue = ref(props.modelValue[0])\n const endValue = ref(props.modelValue[1])\n\n const nsInput = useNamespace('input-range')\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 nsInput.b(),\n nsInput.m(trueSize.value),\n ])\n\n watch(() => props.modelValue, (v) => {\n startValue.value = v[0];\n endValue.value = v[1];\n }, {\n deep: true,\n })\n\n function change() {\n if (startValue.value || endValue.value) {\n const modelValue = [startValue.value, endValue.value] as Array<string>;\n emit('update:modelValue', modelValue);\n emit('change', modelValue);\n } else if (!startValue.value && !endValue.value) {\n emit('update:modelValue', []);\n emit('change', []);\n }\n }\n\n</script>\n"],"names":["_defineComponent","_resolveComponent","_openBlock","_createElementBlock","_unref","_createVNode","_mergeProps"],"mappings":";;;;;;;;;;AA2BE,EAAA,IAAA,EAAA;AACA,CAAA,CAAA,CAAA;AACA,MAAQ,SAAA,mBAA2BA,eAAA,CAAA;AACnC,EAAA,GAAA;;wBAEc;AAAA,EACZ,KAAM,CAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA;AACR,IAAA,MAAA,KAAA,GAAA,OAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,YAAa,GAAA,QAAU,CAAA,MAAA,KAAY,CAAC,QAAA,IAAA,YAAA,CAAA,KAAA,CAAA,CAAA;AAC1C,IAAA,MAAM,YAAW,GAAI,QAAM,CAAA,MAAA;AAE3B,MAAM,OAAA,CAAA,CAAA,EAAA;AAEN,MAAA,kBAA6B,CAAA,KAAA,CAAA;AAC7B,KAAA,CAAA,CAAA;AAEA,IAAA,KAAA,CAAM,MAAW,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACf,UAAY,CAAA,KAAA,GAAA,CAAQ,CAAS,CAAA,CAAA,CAAA;AAAyB,MACxD,QAAA,CAAA,KAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,KAAA,EAAA;AAEA,MAAM,IAAA,EAAA,IAAA;AAA8B,KAAA,CAClC;AAAU,IACV,SAAA,MAAU,GAAA;AAAc,MACzB,IAAA,UAAA,CAAA,KAAA,IAAA,QAAA,CAAA,KAAA,EAAA;AAED,QAAA,MAAY,UAAkB,GAAA,CAAA,UAAO,CAAA,KAAA,EAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AACnC,QAAW,IAAA,CAAA,mBAAW,EAAA,UAAA,CAAA,CAAA;AACtB,QAAS,IAAA,CAAA,QAAA,EAAQ,UAAG,CAAA,CAAA;AAAA,OACnB,MAAA,IAAA,CAAA,UAAA,CAAA,KAAA,IAAA,CAAA,QAAA,CAAA,KAAA,EAAA;AAAA,QACK,IAAA,CAAA,mBAAA,EAAA,EAAA,CAAA,CAAA;AAAA,QACP,IAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA;AAED,OAAA;AACE,KAAI;AACF,IAAA,OAAA,CAAA,IAAmB,EAAA,MAAA,KAAY;AAC/B,MAAA,MAAA,sBAA0BC,gBAAU,CAAA,UAAA,CAAA,CAAA;AACpC,MAAA,OAAKC,SAAU,EAAU,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,6BACK,CAAA,CAAA,yBAAiB,EAAAC,KAAA,CAAA,YAAA,CAAA,CAAA,CAAA;AAC/C,OAAK,EAAA;AACL,QAAKC,WAAA,CAAA,mBAAY,EAAAC,UAAA,CAAA;AAAA,UACnB,UAAA,EAAA,UAAA,CAAA,KAAA;AAAA,UACF,qBAAA,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,MAAA,KAAA,UAAA,CAAA,KAAA,GAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import LazyList from './src/lazy-
|
|
3
|
-
export { lazyListEmits, lazyListProps } from './src/lazy-
|
|
2
|
+
import LazyList from './src/lazy-list2.mjs';
|
|
3
|
+
export { lazyListEmits, lazyListProps } from './src/lazy-list.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const HzztLazyList = withInstall(LazyList);
|
|
@@ -1,85 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
6
3
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"overflow-y-auto",
|
|
24
|
-
nsLazy.b()
|
|
25
|
-
]);
|
|
26
|
-
watch(() => props.data, () => {
|
|
27
|
-
totalHeight.value = props.data.length * props.height + "px";
|
|
28
|
-
}, {
|
|
29
|
-
immediate: true
|
|
30
|
-
});
|
|
31
|
-
const calcList = computed(() => props.data.slice(currentIndex.value === 1 ? 0 : (currentIndex.value - 1) * props.size - props.size / 2, (currentIndex.value + 1) * props.size + props.size / 2));
|
|
32
|
-
function scrollList(e) {
|
|
33
|
-
const target = e.target;
|
|
34
|
-
const scrollTop = target.scrollTop;
|
|
35
|
-
if (scrollTop < props.size / 2 * props.height) {
|
|
36
|
-
currentIndex.value = 1;
|
|
37
|
-
} else {
|
|
38
|
-
currentIndex.value = Math.ceil((scrollTop - props.size / 2 * props.height) / props.size / props.height);
|
|
39
|
-
}
|
|
40
|
-
if (currentIndex.value === 1) {
|
|
41
|
-
marginTop.value = "0px";
|
|
42
|
-
} else {
|
|
43
|
-
marginTop.value = ((currentIndex.value - 1) * props.size - props.size / 2) * props.height + "px";
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function rowClick(row) {
|
|
47
|
-
current.value = row;
|
|
48
|
-
emit("row-click", row);
|
|
49
|
-
}
|
|
50
|
-
return (_ctx, _cache) => {
|
|
51
|
-
return openBlock(), createElementBlock("div", {
|
|
52
|
-
class: normalizeClass(unref(containerCls)),
|
|
53
|
-
onScroll: scrollList
|
|
54
|
-
}, [
|
|
55
|
-
createElementVNode("div", {
|
|
56
|
-
style: normalizeStyle({
|
|
57
|
-
height: totalHeight.value,
|
|
58
|
-
width: 0,
|
|
59
|
-
float: "left"
|
|
60
|
-
})
|
|
61
|
-
}, null, 4),
|
|
62
|
-
createElementVNode("div", {
|
|
63
|
-
style: normalizeStyle({ marginTop: marginTop.value })
|
|
64
|
-
}, [
|
|
65
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(calcList), (item) => {
|
|
66
|
-
return openBlock(), createElementBlock("div", {
|
|
67
|
-
key: item[_ctx.rowKey],
|
|
68
|
-
style: normalizeStyle({
|
|
69
|
-
height: _ctx.height + "px"
|
|
70
|
-
}),
|
|
71
|
-
class: normalizeClass(["hzzt-lazy-list__item", current.value === item ? "is-active" : ""]),
|
|
72
|
-
onClick: ($event) => rowClick(item)
|
|
73
|
-
}, [
|
|
74
|
-
renderSlot(_ctx.$slots, "default", { data: item })
|
|
75
|
-
], 14, _hoisted_1);
|
|
76
|
-
}), 128))
|
|
77
|
-
], 4)
|
|
78
|
-
], 34);
|
|
79
|
-
};
|
|
4
|
+
const lazyListProps = buildProps({
|
|
5
|
+
size: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 20
|
|
8
|
+
},
|
|
9
|
+
height: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 30
|
|
12
|
+
},
|
|
13
|
+
data: {
|
|
14
|
+
type: definePropType(Array),
|
|
15
|
+
default: () => []
|
|
16
|
+
},
|
|
17
|
+
rowKey: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "id"
|
|
80
20
|
}
|
|
81
21
|
});
|
|
82
|
-
|
|
22
|
+
const lazyListEmits = {
|
|
23
|
+
"row-click": (row) => row
|
|
24
|
+
};
|
|
83
25
|
|
|
84
|
-
export {
|
|
26
|
+
export { lazyListEmits, lazyListProps };
|
|
85
27
|
//# sourceMappingURL=lazy-list.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-list.mjs","sources":["../../../../../../packages/components/lazy-list/src/lazy-list.
|
|
1
|
+
{"version":3,"file":"lazy-list.mjs","sources":["../../../../../../packages/components/lazy-list/src/lazy-list.ts"],"sourcesContent":["import {buildProps, definePropType} from '@hzzt-plus/utils'\nimport type {ExtractPropTypes} from 'vue'\nimport type LazyList from './lazy-list.vue'\n\nexport const lazyListProps = buildProps({\n size: {\n type: Number,\n default: 20,\n },\n height: {\n type: Number,\n default: 30,\n },\n data: {\n type: definePropType<Record<string, any>[]>(Array),\n default: () => [],\n },\n rowKey: {\n type: String,\n default: 'id',\n },\n})\n\nexport type LazyListProps = ExtractPropTypes<typeof lazyListProps>\n\nexport const lazyListEmits = {\n 'row-click': (row: any) => row\n}\n\nexport type LazyListEmits = typeof lazyListEmits\n\n\nexport type LazyListInstance = InstanceType<typeof LazyList>\n"],"names":[],"mappings":";;;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG;AAC3B;;;;"}
|
|
@@ -1,27 +1,85 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, Fragment, renderList, renderSlot } from 'vue';
|
|
2
|
+
import { lazyListProps, lazyListEmits } from './lazy-list.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
6
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
const _hoisted_1 = ["onClick"];
|
|
8
|
+
const __default__ = defineComponent({
|
|
9
|
+
name: "HzztLazyList"
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: lazyListProps,
|
|
14
|
+
emits: lazyListEmits,
|
|
15
|
+
setup(__props, { emit }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const totalHeight = ref("100%");
|
|
18
|
+
const marginTop = ref("0px");
|
|
19
|
+
const currentIndex = ref(1);
|
|
20
|
+
const current = ref(null);
|
|
21
|
+
const nsLazy = useNamespace("lazy-list");
|
|
22
|
+
const containerCls = computed(() => [
|
|
23
|
+
"overflow-y-auto",
|
|
24
|
+
nsLazy.b()
|
|
25
|
+
]);
|
|
26
|
+
watch(() => props.data, () => {
|
|
27
|
+
totalHeight.value = props.data.length * props.height + "px";
|
|
28
|
+
}, {
|
|
29
|
+
immediate: true
|
|
30
|
+
});
|
|
31
|
+
const calcList = computed(() => props.data.slice(currentIndex.value === 1 ? 0 : (currentIndex.value - 1) * props.size - props.size / 2, (currentIndex.value + 1) * props.size + props.size / 2));
|
|
32
|
+
function scrollList(e) {
|
|
33
|
+
const target = e.target;
|
|
34
|
+
const scrollTop = target.scrollTop;
|
|
35
|
+
if (scrollTop < props.size / 2 * props.height) {
|
|
36
|
+
currentIndex.value = 1;
|
|
37
|
+
} else {
|
|
38
|
+
currentIndex.value = Math.ceil((scrollTop - props.size / 2 * props.height) / props.size / props.height);
|
|
39
|
+
}
|
|
40
|
+
if (currentIndex.value === 1) {
|
|
41
|
+
marginTop.value = "0px";
|
|
42
|
+
} else {
|
|
43
|
+
marginTop.value = ((currentIndex.value - 1) * props.size - props.size / 2) * props.height + "px";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function rowClick(row) {
|
|
47
|
+
current.value = row;
|
|
48
|
+
emit("row-click", row);
|
|
49
|
+
}
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createElementBlock("div", {
|
|
52
|
+
class: normalizeClass(unref(containerCls)),
|
|
53
|
+
onScroll: scrollList
|
|
54
|
+
}, [
|
|
55
|
+
createElementVNode("div", {
|
|
56
|
+
style: normalizeStyle({
|
|
57
|
+
height: totalHeight.value,
|
|
58
|
+
width: 0,
|
|
59
|
+
float: "left"
|
|
60
|
+
})
|
|
61
|
+
}, null, 4),
|
|
62
|
+
createElementVNode("div", {
|
|
63
|
+
style: normalizeStyle({ marginTop: marginTop.value })
|
|
64
|
+
}, [
|
|
65
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(calcList), (item) => {
|
|
66
|
+
return openBlock(), createElementBlock("div", {
|
|
67
|
+
key: item[_ctx.rowKey],
|
|
68
|
+
style: normalizeStyle({
|
|
69
|
+
height: _ctx.height + "px"
|
|
70
|
+
}),
|
|
71
|
+
class: normalizeClass(["hzzt-lazy-list__item", current.value === item ? "is-active" : ""]),
|
|
72
|
+
onClick: ($event) => rowClick(item)
|
|
73
|
+
}, [
|
|
74
|
+
renderSlot(_ctx.$slots, "default", { data: item })
|
|
75
|
+
], 14, _hoisted_1);
|
|
76
|
+
}), 128))
|
|
77
|
+
], 4)
|
|
78
|
+
], 34);
|
|
79
|
+
};
|
|
20
80
|
}
|
|
21
81
|
});
|
|
22
|
-
|
|
23
|
-
"row-click": (row) => row
|
|
24
|
-
};
|
|
82
|
+
var LazyList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "lazy-list.vue"]]);
|
|
25
83
|
|
|
26
|
-
export {
|
|
84
|
+
export { LazyList as default };
|
|
27
85
|
//# sourceMappingURL=lazy-list2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-list2.mjs","sources":["../../../../../../packages/components/lazy-list/src/lazy-list.
|
|
1
|
+
{"version":3,"file":"lazy-list2.mjs","sources":["../../../../../../packages/components/lazy-list/src/lazy-list.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\" @scroll=\"scrollList\">\n <div\n :style=\"{\n height: totalHeight,\n width: 0,\n float: 'left',\n }\"\n />\n <div :style=\"{marginTop: marginTop}\">\n <div\n v-for=\"item in calcList\"\n :key=\"item[rowKey]\"\n :style=\"{\n height: height+'px'\n }\"\n :class=\"['hzzt-lazy-list__item', current === item?'is-active':'']\"\n @click=\"rowClick(item)\"\n >\n <slot :data=\"item\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {lazyListEmits, lazyListProps} from './lazy-list'\n import {computed, ref, watch} from \"vue\";\n import {useNamespace} from \"@hzzt-plus/hooks\";\n\n defineOptions({\n name: 'HzztLazyList',\n })\n\n const props = defineProps(lazyListProps)\n const emit = defineEmits(lazyListEmits)\n\n const totalHeight = ref('100%');\n const marginTop = ref('0px');\n const currentIndex = ref(1);\n const current = ref(null);\n\n const nsLazy = useNamespace('lazy-list');\n\n const containerCls = computed(() => [\n 'overflow-y-auto',\n nsLazy.b(),\n ])\n\n watch(() => props.data, () => {\n totalHeight.value = props.data.length * props.height + 'px';\n }, {\n immediate: true,\n });\n\n const calcList = computed(\n () => props.data.slice(currentIndex.value === 1 ? 0 : ((currentIndex.value - 1) * props.size -\n props.size / 2), (currentIndex.value + 1) * props.size + props.size / 2));\n\n function scrollList(e: Event) {\n const target = e.target as HTMLElement;\n const scrollTop = target.scrollTop;\n if (scrollTop < props.size / 2 * props.height) {\n currentIndex.value = 1;\n } else {\n currentIndex.value = Math.ceil((scrollTop - props.size / 2 * props.height) / props.size / props.height);\n }\n if (currentIndex.value === 1) {\n marginTop.value = '0px';\n } else {\n marginTop.value = ((currentIndex.value - 1) * props.size - props.size / 2) * props.height + 'px';\n }\n }\n\n function rowClick(row: any) {\n current.value = row;\n emit('row-click', row);\n }\n\n\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;mCA8BgB,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,WAAA,GAAc,IAAI,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA,SAAA,GAAY,IAAI,KAAK,CAAA,CAAA;AAC3B,IAAM,MAAA,YAAA,GAAe,IAAI,CAAC,CAAA,CAAA;AAC1B,IAAM,MAAA,OAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AAExB,IAAM,MAAA,MAAA,GAAS,aAAa,WAAW,CAAA,CAAA;AAEvC,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAAA,MAClC,iBAAA;AAAA,MACA,OAAO,CAAE,EAAA;AAAA,KACV,CAAA,CAAA;AAED,IAAM,KAAA,CAAA,MAAM,KAAM,CAAA,IAAA,EAAM,MAAM;AAC5B,MAAA,WAAA,CAAY,KAAQ,GAAA,KAAA,CAAM,IAAK,CAAA,MAAA,GAAS,MAAM,MAAS,GAAA,IAAA,CAAA;AAAA,KACtD,EAAA;AAAA,MACD,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,CAAA,KAAA,CAAA,YAAA,CAAA,KAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,YAAA,CAAA,KAAA,GAAA,CAAA,IAAA,KAAA,CAAA,IAAA,GAAA,KAAA,CAAA,IAAA,GAAA,CAAA,EAAA,CAAA,YAAA,CAAA,KAAA,GAAA,CAAA,IAAA,KAAA,CAAA,IAAA,GAAA,KAAA,CAAA,IAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAAA,IACf,mBAAiB,CAAA,CAAA,EAAA;AACwD,MAAC,MAAA,MAAA,GAAA,CAAA,CAAA,MAAA,CAAA;AAE5E,MAAA,MAAA,YAAoB,MAAU,CAAA,SAAA,CAAA;AAC5B,MAAA,IAAA,YAAiB,KAAA,CAAA,IAAA,GAAA,CAAA,GAAA,KAAA,CAAA,MAAA,EAAA;AACjB,QAAA,kBAAyB,GAAA,CAAA,CAAA;AACzB,OAAA,MAAgB;AACd,QAAA,YAAA,CAAa,KAAQ,GAAA,IAAA,CAAA,IAAA,CAAA,CAAA,SAAA,GAAA,KAAA,CAAA,IAAA,GAAA,CAAA,GAAA,KAAA,CAAA,MAAA,IAAA,KAAA,CAAA,IAAA,GAAA,KAAA,CAAA,MAAA,CAAA,CAAA;AAAA,OAChB;AACL,MAAA,IAAA,YAAqB,CAAA,KAAA,KAAA,CAAK,EAAM;AAAsE,QACxG,SAAA,CAAA,KAAA,GAAA,KAAA,CAAA;AACA,OAAI,MAAA;AACF,QAAA,SAAA,CAAU,KAAQ,GAAA,CAAA,CAAA,YAAA,CAAA,KAAA,GAAA,CAAA,IAAA,KAAA,CAAA,IAAA,GAAA,KAAA,CAAA,IAAA,GAAA,CAAA,IAAA,KAAA,CAAA,MAAA,GAAA,IAAA,CAAA;AAAA,OACb;AACL,KAAU;AAAkF,IAC9F,SAAA,QAAA,CAAA,GAAA,EAAA;AAAA,MACF,OAAA,CAAA,KAAA,GAAA,GAAA,CAAA;AAEA,MAAA,IAAA,CAAA,WAAkB,EAAU,GAAA,CAAA,CAAA;AAC1B,KAAA;AACA,IAAA,OAAK,aAAa,KAAG;AAAA,MACvB,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import SelectInput from './src/select-
|
|
3
|
-
export { selectInputEmits, selectInputProps } from './src/select-
|
|
2
|
+
import SelectInput from './src/select-input2.mjs';
|
|
3
|
+
export { selectInputEmits, selectInputProps } from './src/select-input.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const HzztSelectInput = withInstall(SelectInput);
|
|
@@ -1,129 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { selectInputProps, selectInputEmits } from './select-input2.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
3
2
|
import '../../../hooks/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { numberToLetter } from '../../../hooks/use-letter/index.mjs';
|
|
3
|
+
import '../../../constants/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';
|
|
10
8
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const selectInputProps = buildProps({
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: definePropType([
|
|
12
|
+
String,
|
|
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
|
+
options: {
|
|
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
|
|
15
42
|
});
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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"]]);
|
|
43
|
+
const selectInputEmits = {
|
|
44
|
+
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
|
45
|
+
input: (value) => isString(value),
|
|
46
|
+
change: (value) => isString(value)
|
|
47
|
+
};
|
|
127
48
|
|
|
128
|
-
export {
|
|
49
|
+
export { selectInputEmits, selectInputProps };
|
|
129
50
|
//# sourceMappingURL=select-input.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-input.mjs","sources":["../../../../../../packages/components/select-input/src/select-input.
|
|
1
|
+
{"version":3,"file":"select-input.mjs","sources":["../../../../../../packages/components/select-input/src/select-input.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\n\nimport type { ExtractPropTypes } from 'vue'\nimport type SelectInput from './select-input.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\nimport {OptionType} from \"@hzzt-plus/components/select/src/select\";\n\nexport const selectInputProps = buildProps({\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n ]),\n default: '',\n },\n indexType: {\n type: String,\n default: 'number',\n },\n disabled: Boolean,\n replace: Boolean,\n label: String,\n options: {\n type: definePropType<OptionType[]>(Array),\n default: () => [],\n },\n inputProps: Object,\n customProps: Object,\n position: {\n type: String,\n default: 'left',\n },\n formatLabel: {\n type: Function,\n },\n split: {\n type: String,\n default: '',\n },\n size: useSizeProp,\n})\n\nexport type SelectInputProps = ExtractPropTypes<typeof selectInputProps>\n\nexport const selectInputEmits = {\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 SelectInputEmits = typeof selectInputEmits\n\nexport type SelectInputInstance = InstanceType<typeof SelectInput>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,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,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,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,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,QAAQ;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,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;;;;"}
|