hzzt-plus 2.0.0 → 2.0.2

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.
Files changed (118) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +369 -248
  4. package/dist/index.full.min.js +12 -12
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +16 -16
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +367 -249
  9. package/dist/locale/en.js +1 -1
  10. package/dist/locale/en.min.js +1 -1
  11. package/dist/locale/en.min.mjs +1 -1
  12. package/dist/locale/en.mjs +1 -1
  13. package/dist/locale/zh-cn.js +1 -1
  14. package/dist/locale/zh-cn.min.js +1 -1
  15. package/dist/locale/zh-cn.min.mjs +1 -1
  16. package/dist/locale/zh-cn.mjs +1 -1
  17. package/es/component.mjs +3 -1
  18. package/es/component.mjs.map +1 -1
  19. package/es/components/index.d.ts +1 -0
  20. package/es/components/index.mjs +4 -2
  21. package/es/components/index.mjs.map +1 -1
  22. package/es/components/input-range/index.mjs +2 -2
  23. package/es/components/input-range/src/input-range.mjs +76 -26
  24. package/es/components/input-range/src/input-range.mjs.map +1 -1
  25. package/es/components/input-range/src/input-range2.mjs +26 -76
  26. package/es/components/input-range/src/input-range2.mjs.map +1 -1
  27. package/es/components/lazy-list/index.d.ts +5 -0
  28. package/es/components/lazy-list/index.mjs +9 -0
  29. package/es/components/lazy-list/index.mjs.map +1 -0
  30. package/es/components/lazy-list/src/lazy-list.d.ts +14 -0
  31. package/es/components/lazy-list/src/lazy-list.mjs +27 -0
  32. package/es/components/lazy-list/src/lazy-list.mjs.map +1 -0
  33. package/es/components/lazy-list/src/lazy-list.vue.d.ts +57 -0
  34. package/es/components/lazy-list/src/lazy-list2.mjs +85 -0
  35. package/es/components/lazy-list/src/lazy-list2.mjs.map +1 -0
  36. package/es/components/lazy-list/style/css.d.ts +2 -0
  37. package/es/components/lazy-list/style/css.mjs +3 -0
  38. package/es/components/lazy-list/style/css.mjs.map +1 -0
  39. package/es/components/lazy-list/style/index.d.ts +2 -0
  40. package/es/components/lazy-list/style/index.mjs +3 -0
  41. package/es/components/lazy-list/style/index.mjs.map +1 -0
  42. package/es/components/select/src/select.vue.d.ts +1 -0
  43. package/es/components/select/src/select2.mjs +11 -1
  44. package/es/components/select/src/select2.mjs.map +1 -1
  45. package/es/components/select-input/index.d.ts +4 -4
  46. package/es/components/select-input/src/select-input.d.ts +1 -1
  47. package/es/components/select-input/src/select-input.mjs +1 -1
  48. package/es/components/select-input/src/select-input.mjs.map +1 -1
  49. package/es/components/select-input/src/select-input.vue.d.ts +4 -4
  50. package/es/components/select-input/src/select-input2.mjs +2 -2
  51. package/es/components/select-input/src/select-input2.mjs.map +1 -1
  52. package/es/components/select-textarea/index.mjs +2 -2
  53. package/es/components/select-textarea/src/select-textarea.d.ts +2 -1
  54. package/es/components/select-textarea/src/select-textarea.mjs +31 -100
  55. package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
  56. package/es/components/select-textarea/src/select-textarea.vue.d.ts +14 -4
  57. package/es/components/select-textarea/src/select-textarea2.mjs +105 -30
  58. package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
  59. package/es/index.mjs +4 -2
  60. package/es/index.mjs.map +1 -1
  61. package/es/version.d.ts +1 -1
  62. package/es/version.mjs +1 -1
  63. package/es/version.mjs.map +1 -1
  64. package/global.d.ts +1 -0
  65. package/lib/component.js +3 -1
  66. package/lib/component.js.map +1 -1
  67. package/lib/components/index.d.ts +1 -0
  68. package/lib/components/index.js +7 -2
  69. package/lib/components/index.js.map +1 -1
  70. package/lib/components/input-range/index.js +2 -2
  71. package/lib/components/input-range/src/input-range.js +76 -27
  72. package/lib/components/input-range/src/input-range.js.map +1 -1
  73. package/lib/components/input-range/src/input-range2.js +27 -76
  74. package/lib/components/input-range/src/input-range2.js.map +1 -1
  75. package/lib/components/lazy-list/index.d.ts +5 -0
  76. package/lib/components/lazy-list/index.js +16 -0
  77. package/lib/components/lazy-list/index.js.map +1 -0
  78. package/lib/components/lazy-list/src/lazy-list.d.ts +14 -0
  79. package/lib/components/lazy-list/src/lazy-list.js +32 -0
  80. package/lib/components/lazy-list/src/lazy-list.js.map +1 -0
  81. package/lib/components/lazy-list/src/lazy-list.vue.d.ts +57 -0
  82. package/lib/components/lazy-list/src/lazy-list2.js +89 -0
  83. package/lib/components/lazy-list/src/lazy-list2.js.map +1 -0
  84. package/lib/components/lazy-list/style/css.d.ts +2 -0
  85. package/lib/components/lazy-list/style/css.js +6 -0
  86. package/lib/components/lazy-list/style/css.js.map +1 -0
  87. package/lib/components/lazy-list/style/index.d.ts +2 -0
  88. package/lib/components/lazy-list/style/index.js +6 -0
  89. package/lib/components/lazy-list/style/index.js.map +1 -0
  90. package/lib/components/select/src/select.vue.d.ts +1 -0
  91. package/lib/components/select/src/select2.js +11 -1
  92. package/lib/components/select/src/select2.js.map +1 -1
  93. package/lib/components/select-input/index.d.ts +4 -4
  94. package/lib/components/select-input/src/select-input.d.ts +1 -1
  95. package/lib/components/select-input/src/select-input.js +1 -1
  96. package/lib/components/select-input/src/select-input.js.map +1 -1
  97. package/lib/components/select-input/src/select-input.vue.d.ts +4 -4
  98. package/lib/components/select-input/src/select-input2.js +2 -2
  99. package/lib/components/select-input/src/select-input2.js.map +1 -1
  100. package/lib/components/select-textarea/index.js +2 -2
  101. package/lib/components/select-textarea/src/select-textarea.d.ts +2 -1
  102. package/lib/components/select-textarea/src/select-textarea.js +32 -100
  103. package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
  104. package/lib/components/select-textarea/src/select-textarea.vue.d.ts +14 -4
  105. package/lib/components/select-textarea/src/select-textarea2.js +105 -31
  106. package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
  107. package/lib/index.js +37 -32
  108. package/lib/index.js.map +1 -1
  109. package/lib/version.d.ts +1 -1
  110. package/lib/version.js +1 -1
  111. package/lib/version.js.map +1 -1
  112. package/package.json +1 -1
  113. package/tags.json +1 -1
  114. package/theme/hzzt-lazy-list.css +1 -0
  115. package/theme/index.css +1 -1
  116. package/theme/src/index.scss +1 -0
  117. package/theme/src/lazy-list.scss +21 -0
  118. package/web-types.json +1 -1
@@ -1,36 +1,111 @@
1
- import '../../../utils/index.mjs';
1
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createVNode, createBlock, mergeProps, createCommentVNode } from 'vue';
2
+ import { selectTextareaProps, selectTextareaEmits } from './select-textarea.mjs';
2
3
  import '../../../hooks/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, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
7
- import { isString } from '@vue/shared';
8
- import { isNumber, isBoolean } from '../../../utils/types.mjs';
4
+ import { useFormSize, useFormDisabled, ElSelectV2, ElInput } 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 { insertCursorPosition } from '../../../hooks/use-cursor/index.mjs';
9
10
 
10
- const selectTextareaProps = buildProps({
11
- size: useSizeProp,
12
- disabled: Boolean,
13
- label: String,
14
- data: {
15
- type: definePropType(Array),
16
- default: () => []
17
- },
18
- inputProps: Object,
19
- replace: Boolean,
20
- modelValue: {
21
- type: definePropType([
22
- String,
23
- Number
24
- ]),
25
- default: ""
11
+ const _hoisted_1 = { class: "flex column" };
12
+ const _hoisted_2 = { class: "flex align-items-center" };
13
+ const __default__ = defineComponent({
14
+ name: "HzztSelectTextarea"
15
+ });
16
+ const _sfc_main = /* @__PURE__ */ defineComponent({
17
+ ...__default__,
18
+ props: selectTextareaProps,
19
+ emits: selectTextareaEmits,
20
+ setup(__props, { emit }) {
21
+ const props = __props;
22
+ const inputVal = ref(props.modelValue);
23
+ const selectValue = ref("");
24
+ const inputRef = ref();
25
+ const nsInput = useNamespace("select-textarea");
26
+ const formSize = useFormSize();
27
+ const formDisabled = useFormDisabled();
28
+ const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
29
+ const trueDisabled = computed(() => props.disabled || formDisabled.value);
30
+ const containerCls = computed(() => [
31
+ nsInput.b(),
32
+ nsInput.m(trueSize.value)
33
+ ]);
34
+ const _inputProps = computed(() => ({
35
+ disabled: trueDisabled.value,
36
+ clearable: true,
37
+ ...props.inputProps,
38
+ type: "textarea"
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
+ }));
48
+ watch(() => props.modelValue, (v) => {
49
+ inputVal.value = v;
50
+ });
51
+ function input(val) {
52
+ emit("update:modelValue", val);
53
+ emit("input", val);
54
+ }
55
+ function change(val) {
56
+ emit("change", val);
57
+ }
58
+ function selectChange(val) {
59
+ if (!inputVal.value && inputVal.value !== 0)
60
+ inputVal.value = "";
61
+ selectValue.value = "";
62
+ let content = val;
63
+ if (!props.replace) {
64
+ const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
65
+ content = insertCursorPosition(inputEl, val);
66
+ }
67
+ input(content);
68
+ change(content);
69
+ emit("select", val);
70
+ }
71
+ return (_ctx, _cache) => {
72
+ return openBlock(), createElementBlock("div", {
73
+ class: normalizeClass(unref(containerCls))
74
+ }, [
75
+ createElementVNode("div", _hoisted_1, [
76
+ createElementVNode("div", _hoisted_2, [
77
+ renderSlot(_ctx.$slots, "title", {}, () => [
78
+ createVNode(HzztTitle, {
79
+ size: unref(trueSize),
80
+ class: "margin-l-1",
81
+ label: _ctx.label
82
+ }, null, 8, ["size", "label"])
83
+ ]),
84
+ !unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), mergeProps({
85
+ key: 0,
86
+ class: "flex-1",
87
+ modelValue: selectValue.value,
88
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
89
+ onChange: selectChange
90
+ }, unref(_selectProps)), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
91
+ renderSlot(_ctx.$slots, "right")
92
+ ]),
93
+ createVNode(unref(ElInput), mergeProps({
94
+ ref_key: "inputRef",
95
+ ref: inputRef,
96
+ class: "flex-1 margin-t-1",
97
+ modelValue: inputVal.value,
98
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
99
+ }, unref(_inputProps), {
100
+ onInput: input,
101
+ onChange: change
102
+ }), null, 16, ["modelValue"])
103
+ ])
104
+ ], 2);
105
+ };
26
106
  }
27
107
  });
28
- const selectTextareaEmits = {
29
- [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
30
- [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
31
- [INPUT_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
32
- select: (val) => isString(val) || isNumber(val) || isBoolean(val)
33
- };
108
+ var SelectTextarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "select-textarea.vue"]]);
34
109
 
35
- export { selectTextareaEmits, selectTextareaProps };
110
+ export { SelectTextarea as default };
36
111
  //# sourceMappingURL=select-textarea2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-textarea2.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 data: {\n type: definePropType<OptionType[]>(Array),\n default: () => [],\n },\n inputProps: 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,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,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;;;;"}
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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B,IAAA,CAAA,QAAA,CAAA,KAAA,IAAA,QAAA,CAAA,KAAA,KAAA,CAAA;AAEA,QAAA,mBAAmC,CAAA;AACjC,MAAA,WAAK,CAAA,KAAkB,GAAA,EAAA,CAAA;AAAsB,MAAA,IAAA,OAAS,GAAQ,GAAA,CAAA;AAC9D,MAAA,IAAA,CAAA,KAAA,CAAA,OAAoB,EAAA;AACpB,QAAA,MAAc,OAAA,GAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,oBAAA,CAAA,UAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACd,QAAI,UAAgB,oBAAA,CAAA,OAAA,EAAA,GAAA,CAAA,CAAA;AAClB,OAAA;AACA,MAAU,KAAA,CAAA,OAAA,CAAA,CAAA;AAAiC,MAC7C,MAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/es/index.mjs CHANGED
@@ -25,9 +25,9 @@ export { scanEmits, scanProps } from './components/scan/src/scan.mjs';
25
25
  export { HzztScan } from './components/scan/index.mjs';
26
26
  export { selectInputEmits, selectInputProps } from './components/select-input/src/select-input.mjs';
27
27
  export { HzztSelectInput } from './components/select-input/index.mjs';
28
- export { selectTextareaEmits, selectTextareaProps } from './components/select-textarea/src/select-textarea2.mjs';
28
+ export { selectTextareaEmits, selectTextareaProps } from './components/select-textarea/src/select-textarea.mjs';
29
29
  export { HzztSelectTextarea } from './components/select-textarea/index.mjs';
30
- export { inputRangeEmits, inputRangeProps } from './components/input-range/src/input-range.mjs';
30
+ export { inputRangeEmits, inputRangeProps } from './components/input-range/src/input-range2.mjs';
31
31
  export { HzztInputRange } from './components/input-range/index.mjs';
32
32
  export { cascaderEmits, cascaderProps } from './components/cascader/src/cascader.mjs';
33
33
  export { HzztCascader } from './components/cascader/index.mjs';
@@ -36,6 +36,8 @@ export { HzztSelect } from './components/select/index.mjs';
36
36
  export { clickInputEmits, clickInputProps } from './components/click-input/src/click-input.mjs';
37
37
  export { HzztClickInput } from './components/click-input/index.mjs';
38
38
  export { HzztScroll } from './components/scroll/index.mjs';
39
+ export { lazyListEmits, lazyListProps } from './components/lazy-list/src/lazy-list.mjs';
40
+ export { HzztLazyList } from './components/lazy-list/index.mjs';
39
41
  export { INSTALLED_KEY } from './constants/key.mjs';
40
42
  export { componentSizeMap, componentSizes } from './constants/size.mjs';
41
43
  export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
package/es/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.0.0";
1
+ export declare const version = "2.0.2";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "2.0.0";
1
+ const version = "2.0.2";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../packages/hzzt-plus/version.ts"],"sourcesContent":["export const version = '2.0.0'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../packages/hzzt-plus/version.ts"],"sourcesContent":["export const version = '2.0.2'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
package/global.d.ts CHANGED
@@ -21,6 +21,7 @@ declare module 'vue' {
21
21
  HzztSelect: typeof import('hzzt-plus')['HzztSelect']
22
22
  HzztClickInput: typeof import('hzzt-plus')['HzztClickInput']
23
23
  HzztScroll: typeof import('hzzt-plus')['HzztScroll']
24
+ HzztLazyList: typeof import('hzzt-plus')['HzztLazyList']
24
25
  }
25
26
  }
26
27
 
package/lib/component.js CHANGED
@@ -22,6 +22,7 @@ var index$g = require('./components/cascader/index.js');
22
22
  var index$h = require('./components/select/index.js');
23
23
  var index$i = require('./components/click-input/index.js');
24
24
  var index$j = require('./components/scroll/index.js');
25
+ var index$k = require('./components/lazy-list/index.js');
25
26
 
26
27
  var Components = [
27
28
  index.HzztConfigProvider,
@@ -43,7 +44,8 @@ var Components = [
43
44
  index$g.HzztCascader,
44
45
  index$h.HzztSelect,
45
46
  index$i.HzztClickInput,
46
- index$j.HzztScroll
47
+ index$j.HzztScroll,
48
+ index$k.HzztLazyList
47
49
  ];
48
50
 
49
51
  exports["default"] = Components;
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import { HzztTitle } from '@hzzt-plus/components/title'\nimport { HzztDropdown } from '@hzzt-plus/components/dropdown'\nimport { HzztCollapse } from '@hzzt-plus/components/collapse'\nimport { HzztConfigProvider } from '@hzzt-plus/components/config-provider'\nimport { HzztTab } from '@hzzt-plus/components/tab'\nimport { HzztIcon } from '@hzzt-plus/components/icon'\nimport { HzztPagination } from '@hzzt-plus/components/pagination'\nimport { HzztTooltip } from '@hzzt-plus/components/tooltip'\nimport { HzztPageSize } from '@hzzt-plus/components/page-size'\nimport { HzztConfirmPassword } from '@hzzt-plus/components/confirm-password'\nimport { HzztCheckButton } from '@hzzt-plus/components/check-button'\nimport { HzztQuarterPicker } from '@hzzt-plus/components/quarter-picker'\nimport { HzztScan } from '@hzzt-plus/components/scan'\nimport { HzztSelectInput } from '@hzzt-plus/components/select-input'\nimport { HzztSelectTextarea } from '@hzzt-plus/components/select-textarea'\nimport { HzztInputRange } from '@hzzt-plus/components/input-range'\nimport { HzztCascader } from '@hzzt-plus/components/cascader'\nimport { HzztSelect } from '@hzzt-plus/components/select'\nimport { HzztClickInput } from '@hzzt-plus/components/click-input'\nimport { HzztScroll } from '@hzzt-plus/components/scroll'\n\nimport type { Plugin } from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n HzztTooltip,\n HzztPageSize,\n HzztConfirmPassword,\n HzztCheckButton,\n HzztQuarterPicker,\n HzztScan,\n HzztSelectInput,\n HzztSelectTextarea,\n HzztInputRange,\n HzztCascader,\n HzztSelect,\n HzztClickInput,\n HzztScroll,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab","HzztIcon","HzztPagination","HzztTooltip","HzztPageSize","HzztConfirmPassword","HzztCheckButton","HzztQuarterPicker","HzztScan","HzztSelectInput","HzztSelectTextarea","HzztInputRange","HzztCascader","HzztSelect","HzztClickInput","HzztScroll"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,iBAAe;AACf,EAAEA,wBAAkB;AACpB,EAAEC,iBAAS;AACX,EAAEC,oBAAY;AACd,EAAEC,oBAAY;AACd,EAAEC,eAAO;AACT,EAAEC,gBAAQ;AACV,EAAEC,sBAAc;AAChB,EAAEC,mBAAW;AACb,EAAEC,oBAAY;AACd,EAAEC,2BAAmB;AACrB,EAAEC,uBAAe;AACjB,EAAEC,yBAAiB;AACnB,EAAEC,gBAAQ;AACV,EAAEC,uBAAe;AACjB,EAAEC,0BAAkB;AACpB,EAAEC,sBAAc;AAChB,EAAEC,oBAAY;AACd,EAAEC,kBAAU;AACZ,EAAEC,sBAAc;AAChB,EAAEC,kBAAU;AACZ,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import { HzztTitle } from '@hzzt-plus/components/title'\nimport { HzztDropdown } from '@hzzt-plus/components/dropdown'\nimport { HzztCollapse } from '@hzzt-plus/components/collapse'\nimport { HzztConfigProvider } from '@hzzt-plus/components/config-provider'\nimport { HzztTab } from '@hzzt-plus/components/tab'\nimport { HzztIcon } from '@hzzt-plus/components/icon'\nimport { HzztPagination } from '@hzzt-plus/components/pagination'\nimport { HzztTooltip } from '@hzzt-plus/components/tooltip'\nimport { HzztPageSize } from '@hzzt-plus/components/page-size'\nimport { HzztConfirmPassword } from '@hzzt-plus/components/confirm-password'\nimport { HzztCheckButton } from '@hzzt-plus/components/check-button'\nimport { HzztQuarterPicker } from '@hzzt-plus/components/quarter-picker'\nimport { HzztScan } from '@hzzt-plus/components/scan'\nimport { HzztSelectInput } from '@hzzt-plus/components/select-input'\nimport { HzztSelectTextarea } from '@hzzt-plus/components/select-textarea'\nimport { HzztInputRange } from '@hzzt-plus/components/input-range'\nimport { HzztCascader } from '@hzzt-plus/components/cascader'\nimport { HzztSelect } from '@hzzt-plus/components/select'\nimport { HzztClickInput } from '@hzzt-plus/components/click-input'\nimport { HzztScroll } from '@hzzt-plus/components/scroll'\nimport { HzztLazyList } from '@hzzt-plus/components/lazy-list'\n\nimport type { Plugin } from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n HzztTooltip,\n HzztPageSize,\n HzztConfirmPassword,\n HzztCheckButton,\n HzztQuarterPicker,\n HzztScan,\n HzztSelectInput,\n HzztSelectTextarea,\n HzztInputRange,\n HzztCascader,\n HzztSelect,\n HzztClickInput,\n HzztScroll,\n HzztLazyList,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab","HzztIcon","HzztPagination","HzztTooltip","HzztPageSize","HzztConfirmPassword","HzztCheckButton","HzztQuarterPicker","HzztScan","HzztSelectInput","HzztSelectTextarea","HzztInputRange","HzztCascader","HzztSelect","HzztClickInput","HzztScroll","HzztLazyList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,iBAAe;AACf,EAAEA,wBAAkB;AACpB,EAAEC,iBAAS;AACX,EAAEC,oBAAY;AACd,EAAEC,oBAAY;AACd,EAAEC,eAAO;AACT,EAAEC,gBAAQ;AACV,EAAEC,sBAAc;AAChB,EAAEC,mBAAW;AACb,EAAEC,oBAAY;AACd,EAAEC,2BAAmB;AACrB,EAAEC,uBAAe;AACjB,EAAEC,yBAAiB;AACnB,EAAEC,gBAAQ;AACV,EAAEC,uBAAe;AACjB,EAAEC,0BAAkB;AACpB,EAAEC,sBAAc;AAChB,EAAEC,oBAAY;AACd,EAAEC,kBAAU;AACZ,EAAEC,sBAAc;AAChB,EAAEC,kBAAU;AACZ,EAAEC,oBAAY;AACd,CAAC;;;;"}
@@ -18,3 +18,4 @@ export * from './cascader';
18
18
  export * from './select';
19
19
  export * from './click-input';
20
20
  export * from './scroll';
21
+ export * from './lazy-list';
@@ -22,17 +22,19 @@ var index$g = require('./cascader/index.js');
22
22
  var index$h = require('./select/index.js');
23
23
  var index$i = require('./click-input/index.js');
24
24
  var index$j = require('./scroll/index.js');
25
+ var index$k = require('./lazy-list/index.js');
25
26
  var title = require('./title/src/title.js');
26
27
  var configProviderProps = require('./config-provider/src/config-provider-props.js');
27
28
  var constants = require('./config-provider/src/constants.js');
28
29
  var useGlobalConfig = require('./config-provider/src/hooks/use-global-config.js');
29
30
  var scan = require('./scan/src/scan.js');
30
31
  var selectInput = require('./select-input/src/select-input.js');
31
- var selectTextarea = require('./select-textarea/src/select-textarea2.js');
32
- var inputRange = require('./input-range/src/input-range.js');
32
+ var selectTextarea = require('./select-textarea/src/select-textarea.js');
33
+ var inputRange = require('./input-range/src/input-range2.js');
33
34
  var cascader = require('./cascader/src/cascader.js');
34
35
  var select = require('./select/src/select.js');
35
36
  var clickInput = require('./click-input/src/click-input.js');
37
+ var lazyList = require('./lazy-list/src/lazy-list.js');
36
38
 
37
39
 
38
40
 
@@ -56,6 +58,7 @@ exports.HzztCascader = index$g.HzztCascader;
56
58
  exports.HzztSelect = index$h.HzztSelect;
57
59
  exports.HzztClickInput = index$i.HzztClickInput;
58
60
  exports.HzztScroll = index$j.HzztScroll;
61
+ exports.HzztLazyList = index$k.HzztLazyList;
59
62
  exports.titleProps = title.titleProps;
60
63
  exports.configProviderProps = configProviderProps.configProviderProps;
61
64
  exports.configProviderContextKey = constants.configProviderContextKey;
@@ -75,4 +78,6 @@ exports.selectEmits = select.selectEmits;
75
78
  exports.selectProps = select.selectProps;
76
79
  exports.clickInputEmits = clickInput.clickInputEmits;
77
80
  exports.clickInputProps = clickInput.clickInputProps;
81
+ exports.lazyListEmits = lazyList.lazyListEmits;
82
+ exports.lazyListProps = lazyList.lazyListProps;
78
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var inputRange$1 = require('./src/input-range2.js');
7
- var inputRange = require('./src/input-range.js');
6
+ var inputRange$1 = require('./src/input-range.js');
7
+ var inputRange = require('./src/input-range2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const HzztInputRange = install.withInstall(inputRange$1["default"]);
@@ -2,35 +2,84 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
5
+ var vue = require('vue');
6
+ var inputRange = require('./input-range2.js');
7
+ var elementPlus = require('element-plus');
6
8
  require('../../../hooks/index.js');
7
- require('../../../constants/index.js');
8
- var runtime = require('../../../utils/vue/props/runtime.js');
9
- var index = require('../../../hooks/use-size/index.js');
10
- var event = require('../../../constants/event.js');
11
- var shared = require('@vue/shared');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
11
+ var index$1 = require('../../../hooks/use-size/index.js');
12
12
 
13
- const inputRangeProps = runtime.buildProps({
14
- modelValue: {
15
- type: Array,
16
- default: () => []
17
- },
18
- size: index.useSizeProp,
19
- disabled: Boolean,
20
- clearable: {
21
- type: Boolean,
22
- default: false
23
- },
24
- startPlaceholder: String,
25
- endPlaceholder: String,
26
- startProps: Object,
27
- endProps: Object
13
+ const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", { class: "margin-h-1" }, "\u2014\u2014", -1);
14
+ const __default__ = vue.defineComponent({
15
+ name: "HzztInputRange"
28
16
  });
29
- const inputRangeEmits = {
30
- [event.UPDATE_MODEL_EVENT]: (val) => shared.isArray(val),
31
- [event.CHANGE_EVENT]: (val) => shared.isArray(val)
32
- };
17
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
+ ...__default__,
19
+ props: inputRange.inputRangeProps,
20
+ emits: inputRange.inputRangeEmits,
21
+ setup(__props, { emit }) {
22
+ const props = __props;
23
+ const startValue = vue.ref(props.modelValue[0]);
24
+ const endValue = vue.ref(props.modelValue[1]);
25
+ const nsInput = index.useNamespace("input-range");
26
+ const formSize = elementPlus.useFormSize();
27
+ const formDisabled = elementPlus.useFormDisabled();
28
+ const trueSize = vue.computed(() => props.size || formSize.value || index$1.useGlobalSize().value);
29
+ const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
30
+ const containerCls = vue.computed(() => [
31
+ nsInput.b(),
32
+ nsInput.m(trueSize.value)
33
+ ]);
34
+ vue.watch(() => props.modelValue, (v) => {
35
+ startValue.value = v[0];
36
+ endValue.value = v[1];
37
+ }, {
38
+ deep: true
39
+ });
40
+ function change() {
41
+ if (startValue.value || endValue.value) {
42
+ const modelValue = [startValue.value, endValue.value];
43
+ emit("update:modelValue", modelValue);
44
+ emit("change", modelValue);
45
+ } else if (!startValue.value && !endValue.value) {
46
+ emit("update:modelValue", []);
47
+ emit("change", []);
48
+ }
49
+ }
50
+ return (_ctx, _cache) => {
51
+ const _component_el_input = vue.resolveComponent("el-input");
52
+ return vue.openBlock(), vue.createElementBlock("div", {
53
+ class: vue.normalizeClass(["flex align-items-center", vue.unref(containerCls)])
54
+ }, [
55
+ vue.createVNode(_component_el_input, vue.mergeProps({
56
+ modelValue: startValue.value,
57
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => startValue.value = $event)
58
+ }, _ctx.startProps, {
59
+ clearable: _ctx.clearable,
60
+ placeholder: _ctx.startPlaceholder,
61
+ size: vue.unref(trueSize),
62
+ disabled: vue.unref(trueDisabled),
63
+ class: "flex-1",
64
+ onChange: change
65
+ }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"]),
66
+ _hoisted_1,
67
+ vue.createVNode(_component_el_input, vue.mergeProps({
68
+ modelValue: endValue.value,
69
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => endValue.value = $event)
70
+ }, _ctx.endProps, {
71
+ clearable: _ctx.clearable,
72
+ placeholder: _ctx.endPlaceholder,
73
+ size: vue.unref(trueSize),
74
+ disabled: vue.unref(trueDisabled),
75
+ class: "flex-1",
76
+ onChange: change
77
+ }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"])
78
+ ], 2);
79
+ };
80
+ }
81
+ });
82
+ var InputRange = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "input-range.vue"]]);
33
83
 
34
- exports.inputRangeEmits = inputRangeEmits;
35
- exports.inputRangeProps = inputRangeProps;
84
+ exports["default"] = InputRange;
36
85
  //# sourceMappingURL=input-range.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-range.js","sources":["../../../../../../packages/components/input-range/src/input-range.ts"],"sourcesContent":["import {buildProps, isArray} from '@hzzt-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type InputRange from './input-range.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport {CHANGE_EVENT, UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const inputRangeProps = buildProps({\n modelValue: {\n type: Array,\n default: () => [],\n },\n size: useSizeProp,\n disabled: Boolean,\n clearable: {\n type: Boolean,\n default: false,\n },\n startPlaceholder: String,\n endPlaceholder: String,\n startProps: Object,\n endProps: Object,\n})\n\nexport type InputRangeProps = ExtractPropTypes<typeof inputRangeProps>\n\nexport const inputRangeEmits = {\n [UPDATE_MODEL_EVENT]: (val: Array<string>) => isArray(val),\n [CHANGE_EVENT]: (val: Array<string>) => isArray(val),\n}\nexport type InputRangeEmits = typeof inputRangeEmits\n\nexport type InputRangeInstance = InstanceType<typeof InputRange>\n"],"names":["buildProps","useSizeProp","UPDATE_MODEL_EVENT","isArray","CHANGE_EVENT"],"mappings":";;;;;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,gBAAgB,EAAE,MAAM;AAC1B,EAAE,cAAc,EAAE,MAAM;AACxB,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,MAAM;AAClB,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,cAAO,CAAC,GAAG,CAAC;AAC7C,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKD,cAAO,CAAC,GAAG,CAAC;AACvC;;;;;"}
1
+ {"version":3,"file":"input-range.js","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","computed","watch","_resolveComponent","_openBlock","_createElementBlock","_unref","_createVNode","_mergeProps"],"mappings":";;;;;;;;;;;;;;AA2BE,EAAA,IAAA,EAAA;AACA,CAAA,CAAA,CAAA;AACA,MAAQ,SAAA,mBAA2BA,mBAAA,CAAA;AACnC,EAAA,GAAA;;mCAEc;AAAA,EACZ,KAAM,CAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA;AACR,IAAA,MAAA,KAAA,GAAA,OAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,YAAa,GAAAC,YAAU,CAAA,MAAA,KAAY,CAAC,QAAA,IAAA,YAAA,CAAA,KAAA,CAAA,CAAA;AAC1C,IAAA,MAAM,YAAW,GAAIA,YAAM,CAAA,MAAA;AAE3B,MAAM,OAAA,CAAA,CAAA,EAAA;AAEN,MAAA,kBAA6B,CAAA,KAAA,CAAA;AAC7B,KAAA,CAAA,CAAA;AAEA,IAAAC,SAAA,CAAM,MAAW,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACf,UAAY,CAAA,KAAA,GAAA,CAAQ,CAAS,CAAA,CAAA,CAAA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ule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var inputRange = require('./input-range.js');
7
- var elementPlus = require('element-plus');
5
+ require('../../../utils/index.js');
8
6
  require('../../../hooks/index.js');
9
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
- var index = require('../../../hooks/use-namespace/index.js');
11
- var index$1 = require('../../../hooks/use-size/index.js');
7
+ require('../../../constants/index.js');
8
+ var runtime = require('../../../utils/vue/props/runtime.js');
9
+ var index = require('../../../hooks/use-size/index.js');
10
+ var event = require('../../../constants/event.js');
11
+ var shared = require('@vue/shared');
12
12
 
13
- const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", { class: "margin-h-1" }, "\u2014\u2014", -1);
14
- const __default__ = vue.defineComponent({
15
- name: "HzztInputRange"
13
+ const inputRangeProps = runtime.buildProps({
14
+ modelValue: {
15
+ type: Array,
16
+ default: () => []
17
+ },
18
+ size: index.useSizeProp,
19
+ disabled: Boolean,
20
+ clearable: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ startPlaceholder: String,
25
+ endPlaceholder: String,
26
+ startProps: Object,
27
+ endProps: Object
16
28
  });
17
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
- ...__default__,
19
- props: inputRange.inputRangeProps,
20
- emits: inputRange.inputRangeEmits,
21
- setup(__props, { emit }) {
22
- const props = __props;
23
- const startValue = vue.ref(props.modelValue[0]);
24
- const endValue = vue.ref(props.modelValue[1]);
25
- const nsInput = index.useNamespace("input-range");
26
- const formSize = elementPlus.useFormSize();
27
- const formDisabled = elementPlus.useFormDisabled();
28
- const trueSize = vue.computed(() => props.size || formSize.value || index$1.useGlobalSize().value);
29
- const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
30
- const containerCls = vue.computed(() => [
31
- nsInput.b(),
32
- nsInput.m(trueSize.value)
33
- ]);
34
- vue.watch(() => props.modelValue, (v) => {
35
- startValue.value = v[0];
36
- endValue.value = v[1];
37
- }, {
38
- deep: true
39
- });
40
- function change() {
41
- if (startValue.value || endValue.value) {
42
- const modelValue = [startValue.value, endValue.value];
43
- emit("update:modelValue", modelValue);
44
- emit("change", modelValue);
45
- } else if (!startValue.value && !endValue.value) {
46
- emit("update:modelValue", []);
47
- emit("change", []);
48
- }
49
- }
50
- return (_ctx, _cache) => {
51
- const _component_el_input = vue.resolveComponent("el-input");
52
- return vue.openBlock(), vue.createElementBlock("div", {
53
- class: vue.normalizeClass(["flex align-items-center", vue.unref(containerCls)])
54
- }, [
55
- vue.createVNode(_component_el_input, vue.mergeProps({
56
- modelValue: startValue.value,
57
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => startValue.value = $event)
58
- }, _ctx.startProps, {
59
- clearable: _ctx.clearable,
60
- placeholder: _ctx.startPlaceholder,
61
- size: vue.unref(trueSize),
62
- disabled: vue.unref(trueDisabled),
63
- class: "flex-1",
64
- onChange: change
65
- }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"]),
66
- _hoisted_1,
67
- vue.createVNode(_component_el_input, vue.mergeProps({
68
- modelValue: endValue.value,
69
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => endValue.value = $event)
70
- }, _ctx.endProps, {
71
- clearable: _ctx.clearable,
72
- placeholder: _ctx.endPlaceholder,
73
- size: vue.unref(trueSize),
74
- disabled: vue.unref(trueDisabled),
75
- class: "flex-1",
76
- onChange: change
77
- }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"])
78
- ], 2);
79
- };
80
- }
81
- });
82
- var InputRange = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "input-range.vue"]]);
29
+ const inputRangeEmits = {
30
+ [event.UPDATE_MODEL_EVENT]: (val) => shared.isArray(val),
31
+ [event.CHANGE_EVENT]: (val) => shared.isArray(val)
32
+ };
83
33
 
84
- exports["default"] = InputRange;
34
+ exports.inputRangeEmits = inputRangeEmits;
35
+ exports.inputRangeProps = inputRangeProps;
85
36
  //# sourceMappingURL=input-range2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-range2.js","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","computed","watch","_resolveComponent","_openBlock","_createElementBlock","_unref","_createVNode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IAAA,CAAA,QAAA,EAAA,EAAA,CAAA,CAAA;AAED,OAAA;AACE,KAAI;AACF,IAAA,OAAA,CAAA,IAAmB,EAAA,MAAA,KAAY;AAC/B,MAAA,MAAA,sBAA0BC,oBAAU,CAAA,UAAA,CAAA,CAAA;AACpC,MAAA,OAAKC,aAAU,EAAU,EAAAC,sBAAA,CAAA,KAAA,EAAA;AAAA,iCACK,CAAA,CAAA,yBAAiB,EAAAC,SAAA,CAAA,YAAA,CAAA,CAAA,CAAA;AAC/C,OAAK,EAAA;AACL,QAAKC,eAAA,CAAA,mBAAY,EAAAC,cAAA,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
+ {"version":3,"file":"input-range2.js","sources":["../../../../../../packages/components/input-range/src/input-range.ts"],"sourcesContent":["import {buildProps, isArray} from '@hzzt-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type InputRange from './input-range.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport {CHANGE_EVENT, UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const inputRangeProps = buildProps({\n modelValue: {\n type: Array,\n default: () => [],\n },\n size: useSizeProp,\n disabled: Boolean,\n clearable: {\n type: Boolean,\n default: false,\n },\n startPlaceholder: String,\n endPlaceholder: String,\n startProps: Object,\n endProps: Object,\n})\n\nexport type InputRangeProps = ExtractPropTypes<typeof inputRangeProps>\n\nexport const inputRangeEmits = {\n [UPDATE_MODEL_EVENT]: (val: Array<string>) => isArray(val),\n [CHANGE_EVENT]: (val: Array<string>) => isArray(val),\n}\nexport type InputRangeEmits = typeof inputRangeEmits\n\nexport type InputRangeInstance = InstanceType<typeof InputRange>\n"],"names":["buildProps","useSizeProp","UPDATE_MODEL_EVENT","isArray","CHANGE_EVENT"],"mappings":";;;;;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,gBAAgB,EAAE,MAAM;AAC1B,EAAE,cAAc,EAAE,MAAM;AACxB,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,MAAM;AAClB,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,cAAO,CAAC,GAAG,CAAC;AAC7C,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKD,cAAO,CAAC,GAAG,CAAC;AACvC;;;;;"}
@@ -0,0 +1,5 @@
1
+ import LazyList from './src/lazy-list.vue';
2
+ import type { SFCWithInstall } from 'hzzt-plus/es/utils';
3
+ export declare const HzztLazyList: SFCWithInstall<typeof LazyList>;
4
+ export default HzztLazyList;
5
+ export * from './src/lazy-list';