hzzt-plus 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +13 -12
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +13 -12
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +36 -122
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +122 -36
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/index.mjs +4 -4
- package/es/components/input-range/index.mjs +2 -2
- package/es/components/input-range/src/input-range.mjs +26 -76
- package/es/components/input-range/src/input-range.mjs.map +1 -1
- package/es/components/input-range/src/input-range2.mjs +76 -26
- package/es/components/input-range/src/input-range2.mjs.map +1 -1
- package/es/components/lazy-list/index.mjs +2 -2
- package/es/components/lazy-list/src/lazy-list.mjs +22 -80
- package/es/components/lazy-list/src/lazy-list.mjs.map +1 -1
- package/es/components/lazy-list/src/lazy-list2.mjs +80 -22
- package/es/components/lazy-list/src/lazy-list2.mjs.map +1 -1
- package/es/components/select-input/src/select-input.mjs +1 -1
- package/es/components/select-textarea/src/select-textarea2.mjs +1 -1
- package/es/components/tab/index.d.ts +2 -0
- package/es/components/tab/src/index.mjs +10 -9
- package/es/components/tab/src/index.mjs.map +1 -1
- package/es/components/tab/src/index.vue.d.ts +2 -0
- package/es/components/title/index.mjs +2 -2
- package/es/components/title/src/title.mjs +54 -11
- package/es/components/title/src/title.mjs.map +1 -1
- package/es/components/title/src/title2.mjs +11 -54
- package/es/components/title/src/title2.mjs.map +1 -1
- package/es/index.mjs +4 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +36 -121
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +121 -36
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/index.js +4 -4
- package/lib/components/input-range/index.js +2 -2
- package/lib/components/input-range/src/input-range.js +27 -76
- package/lib/components/input-range/src/input-range.js.map +1 -1
- package/lib/components/input-range/src/input-range2.js +76 -27
- package/lib/components/input-range/src/input-range2.js.map +1 -1
- package/lib/components/lazy-list/index.js +2 -2
- package/lib/components/lazy-list/src/lazy-list.js +23 -80
- package/lib/components/lazy-list/src/lazy-list.js.map +1 -1
- package/lib/components/lazy-list/src/lazy-list2.js +80 -23
- package/lib/components/lazy-list/src/lazy-list2.js.map +1 -1
- package/lib/components/select-input/src/select-input.js +1 -1
- package/lib/components/select-textarea/src/select-textarea2.js +1 -1
- package/lib/components/tab/index.d.ts +2 -0
- package/lib/components/tab/src/index.js +9 -8
- package/lib/components/tab/src/index.js.map +1 -1
- package/lib/components/tab/src/index.vue.d.ts +2 -0
- package/lib/components/title/index.js +2 -2
- package/lib/components/title/src/title.js +54 -11
- package/lib/components/title/src/title.js.map +1 -1
- package/lib/components/title/src/title2.js +11 -54
- package/lib/components/title/src/title2.js.map +1 -1
- package/lib/index.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/tab/src/index.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-tab flex align-items-center justify-content-between wrap\">\n <div class=\"flex align-items-center\">\n <div class=\"flex\">\n <div\n v-for=\"(tab, index) in customTabList\"\n :key=\"tab.key\"\n class=\"hzzt-tab-pane\"\n @click=\"tabClick(tab, $event)\"\n >\n <div class=\"hzzt-tab-badge\">\n <p\n :class=\"{ active: modelValue === tab.name }\"\n class=\"hzzt-tab-badge-text\"\n >\n {{ tab.label }}\n </p>\n <p\n v-if=\"tab.number && tab.number !== 0\"\n class=\"hzzt-tab-badge-count\"\n >\n {{ tab.number > 999 ? '999+' : tab.number }}\n </p>\n <hzzt-icon\n v-if=\"closable\"\n class=\"is-icon-close\"\n name=\"close\"\n @click=\"close(index, $event)\"\n />\n </div>\n </div>\n </div>\n <slot name=\"filter\" />\n <slot name=\"extra\" />\n </div>\n <div class=\"flex wrap\">\n <slot name=\"right\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n\ndefineOptions({\n name: 'HzztTab',\n})\n\ndeclare type Tab = {\n name: string\n label: string\n number: number\n hide: boolean\n}\n\nconst props = defineProps({\n tabList: {\n type: Array,\n default: () => [],\n },\n modelValue: {\n type: [Number, String, Array],\n },\n closable: {\n type: Boolean,\n default: () => false,\n },\n})\n\nconst emit = defineEmits(['update:modelValue', 'tab-click', 'tab-close'])\n\nconst customTabList = computed(() =>\n props.tabList\n .map((value) => {\n const tab = value as Tab\n return {\n key: `${tab.name}-${tab.number}` as string,\n ...tab,\n number: Number(tab.number || 0),\n hide: tab.hide,\n }\n })\n .filter((tab) => !tab.hide)\n)\n\nfunction tabClick(tab: Tab, event: Event) {\n if (tab.name === props.modelValue) return\n emit('update:modelValue', tab.name)\n emit('tab-click', tab, event)\n}\n\nfunction close(index: number, event: Event) {\n event.stopPropagation()\n emit('tab-close', index)\n}\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/tab/src/index.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-tab flex align-items-center justify-content-between wrap\">\n <div class=\"flex align-items-center\">\n <div class=\"flex\">\n <div\n v-for=\"(tab, index) in customTabList\"\n :key=\"tab.key\"\n class=\"hzzt-tab-pane\"\n @click=\"tabClick(tab, $event)\"\n >\n <div class=\"hzzt-tab-badge\">\n <p\n :class=\"{ active: modelValue === tab.name }\"\n class=\"hzzt-tab-badge-text\"\n >\n {{ tab.label }}\n </p>\n <p\n v-if=\"tab.number && tab.number !== 0\"\n class=\"hzzt-tab-badge-count\"\n :style=\"{ backgroundColor: tab.bgColor }\"\n >\n {{ tab.number > 999 ? '999+' : tab.number }}\n </p>\n <hzzt-icon\n v-if=\"closable\"\n class=\"is-icon-close\"\n name=\"close\"\n @click=\"close(index, $event)\"\n />\n </div>\n </div>\n </div>\n <slot name=\"filter\" />\n <slot name=\"extra\" />\n </div>\n <div class=\"flex wrap\">\n <slot name=\"right\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n\ndefineOptions({\n name: 'HzztTab',\n})\n\ndeclare type Tab = {\n name: string\n label: string\n number: number\n hide: boolean\n bgColor: string\n}\n\nconst props = defineProps({\n tabList: {\n type: Array,\n default: () => [],\n },\n modelValue: {\n type: [Number, String, Array],\n },\n closable: {\n type: Boolean,\n default: () => false,\n },\n})\n\nconst emit = defineEmits(['update:modelValue', 'tab-click', 'tab-close'])\n\nconst customTabList = computed(() =>\n props.tabList\n .map((value) => {\n const tab = value as Tab\n return {\n key: `${tab.name}-${tab.number}` as string,\n ...tab,\n number: Number(tab.number || 0),\n hide: tab.hide,\n bgColor: tab.bgColor || '',\n }\n })\n .filter((tab) => !tab.hide)\n)\n\nfunction tabClick(tab: Tab, event: Event) {\n if (tab.name === props.modelValue) return\n emit('update:modelValue', tab.name)\n emit('tab-click', tab, event)\n}\n\nfunction close(index: number, event: Event) {\n event.stopPropagation()\n emit('tab-close', index)\n}\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;mCA8Cc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;AA0BA,IAAA,MAAM,aAAgB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,KAAA,KAAA;AAAA,MAAS,MAC7B,GAAA,GAAM,KACH,CAAA;AACC,MAAA,OAAA;AACA,QAAO,GAAA,EAAA,CAAA,EAAA,GAAA,CAAA,IAAA,CAAA,CAAA,EAAA,GAAA,CAAA,MAAA,CAAA,CAAA;AAAA,QAAA;AACyB,QAAA,MAC3B,EAAA,MAAA,CAAA,GAAA,CAAA,MAAA,IAAA,CAAA,CAAA;AAAA,QAAA,IACK,EAAA,GAAA,CAAA,IAAA;AAAsB,QAAA,SACpB,GAAA,CAAA,OAAA,IAAA,EAAA;AAAA,OACV,CAAA;AAAwB,KAC1B,CAAA,CAAA,MAAA,CAAA,CAAA,GAAA,KAAA,CAAA,GAAA,CAAA,IAAA,CAAA,CAAA,CAAA;AAAA,IAAA,SAED,QAAgB,CAAA,GAAA,OAAS,EAAA;AAAA,MAC9B,IAAA,GAAA,CAAA,IAAA,KAAA,KAAA,CAAA,UAAA;AAEA,QAAS,OAAA;AACP,MAAI,IAAA,CAAA,mBAAmB,EAAA,GAAA,CAAA,IAAA,CAAA,CAAA;AAAY,MAAA,IAAA,CAAA,WAAA,EAAA,GAAA,EAAA,KAAA,CAAA,CAAA;AACnC,KAAK;AACL,IAAK,SAAA,KAAA,CAAA,KAAa,OAAU,EAAA;AAAA,MAC9B,KAAA,CAAA,eAAA,EAAA,CAAA;AAEA,MAAS,IAAA,CAAA,kBAAmC,CAAA,CAAA;AAC1C,KAAA;AACA,IAAA,OAAK,aAAa,KAAK;AAAA,MACzB,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA,UAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,6 +3,7 @@ declare type Tab = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
number: number;
|
|
5
5
|
hide: boolean;
|
|
6
|
+
bgColor: string;
|
|
6
7
|
};
|
|
7
8
|
declare const _default: import("vue").DefineComponent<{
|
|
8
9
|
tabList: {
|
|
@@ -38,6 +39,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
39
|
customTabList: import("vue").ComputedRef<{
|
|
39
40
|
number: number;
|
|
40
41
|
hide: boolean;
|
|
42
|
+
bgColor: string;
|
|
41
43
|
name: string;
|
|
42
44
|
label: string;
|
|
43
45
|
key: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import HzztTitle$1 from './src/
|
|
3
|
-
export { titleProps } from './src/
|
|
2
|
+
import HzztTitle$1 from './src/title.mjs';
|
|
3
|
+
export { titleProps } from './src/title2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const HzztTitle = withInstall(HzztTitle$1);
|
|
@@ -1,16 +1,59 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import { defineComponent, computed, useSlots, unref, openBlock, createElementBlock, createElementVNode, createCommentVNode, renderSlot, normalizeClass, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { titleProps } from './title2.mjs';
|
|
2
3
|
import '../../../hooks/index.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
4
|
+
import { useFormSize } from 'element-plus';
|
|
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';
|
|
5
8
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const _hoisted_1 = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "hzzt-title flex align-items-center justify-content-between"
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_2 = { class: "flex align-items-center" };
|
|
14
|
+
const _hoisted_3 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "hzzt-title__line"
|
|
17
|
+
};
|
|
18
|
+
const __default__ = defineComponent({
|
|
19
|
+
name: "HzztTitle"
|
|
13
20
|
});
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
|
+
...__default__,
|
|
23
|
+
props: titleProps,
|
|
24
|
+
setup(__props) {
|
|
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
|
+
});
|
|
32
|
+
const slots = useSlots();
|
|
33
|
+
const showLabel = computed(() => {
|
|
34
|
+
var _a, _b, _c;
|
|
35
|
+
return props.label || ((_c = (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b[0]) == null ? void 0 : _c.children);
|
|
36
|
+
});
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
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")
|
|
52
|
+
])) : createCommentVNode("v-if", true);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var HzztTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "title.vue"]]);
|
|
14
57
|
|
|
15
|
-
export {
|
|
58
|
+
export { HzztTitle as default };
|
|
16
59
|
//# sourceMappingURL=title.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.mjs","sources":["../../../../../../packages/components/title/src/title.
|
|
1
|
+
{"version":3,"file":"title.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;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,59 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { titleProps } from './title.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
3
2
|
import '../../../hooks/index.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
-
import { useGlobalSize } from '../../../hooks/use-size/index.mjs';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
8
5
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class: "hzzt-title__line"
|
|
17
|
-
};
|
|
18
|
-
const __default__ = defineComponent({
|
|
19
|
-
name: "HzztTitle"
|
|
6
|
+
const titleProps = buildProps({
|
|
7
|
+
label: String,
|
|
8
|
+
sideline: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: true
|
|
11
|
+
},
|
|
12
|
+
size: useSizeProp
|
|
20
13
|
});
|
|
21
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
|
-
...__default__,
|
|
23
|
-
props: titleProps,
|
|
24
|
-
setup(__props) {
|
|
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
|
-
});
|
|
32
|
-
const slots = useSlots();
|
|
33
|
-
const showLabel = computed(() => {
|
|
34
|
-
var _a, _b, _c;
|
|
35
|
-
return props.label || ((_c = (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b[0]) == null ? void 0 : _c.children);
|
|
36
|
-
});
|
|
37
|
-
return (_ctx, _cache) => {
|
|
38
|
-
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
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")
|
|
52
|
-
])) : createCommentVNode("v-if", true);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
var HzztTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "title.vue"]]);
|
|
57
14
|
|
|
58
|
-
export {
|
|
15
|
+
export { titleProps };
|
|
59
16
|
//# sourceMappingURL=title2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title2.mjs","sources":["../../../../../../packages/components/title/src/title.
|
|
1
|
+
{"version":3,"file":"title2.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;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import './constants/index.mjs';
|
|
|
5
5
|
import './directives/index.mjs';
|
|
6
6
|
import './hooks/index.mjs';
|
|
7
7
|
export { makeInstaller } from './make-installer.mjs';
|
|
8
|
-
export { titleProps } from './components/title/src/
|
|
8
|
+
export { titleProps } from './components/title/src/title2.mjs';
|
|
9
9
|
export { HzztTitle } from './components/title/index.mjs';
|
|
10
10
|
export { HzztDropdown } from './components/dropdown/index.mjs';
|
|
11
11
|
export { HzztCollapse } from './components/collapse/index.mjs';
|
|
@@ -27,16 +27,16 @@ export { selectInputEmits, selectInputProps } from './components/select-input/sr
|
|
|
27
27
|
export { HzztSelectInput } from './components/select-input/index.mjs';
|
|
28
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-
|
|
30
|
+
export { inputRangeEmits, inputRangeProps } from './components/input-range/src/input-range.mjs';
|
|
31
31
|
export { HzztInputRange } from './components/input-range/index.mjs';
|
|
32
|
-
export { cascaderEmits, cascaderProps } from './components/cascader/src/
|
|
32
|
+
export { cascaderEmits, cascaderProps } from './components/cascader/src/cascader.mjs';
|
|
33
33
|
export { HzztCascader } from './components/cascader/index.mjs';
|
|
34
34
|
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
38
|
export { HzztScroll } from './components/scroll/index.mjs';
|
|
39
|
-
export { lazyListEmits, lazyListProps } from './components/lazy-list/src/lazy-
|
|
39
|
+
export { lazyListEmits, lazyListProps } from './components/lazy-list/src/lazy-list.mjs';
|
|
40
40
|
export { HzztLazyList } from './components/lazy-list/index.mjs';
|
|
41
41
|
export { INSTALLED_KEY } from './constants/key.mjs';
|
|
42
42
|
export { componentSizeMap, componentSizes } from './constants/size.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.0.
|
|
1
|
+
export declare const version = "2.0.6";
|
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 = '2.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/hzzt-plus/version.ts"],"sourcesContent":["export const version = '2.0.6'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var cascader$1 = require('./src/
|
|
7
|
-
var cascader = require('./src/
|
|
6
|
+
var cascader$1 = require('./src/cascader2.js');
|
|
7
|
+
var cascader = require('./src/cascader.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const HzztCascader = install.withInstall(cascader$1["default"]);
|
|
@@ -2,131 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var cascader = require('./cascader2.js');
|
|
7
|
-
var elementPlus = require('element-plus');
|
|
8
|
-
require('../../../hooks/index.js');
|
|
9
5
|
require('../../../utils/index.js');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
var index
|
|
6
|
+
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');
|
|
14
11
|
var shared = require('@vue/shared');
|
|
15
12
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const inputCls = vue.computed(() => [
|
|
41
|
-
nsCascader.e("input")
|
|
42
|
-
]);
|
|
43
|
-
const cascaderCls = vue.computed(() => [
|
|
44
|
-
nsCascader.e("cascader")
|
|
45
|
-
]);
|
|
46
|
-
const _inputProps = vue.computed(() => ({
|
|
47
|
-
disabled: trueDisabled.value,
|
|
48
|
-
size: trueSize.value,
|
|
49
|
-
clearable: props.clearable,
|
|
50
|
-
placeholder: props.placeholder,
|
|
51
|
-
readonly: props.readonly,
|
|
52
|
-
...attrs
|
|
53
|
-
}));
|
|
54
|
-
const _cascaderProps = vue.computed(() => ({
|
|
55
|
-
options: props.options,
|
|
56
|
-
disabled: trueDisabled.value,
|
|
57
|
-
size: trueSize.value,
|
|
58
|
-
clearable: props.clearable,
|
|
59
|
-
placeholder: props.placeholder,
|
|
60
|
-
props: { checkStrictly: true, expandTrigger: "hover" },
|
|
61
|
-
filterable: true,
|
|
62
|
-
separator: "/",
|
|
63
|
-
showAllLevels: true,
|
|
64
|
-
...props.cascaderProps
|
|
65
|
-
}));
|
|
66
|
-
vue.watch(() => props.modelValue, (v) => {
|
|
67
|
-
inputVal.value = v;
|
|
68
|
-
getCascaderVal();
|
|
69
|
-
});
|
|
70
|
-
vue.watch(() => props.options, (v) => {
|
|
71
|
-
if (!v)
|
|
72
|
-
return;
|
|
73
|
-
getCascaderVal();
|
|
74
|
-
});
|
|
75
|
-
getCascaderVal();
|
|
76
|
-
function input(str) {
|
|
77
|
-
emit("update:modelValue", str);
|
|
78
|
-
emit("input", str);
|
|
79
|
-
}
|
|
80
|
-
function change(str) {
|
|
81
|
-
emit("change", str);
|
|
82
|
-
}
|
|
83
|
-
function click(e) {
|
|
84
|
-
cascaderRef.value.togglePopperVisible();
|
|
85
|
-
const target = e.target;
|
|
86
|
-
target.focus();
|
|
87
|
-
}
|
|
88
|
-
function cascaderChange(val) {
|
|
89
|
-
const separator = _cascaderProps.value.separator || "/";
|
|
90
|
-
inputVal.value = val ? shared.isArray(val) ? val.join(separator) : [val].join(separator) : "";
|
|
91
|
-
input(inputVal.value);
|
|
92
|
-
change(inputVal.value);
|
|
93
|
-
}
|
|
94
|
-
function getCascaderVal() {
|
|
95
|
-
const separator = _cascaderProps.value.separator || "/";
|
|
96
|
-
if (_cascaderProps.value.showAllLevels === false) {
|
|
97
|
-
const list = utils.getCascaderId(props.modelValue, props.options);
|
|
98
|
-
cascaderVal.value = list.join(separator);
|
|
99
|
-
} else {
|
|
100
|
-
cascaderVal.value = (props.modelValue || "").split(separator);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return (_ctx, _cache) => {
|
|
104
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
105
|
-
class: vue.normalizeClass(vue.unref(containerCls))
|
|
106
|
-
}, [
|
|
107
|
-
vue.createVNode(vue.unref(elementPlus.ElInput), vue.mergeProps({
|
|
108
|
-
class: vue.unref(inputCls),
|
|
109
|
-
modelValue: inputVal.value,
|
|
110
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event),
|
|
111
|
-
ref_key: "inputRef",
|
|
112
|
-
ref: inputRef
|
|
113
|
-
}, vue.unref(_inputProps), {
|
|
114
|
-
onInput: input,
|
|
115
|
-
onClick: click,
|
|
116
|
-
onChange: change
|
|
117
|
-
}), null, 16, ["class", "modelValue"]),
|
|
118
|
-
vue.createVNode(vue.unref(elementPlus.ElCascader), vue.mergeProps({
|
|
119
|
-
class: vue.unref(cascaderCls),
|
|
120
|
-
modelValue: cascaderVal.value,
|
|
121
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => cascaderVal.value = $event),
|
|
122
|
-
ref_key: "cascaderRef",
|
|
123
|
-
ref: cascaderRef
|
|
124
|
-
}, vue.unref(_cascaderProps), { onChange: cascaderChange }), null, 16, ["class", "modelValue"])
|
|
125
|
-
], 2);
|
|
126
|
-
};
|
|
13
|
+
const cascaderProps = runtime.buildProps({
|
|
14
|
+
cascaderProps: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: () => ({
|
|
17
|
+
showAllLevels: true
|
|
18
|
+
})
|
|
19
|
+
},
|
|
20
|
+
disabled: Boolean,
|
|
21
|
+
readonly: Boolean,
|
|
22
|
+
clearable: Boolean,
|
|
23
|
+
size: index.useSizeProp,
|
|
24
|
+
options: {
|
|
25
|
+
type: runtime.definePropType(Array),
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
modelValue: {
|
|
33
|
+
type: runtime.definePropType([
|
|
34
|
+
String
|
|
35
|
+
]),
|
|
36
|
+
default: ""
|
|
127
37
|
}
|
|
128
38
|
});
|
|
129
|
-
|
|
39
|
+
const cascaderEmits = {
|
|
40
|
+
[event.UPDATE_MODEL_EVENT]: (value) => shared.isString(value),
|
|
41
|
+
input: (value) => shared.isString(value),
|
|
42
|
+
change: (value) => shared.isString(value)
|
|
43
|
+
};
|
|
130
44
|
|
|
131
|
-
exports
|
|
45
|
+
exports.cascaderEmits = cascaderEmits;
|
|
46
|
+
exports.cascaderProps = cascaderProps;
|
|
132
47
|
//# sourceMappingURL=cascader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascader.js","sources":["../../../../../../packages/components/cascader/src/cascader.
|
|
1
|
+
{"version":3,"file":"cascader.js","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import {buildProps, definePropType, isString} from '@hzzt-plus/utils'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\nimport type {ExtractPropTypes} from 'vue'\nimport type Cascader from './cascader.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport type CascaderNodeValue = string | number\n\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport const cascaderProps = buildProps({\n cascaderProps: {\n type: Object,\n default: () => ({\n showAllLevels: true,\n }),\n },\n disabled: Boolean,\n readonly: Boolean,\n clearable: Boolean,\n size: useSizeProp,\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n placeholder: {\n type: String,\n default: '',\n },\n modelValue: {\n type: definePropType<string | undefined>([\n String,\n ]),\n default: '',\n },\n})\n\nexport type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport const cascaderEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | undefined) => isString(value),\n input: (value: string | undefined) => isString(value),\n change: (value: string | undefined) => isString(value),\n}\nexport type CascaderEmits = typeof cascaderEmits\n\n\nexport type CascaderInstance = InstanceType<typeof Cascader>\n"],"names":["buildProps","useSizeProp","definePropType","UPDATE_MODEL_EVENT","isString"],"mappings":";;;;;;;;;;;;AAGY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,aAAa,EAAE,IAAI;AACzB,KAAK,CAAC;AACN,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKC,eAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACpC;;;;;"}
|