hzzt-plus 1.0.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.full.js +557 -354
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +13 -13
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +558 -356
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/collapse/index.d.ts +161 -8
- package/es/components/collapse/src/collapse.vue.d.ts +161 -8
- package/es/components/collapse/src/collapse2.mjs +50 -29
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/icon/index.mjs +4 -0
- package/es/components/icon/index.mjs.map +1 -1
- package/es/components/icon/src/components/index.d.ts +2 -0
- package/es/components/icon/src/components/index.mjs +3 -0
- package/es/components/icon/src/components/index.mjs.map +1 -0
- package/es/components/icon/src/components/minus-square-outline.mjs +29 -0
- package/es/components/icon/src/components/minus-square-outline.mjs.map +1 -0
- package/es/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
- package/es/components/icon/src/components/plus-square-outline.mjs +29 -0
- package/es/components/icon/src/components/plus-square-outline.mjs.map +1 -0
- package/es/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +3 -2
- package/es/components/index.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/src/index.mjs +49 -21
- package/es/components/pagination/src/index.mjs.map +1 -1
- package/es/components/pagination/src/index.vue.d.ts +2 -2
- package/es/components/scroll/index.d.ts +5 -0
- package/es/components/scroll/index.mjs +9 -0
- package/es/components/scroll/index.mjs.map +1 -0
- package/es/components/scroll/src/scroll.d.ts +2 -0
- package/es/components/scroll/src/scroll.mjs +2 -0
- package/es/components/scroll/src/scroll.mjs.map +1 -0
- package/es/components/scroll/src/scroll.vue.d.ts +147 -0
- package/es/components/scroll/src/scroll2.mjs +88 -0
- package/es/components/scroll/src/scroll2.mjs.map +1 -0
- package/es/components/scroll/style/css.d.ts +2 -0
- package/es/components/scroll/style/css.mjs +3 -0
- package/es/components/scroll/style/css.mjs.map +1 -0
- package/es/components/scroll/style/index.d.ts +2 -0
- package/es/components/scroll/style/index.mjs +3 -0
- package/es/components/scroll/style/index.mjs.map +1 -0
- package/es/components/select-input/index.d.ts +39 -0
- 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-input.vue.d.ts +39 -0
- package/es/components/select-input/src/select-input2.mjs +124 -45
- package/es/components/select-input/src/select-input2.mjs.map +1 -1
- package/es/components/select-textarea/index.mjs +2 -2
- package/es/components/select-textarea/src/select-textarea.mjs +100 -30
- package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
- package/es/components/select-textarea/src/select-textarea.vue.d.ts +39 -0
- package/es/components/select-textarea/src/select-textarea2.mjs +30 -100
- package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
- package/es/components/title/src/title.d.ts +6 -0
- package/es/components/title/src/title.mjs +4 -1
- package/es/components/title/src/title.mjs.map +1 -1
- package/es/components/title/src/title.vue.d.ts +39 -0
- package/es/components/title/src/title2.mjs +28 -12
- package/es/components/title/src/title2.mjs.map +1 -1
- package/es/index.mjs +3 -2
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/collapse/index.d.ts +161 -8
- package/lib/components/collapse/src/collapse.vue.d.ts +161 -8
- package/lib/components/collapse/src/collapse2.js +49 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/icon/index.js +4 -0
- package/lib/components/icon/index.js.map +1 -1
- package/lib/components/icon/src/components/index.d.ts +2 -0
- package/lib/components/icon/src/components/index.js +12 -0
- package/lib/components/icon/src/components/index.js.map +1 -0
- package/lib/components/icon/src/components/minus-square-outline.js +33 -0
- package/lib/components/icon/src/components/minus-square-outline.js.map +1 -0
- package/lib/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
- package/lib/components/icon/src/components/plus-square-outline.js +33 -0
- package/lib/components/icon/src/components/plus-square-outline.js.map +1 -0
- package/lib/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +4 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/src/index.js +48 -20
- package/lib/components/pagination/src/index.js.map +1 -1
- package/lib/components/pagination/src/index.vue.d.ts +2 -2
- package/lib/components/scroll/index.d.ts +5 -0
- package/lib/components/scroll/index.js +14 -0
- package/lib/components/scroll/index.js.map +1 -0
- package/lib/components/scroll/src/scroll.d.ts +2 -0
- package/lib/components/scroll/src/scroll.js +3 -0
- package/lib/components/scroll/src/scroll.js.map +1 -0
- package/lib/components/scroll/src/scroll.vue.d.ts +147 -0
- package/lib/components/scroll/src/scroll2.js +92 -0
- package/lib/components/scroll/src/scroll2.js.map +1 -0
- package/lib/components/scroll/style/css.d.ts +2 -0
- package/lib/components/scroll/style/css.js +6 -0
- package/lib/components/scroll/style/css.js.map +1 -0
- package/lib/components/scroll/style/index.d.ts +2 -0
- package/lib/components/scroll/style/index.js +6 -0
- package/lib/components/scroll/style/index.js.map +1 -0
- package/lib/components/select-input/index.d.ts +39 -0
- 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-input.vue.d.ts +39 -0
- package/lib/components/select-input/src/select-input2.js +124 -46
- package/lib/components/select-input/src/select-input2.js.map +1 -1
- package/lib/components/select-textarea/index.js +2 -2
- package/lib/components/select-textarea/src/select-textarea.js +100 -31
- package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
- package/lib/components/select-textarea/src/select-textarea.vue.d.ts +39 -0
- package/lib/components/select-textarea/src/select-textarea2.js +31 -100
- package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
- package/lib/components/title/src/title.d.ts +6 -0
- package/lib/components/title/src/title.js +4 -1
- package/lib/components/title/src/title.js.map +1 -1
- package/lib/components/title/src/title.vue.d.ts +39 -0
- package/lib/components/title/src/title2.js +27 -11
- package/lib/components/title/src/title2.js.map +1 -1
- package/lib/index.js +34 -32
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/theme/hzzt-collapse.css +1 -1
- package/theme/hzzt-pagination.css +1 -1
- package/theme/hzzt-scan.css +1 -1
- package/theme/hzzt-scroll.css +1 -0
- package/theme/hzzt-title.css +1 -1
- package/theme/index.css +1 -1
- package/theme/src/collapse.scss +45 -39
- package/theme/src/index.scss +1 -0
- package/theme/src/pagination.scss +24 -6
- package/theme/src/scan.scss +3 -3
- package/theme/src/scroll.scss +42 -0
- package/theme/src/title.scss +14 -5
- package/web-types.json +1 -1
|
@@ -1,36 +1,106 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createVNode, createBlock, createCommentVNode, mergeProps } from 'vue';
|
|
2
|
+
import { selectTextareaProps, selectTextareaEmits } from './select-textarea2.mjs';
|
|
2
3
|
import '../../../hooks/index.mjs';
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
watch(() => props.modelValue, (v) => {
|
|
41
|
+
inputVal.value = v;
|
|
42
|
+
});
|
|
43
|
+
function input(val) {
|
|
44
|
+
emit("update:modelValue", val);
|
|
45
|
+
emit("input", val);
|
|
46
|
+
}
|
|
47
|
+
function change(val) {
|
|
48
|
+
emit("change", val);
|
|
49
|
+
}
|
|
50
|
+
function selectChange(val) {
|
|
51
|
+
if (!inputVal.value && inputVal.value !== 0)
|
|
52
|
+
inputVal.value = "";
|
|
53
|
+
selectValue.value = "";
|
|
54
|
+
let content = val;
|
|
55
|
+
if (!props.replace) {
|
|
56
|
+
const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
|
|
57
|
+
content = insertCursorPosition(inputEl, val);
|
|
58
|
+
}
|
|
59
|
+
input(content);
|
|
60
|
+
change(content);
|
|
61
|
+
emit("select", val);
|
|
62
|
+
}
|
|
63
|
+
return (_ctx, _cache) => {
|
|
64
|
+
return openBlock(), createElementBlock("div", {
|
|
65
|
+
class: normalizeClass(unref(containerCls))
|
|
66
|
+
}, [
|
|
67
|
+
createElementVNode("div", _hoisted_1, [
|
|
68
|
+
createElementVNode("div", _hoisted_2, [
|
|
69
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
70
|
+
createVNode(HzztTitle, {
|
|
71
|
+
class: "margin-l-1",
|
|
72
|
+
label: _ctx.label
|
|
73
|
+
}, null, 8, ["label"])
|
|
74
|
+
]),
|
|
75
|
+
!unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "flex-1",
|
|
78
|
+
modelValue: selectValue.value,
|
|
79
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
|
|
80
|
+
"allow-create": "",
|
|
81
|
+
filterable: "",
|
|
82
|
+
clearable: "",
|
|
83
|
+
onChange: selectChange,
|
|
84
|
+
options: _ctx.data
|
|
85
|
+
}, null, 8, ["modelValue", "options"])) : createCommentVNode("v-if", true),
|
|
86
|
+
renderSlot(_ctx.$slots, "right")
|
|
87
|
+
]),
|
|
88
|
+
createVNode(unref(ElInput), mergeProps({
|
|
89
|
+
ref_key: "inputRef",
|
|
90
|
+
ref: inputRef,
|
|
91
|
+
class: "flex-1 margin-t-1",
|
|
92
|
+
modelValue: inputVal.value,
|
|
93
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
|
|
94
|
+
}, unref(_inputProps), {
|
|
95
|
+
onInput: input,
|
|
96
|
+
onChange: change
|
|
97
|
+
}), null, 16, ["modelValue"])
|
|
98
|
+
])
|
|
99
|
+
], 2);
|
|
100
|
+
};
|
|
26
101
|
}
|
|
27
102
|
});
|
|
28
|
-
|
|
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
|
-
};
|
|
103
|
+
var SelectTextarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "select-textarea.vue"]]);
|
|
34
104
|
|
|
35
|
-
export {
|
|
105
|
+
export { SelectTextarea as default };
|
|
36
106
|
//# sourceMappingURL=select-textarea.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-textarea.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.
|
|
1
|
+
{"version":3,"file":"select-textarea.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <div class=\"flex column\">\n <div class=\"flex align-items-center\">\n <slot name=\"title\">\n <hzzt-title class=\"margin-l-1\" :label=\"label\"></hzzt-title>\n </slot>\n <el-select-v2 class=\"flex-1\" v-model=\"selectValue\" allow-create filterable clearable @change=\"selectChange\"\n v-if=\"!trueDisabled\" :options=\"data\"></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 watch(() => props.modelValue, (v) => {\n inputVal.value = v;\n })\n\n function input(val: string) {\n emit('update:modelValue', val);\n emit('input', val);\n }\n\n function change(val: string) {\n emit('change', val);\n }\n\n function selectChange(val: string) {\n if (!inputVal.value && inputVal.value !== 0) inputVal.value = '';\n selectValue.value = '';\n let content = val;\n if (!props.replace) {\n const inputEl = inputRef.value.$el.getElementsByTagName('textarea')[0];\n content = insertCursorPosition(inputEl, val);\n }\n input(content);\n change(content);\n emit('select', val);\n }\n\n\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;mCA0BgB,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACrC,IAAM,MAAA,WAAA,GAAc,IAAI,EAAE,CAAA,CAAA;AAC1B,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAM,MAAA,OAAA,GAAU,aAAa,iBAAiB,CAAA,CAAA;AAC9C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA;AAEA,MAAA;AAEA,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,KAAA,CAClC;AAAU,IACV,MAAA,WAAU,GAAA,QAAc,CAAA,OAAA;AAAA,MACzB,QAAA,EAAA,YAAA,CAAA,KAAA;AAED,MAAM,SAAA,EAAA,IAAA;AAA8B,MAClC,mBAAuB;AAAA,MACvB,IAAW,EAAA,UAAA;AAAA,KAAA,CACX;AAAS,IAAA,KACH,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACN,QAAA,CAAA,KAAA,GAAA,CAAA,CAAA;AAEF,KAAA,CAAA,CAAA;AACE,IAAA,SAAA,KAAiB,CAAA,GAAA,EAAA;AAAA,MAClB,IAAA,CAAA,mBAAA,EAAA,GAAA,CAAA,CAAA;AAED,MAAA,IAAA,CAAA,SAA4B,GAAA,CAAA,CAAA;AAC1B,KAAA;AACA,IAAA,gBAAc,GAAG,EAAA;AAAA,MACnB,IAAA,CAAA,QAAA,EAAA,GAAA,CAAA,CAAA;AAEA,KAAA;AACE,IAAA,qBAAkB,CAAA,GAAA,EAAA;AAAA,MACpB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -69,13 +69,46 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
69
|
HzztTitle: import("vue").DefineComponent<{
|
|
70
70
|
readonly label: StringConstructor;
|
|
71
71
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
72
|
+
readonly size: {
|
|
73
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
74
|
+
readonly required: false;
|
|
75
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
|
+
__epPropKey: true;
|
|
77
|
+
};
|
|
72
78
|
}, {
|
|
73
79
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
74
80
|
readonly label: StringConstructor;
|
|
75
81
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
82
|
+
readonly size: {
|
|
83
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
84
|
+
readonly required: false;
|
|
85
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
86
|
+
__epPropKey: true;
|
|
87
|
+
};
|
|
76
88
|
}>> & {
|
|
77
89
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
78
90
|
}>>;
|
|
91
|
+
formSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
92
|
+
ns: {
|
|
93
|
+
namespace: import("vue").ComputedRef<string>;
|
|
94
|
+
b: (blockSuffix?: string) => string;
|
|
95
|
+
e: (element?: string | undefined) => string;
|
|
96
|
+
m: (modifier?: string | undefined) => string;
|
|
97
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
98
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
99
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
100
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
101
|
+
is: {
|
|
102
|
+
(name: string, state: boolean | undefined): string;
|
|
103
|
+
(name: string): string;
|
|
104
|
+
};
|
|
105
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
106
|
+
cssVarName: (name: string) => string;
|
|
107
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
108
|
+
cssVarBlockName: (name: string) => string;
|
|
109
|
+
};
|
|
110
|
+
trueSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
111
|
+
nameKls: import("vue").ComputedRef<string[]>;
|
|
79
112
|
slots: Readonly<{
|
|
80
113
|
[name: string]: import("vue").Slot | undefined;
|
|
81
114
|
}>;
|
|
@@ -83,6 +116,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
116
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
84
117
|
readonly label: StringConstructor;
|
|
85
118
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
119
|
+
readonly size: {
|
|
120
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
121
|
+
readonly required: false;
|
|
122
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
123
|
+
__epPropKey: true;
|
|
124
|
+
};
|
|
86
125
|
}>>, {
|
|
87
126
|
readonly sideline: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
88
127
|
}>;
|
|
@@ -1,106 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { selectTextareaProps, selectTextareaEmits } from './select-textarea.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
3
2
|
import '../../../hooks/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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';
|
|
10
9
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
watch(() => props.modelValue, (v) => {
|
|
41
|
-
inputVal.value = v;
|
|
42
|
-
});
|
|
43
|
-
function input(val) {
|
|
44
|
-
emit("update:modelValue", val);
|
|
45
|
-
emit("input", val);
|
|
46
|
-
}
|
|
47
|
-
function change(val) {
|
|
48
|
-
emit("change", val);
|
|
49
|
-
}
|
|
50
|
-
function selectChange(val) {
|
|
51
|
-
if (!inputVal.value && inputVal.value !== 0)
|
|
52
|
-
inputVal.value = "";
|
|
53
|
-
selectValue.value = "";
|
|
54
|
-
let content = val;
|
|
55
|
-
if (!props.replace) {
|
|
56
|
-
const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
|
|
57
|
-
content = insertCursorPosition(inputEl, val);
|
|
58
|
-
}
|
|
59
|
-
input(content);
|
|
60
|
-
change(content);
|
|
61
|
-
emit("select", val);
|
|
62
|
-
}
|
|
63
|
-
return (_ctx, _cache) => {
|
|
64
|
-
return openBlock(), createElementBlock("div", {
|
|
65
|
-
class: normalizeClass(unref(containerCls))
|
|
66
|
-
}, [
|
|
67
|
-
createElementVNode("div", _hoisted_1, [
|
|
68
|
-
createElementVNode("div", _hoisted_2, [
|
|
69
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
70
|
-
createVNode(HzztTitle, {
|
|
71
|
-
class: "margin-l-1",
|
|
72
|
-
label: _ctx.label
|
|
73
|
-
}, null, 8, ["label"])
|
|
74
|
-
]),
|
|
75
|
-
!unref(trueDisabled) ? (openBlock(), createBlock(unref(ElSelectV2), {
|
|
76
|
-
key: 0,
|
|
77
|
-
class: "flex-1",
|
|
78
|
-
modelValue: selectValue.value,
|
|
79
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
|
|
80
|
-
"allow-create": "",
|
|
81
|
-
filterable: "",
|
|
82
|
-
clearable: "",
|
|
83
|
-
onChange: selectChange,
|
|
84
|
-
options: _ctx.data
|
|
85
|
-
}, null, 8, ["modelValue", "options"])) : createCommentVNode("v-if", true),
|
|
86
|
-
renderSlot(_ctx.$slots, "right")
|
|
87
|
-
]),
|
|
88
|
-
createVNode(unref(ElInput), mergeProps({
|
|
89
|
-
ref_key: "inputRef",
|
|
90
|
-
ref: inputRef,
|
|
91
|
-
class: "flex-1 margin-t-1",
|
|
92
|
-
modelValue: inputVal.value,
|
|
93
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
|
|
94
|
-
}, unref(_inputProps), {
|
|
95
|
-
onInput: input,
|
|
96
|
-
onChange: change
|
|
97
|
-
}), null, 16, ["modelValue"])
|
|
98
|
-
])
|
|
99
|
-
], 2);
|
|
100
|
-
};
|
|
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: ""
|
|
101
26
|
}
|
|
102
27
|
});
|
|
103
|
-
|
|
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
|
+
};
|
|
104
34
|
|
|
105
|
-
export {
|
|
35
|
+
export { selectTextareaEmits, selectTextareaProps };
|
|
106
36
|
//# sourceMappingURL=select-textarea2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-textarea2.mjs","sources":["../../../../../../packages/components/select-textarea/src/select-textarea.
|
|
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;;;;"}
|
|
@@ -3,6 +3,12 @@ import type Title from './title.vue';
|
|
|
3
3
|
export declare const titleProps: {
|
|
4
4
|
readonly label: StringConstructor;
|
|
5
5
|
readonly sideline: import("hzzt-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
6
|
+
readonly size: {
|
|
7
|
+
readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
8
|
+
readonly required: false;
|
|
9
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
10
|
+
__epPropKey: true;
|
|
11
|
+
};
|
|
6
12
|
};
|
|
7
13
|
export declare type TitleProps = ExtractPropTypes<typeof titleProps>;
|
|
8
14
|
export declare type TitleInstance = InstanceType<typeof Title>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import '../../../utils/index.mjs';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
2
3
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
3
5
|
|
|
4
6
|
const titleProps = buildProps({
|
|
5
7
|
label: String,
|
|
6
8
|
sideline: {
|
|
7
9
|
type: Boolean,
|
|
8
10
|
default: true
|
|
9
|
-
}
|
|
11
|
+
},
|
|
12
|
+
size: useSizeProp
|
|
10
13
|
});
|
|
11
14
|
|
|
12
15
|
export { titleProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.mjs","sources":["../../../../../../packages/components/title/src/title.ts"],"sourcesContent":["import { buildProps } from '@hzzt-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Title from './title.vue'\n\nexport const titleProps = buildProps({\n label: String,\n sideline: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type TitleProps = ExtractPropTypes<typeof titleProps>\n\nexport type TitleInstance = InstanceType<typeof Title>\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"title.mjs","sources":["../../../../../../packages/components/title/src/title.ts"],"sourcesContent":["import { buildProps } from '@hzzt-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Title from './title.vue'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\n\nexport const titleProps = buildProps({\n label: String,\n sideline: {\n type: Boolean,\n default: true,\n },\n size: useSizeProp,\n} as const)\nexport type TitleProps = ExtractPropTypes<typeof titleProps>\n\nexport type TitleInstance = InstanceType<typeof Title>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,CAAC;;;;"}
|
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
readonly label: StringConstructor;
|
|
3
3
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
4
|
+
readonly size: {
|
|
5
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
6
|
+
readonly required: false;
|
|
7
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
8
|
+
__epPropKey: true;
|
|
9
|
+
};
|
|
4
10
|
}, {
|
|
5
11
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
6
12
|
readonly label: StringConstructor;
|
|
7
13
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
14
|
+
readonly size: {
|
|
15
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
16
|
+
readonly required: false;
|
|
17
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
18
|
+
__epPropKey: true;
|
|
19
|
+
};
|
|
8
20
|
}>> & {
|
|
9
21
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
10
22
|
}>>;
|
|
23
|
+
formSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
24
|
+
ns: {
|
|
25
|
+
namespace: import("vue").ComputedRef<string>;
|
|
26
|
+
b: (blockSuffix?: string) => string;
|
|
27
|
+
e: (element?: string | undefined) => string;
|
|
28
|
+
m: (modifier?: string | undefined) => string;
|
|
29
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
30
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
31
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
32
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
33
|
+
is: {
|
|
34
|
+
(name: string, state: boolean | undefined): string;
|
|
35
|
+
(name: string): string;
|
|
36
|
+
};
|
|
37
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
38
|
+
cssVarName: (name: string) => string;
|
|
39
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
40
|
+
cssVarBlockName: (name: string) => string;
|
|
41
|
+
};
|
|
42
|
+
trueSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
43
|
+
nameKls: import("vue").ComputedRef<string[]>;
|
|
11
44
|
slots: Readonly<{
|
|
12
45
|
[name: string]: import("vue").Slot | undefined;
|
|
13
46
|
}>;
|
|
@@ -15,6 +48,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
48
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
49
|
readonly label: StringConstructor;
|
|
17
50
|
readonly sideline: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
51
|
+
readonly size: {
|
|
52
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
53
|
+
readonly required: false;
|
|
54
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
55
|
+
__epPropKey: true;
|
|
56
|
+
};
|
|
18
57
|
}>>, {
|
|
19
58
|
readonly sideline: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
20
59
|
}>;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, useSlots, unref, openBlock, createElementBlock, createElementVNode, createCommentVNode, renderSlot, normalizeClass, createTextVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { titleProps } from './title.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { useFormSize } from 'element-plus';
|
|
3
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';
|
|
4
8
|
|
|
5
9
|
const _hoisted_1 = {
|
|
6
10
|
key: 0,
|
|
7
|
-
class: "hzzt-title flex align-items-center"
|
|
11
|
+
class: "hzzt-title flex align-items-center justify-content-between"
|
|
8
12
|
};
|
|
9
|
-
const _hoisted_2 = {
|
|
13
|
+
const _hoisted_2 = { class: "flex align-items-center" };
|
|
14
|
+
const _hoisted_3 = {
|
|
10
15
|
key: 0,
|
|
11
|
-
class: "
|
|
16
|
+
class: "hzzt-title__line"
|
|
12
17
|
};
|
|
13
|
-
const _hoisted_3 = { class: "label-name" };
|
|
14
18
|
const __default__ = defineComponent({
|
|
15
19
|
name: "HzztTitle"
|
|
16
20
|
});
|
|
@@ -19,6 +23,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
23
|
props: titleProps,
|
|
20
24
|
setup(__props) {
|
|
21
25
|
const props = __props;
|
|
26
|
+
const formSize = useFormSize();
|
|
27
|
+
const ns = useNamespace("title");
|
|
28
|
+
const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
|
|
29
|
+
const nameKls = computed(() => {
|
|
30
|
+
return [ns.e("name"), ns.em("name", trueSize.value)];
|
|
31
|
+
});
|
|
22
32
|
const slots = useSlots();
|
|
23
33
|
const showLabel = computed(() => {
|
|
24
34
|
var _a, _b, _c;
|
|
@@ -26,13 +36,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
36
|
});
|
|
27
37
|
return (_ctx, _cache) => {
|
|
28
38
|
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
createElementVNode("div", _hoisted_2, [
|
|
40
|
+
_ctx.sideline ? (openBlock(), createElementBlock("span", _hoisted_3)) : createCommentVNode("v-if", true),
|
|
41
|
+
renderSlot(_ctx.$slots, "before"),
|
|
42
|
+
createElementVNode("label", {
|
|
43
|
+
class: normalizeClass(unref(nameKls))
|
|
44
|
+
}, [
|
|
45
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
46
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
47
|
+
])
|
|
48
|
+
], 2),
|
|
49
|
+
renderSlot(_ctx.$slots, "after")
|
|
50
|
+
]),
|
|
51
|
+
renderSlot(_ctx.$slots, "right")
|
|
36
52
|
])) : createCommentVNode("v-if", true);
|
|
37
53
|
};
|
|
38
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title2.mjs","sources":["../../../../../../packages/components/title/src/title.vue"],"sourcesContent":["<template>\n <div v-if=\"showLabel\" class=\"hzzt-title flex align-items-center\">\n <span v-if=\"sideline\" class=\"
|
|
1
|
+
{"version":3,"file":"title2.mjs","sources":["../../../../../../packages/components/title/src/title.vue"],"sourcesContent":["<template>\n <div v-if=\"showLabel\" class=\"hzzt-title flex align-items-center justify-content-between\">\n <div class=\"flex align-items-center\">\n <span v-if=\"sideline\" class=\"hzzt-title__line\" />\n <slot name=\"before\" />\n <label :class=\"nameKls\">\n <slot>{{ label }}</slot>\n </label>\n <slot name=\"after\" />\n </div>\n\n <slot name=\"right\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { titleProps } from './title'\nimport {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\nimport { useFormSize } from 'element-plus'\n\ndefineOptions({\n name: 'HzztTitle',\n})\n\nconst props = defineProps(titleProps)\n\nconst formSize = useFormSize()\n\nconst ns = useNamespace('title')\n\nconst trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n)\n\nconst nameKls = computed(() => {\n return [ns.e('name'), ns.em('name', trueSize.value)]\n})\n\nconst slots = useSlots()\n\nconst showLabel = computed(\n () => props.label || slots?.default?.()?.[0]?.children\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;mCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAE7B,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAE/B,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,aACH,GAAA,QAAiB,CAAA,MAAA;AAAyB,MACxD,OAAA,CAAA,EAAA,CAAA,CAAA,CAAA,MAAA,CAAA,EAAA,EAAA,CAAA,EAAA,CAAA,MAAA,EAAA,QAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AAEA,KAAM,CAAA,CAAA;AACJ,IAAO,MAAA,KAAI,GAAA,QAAQ,EAAG;AAA6B,IACrD,MAAC,SAAA,GAAA,QAAA,CAAA,MAAA;AAED,MAAA,IAAM,QAAQ,EAAS,CAAA;AAEvB,MAAA,OAAkB,KAAA,CAAA,KAAA,KAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,OAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,KAAA,CAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,CAAA,CAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAA,CAAA,CAAA;AAAA,KAAA,CAChB;AAA8C,IAChD,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -23,9 +23,9 @@ export { HzztCheckButton } from './components/check-button/index.mjs';
|
|
|
23
23
|
export { HzztQuarterPicker } from './components/quarter-picker/index.mjs';
|
|
24
24
|
export { scanEmits, scanProps } from './components/scan/src/scan.mjs';
|
|
25
25
|
export { HzztScan } from './components/scan/index.mjs';
|
|
26
|
-
export { selectInputEmits, selectInputProps } from './components/select-input/src/select-
|
|
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-
|
|
28
|
+
export { selectTextareaEmits, selectTextareaProps } from './components/select-textarea/src/select-textarea2.mjs';
|
|
29
29
|
export { HzztSelectTextarea } from './components/select-textarea/index.mjs';
|
|
30
30
|
export { inputRangeEmits, inputRangeProps } from './components/input-range/src/input-range.mjs';
|
|
31
31
|
export { HzztInputRange } from './components/input-range/index.mjs';
|
|
@@ -35,6 +35,7 @@ export { selectEmits, selectProps } from './components/select/src/select.mjs';
|
|
|
35
35
|
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
|
+
export { HzztScroll } from './components/scroll/index.mjs';
|
|
38
39
|
export { INSTALLED_KEY } from './constants/key.mjs';
|
|
39
40
|
export { componentSizeMap, componentSizes } from './constants/size.mjs';
|
|
40
41
|
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":"
|
|
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 = "
|
|
1
|
+
export declare const version = "2.0.0";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/hzzt-plus/version.ts"],"sourcesContent":["export const version = '
|
|
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;;;;"}
|