hzzt-plus 0.0.2-dev-05 → 0.0.2-dev07

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.
@@ -20419,7 +20419,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20419
20419
  __props.isManual ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref(t)("pageSize.d")) + toDisplayString(__props.modelValue) + toDisplayString(unref(t)("pageSize.page")), 1)) : createCommentVNode("v-if", true),
20420
20420
  __props.pageSizeOptions.length ? (openBlock(), createElementBlock("div", {
20421
20421
  key: 2,
20422
- class: normalizeClass([_ctx.e("option"), "flex align-items-center"])
20422
+ class: normalizeClass([unref(ns).e("option"), "flex align-items-center"])
20423
20423
  }, [
20424
20424
  createElementVNode("span", _hoisted_3, toDisplayString(unref(t)("lang.per_page")), 1),
20425
20425
  createVNode(unref(ElSelect), {
@@ -20444,7 +20444,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20444
20444
  ], 2)) : createCommentVNode("v-if", true),
20445
20445
  unref(page) > 1 || __props.isManual ? (openBlock(), createElementBlock("div", {
20446
20446
  key: 3,
20447
- class: normalizeClass(_ctx.e("pagination"))
20447
+ class: normalizeClass(unref(ns).e("pagination"))
20448
20448
  }, [
20449
20449
  !__props.isManual ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.modelValue) + "/" + toDisplayString(unref(page)), 1)) : createCommentVNode("v-if", true),
20450
20450
  unref(page) > 2 && __props.modelValue > 2 ? (openBlock(), createBlock(unref(ElButton), {
@@ -20638,4 +20638,4 @@ function setCssText(el, show, prop, value) {
20638
20638
  const install = installer.install;
20639
20639
  const version = installer.version;
20640
20640
 
20641
- export { Blur, Download, Height, Highlight, HzztCollapse, HzztConfigProvider, HzztDropdown, HzztIcon, HzztPagination, HzztTab, HzztTitle, HzztTooltip, INSTALLED_KEY, SIZE_INJECTION_KEY$1 as SIZE_INJECTION_KEY, WEEK_DAYS, buildLocaleContext$1 as buildLocaleContext, buildTranslator$1 as buildTranslator, componentSizeMap, componentSizes$1 as componentSizes, configProviderContextKey$1 as configProviderContextKey, configProviderProps, datePickTypes, installer as default, defaultNamespace$1 as defaultNamespace, install, localeContextKey$1 as localeContextKey, makeInstaller, namespaceContextKey$1 as namespaceContextKey, provideGlobalConfig, translate$1 as translate, useGetDerivedNamespace$1 as useGetDerivedNamespace, useGlobalConfig$1 as useGlobalConfig, useGlobalSize$1 as useGlobalSize, useLocale$1 as useLocale, useNamespace$1 as useNamespace, useSizeProp$1 as useSizeProp, useSizeProps, version };
20641
+ export { Blur, Download, Height, Highlight, HzztCollapse, HzztConfigProvider, HzztDropdown, HzztIcon, HzztPageSize, HzztPagination, HzztTab, HzztTitle, HzztTooltip, INSTALLED_KEY, SIZE_INJECTION_KEY$1 as SIZE_INJECTION_KEY, WEEK_DAYS, buildLocaleContext$1 as buildLocaleContext, buildTranslator$1 as buildTranslator, componentSizeMap, componentSizes$1 as componentSizes, configProviderContextKey$1 as configProviderContextKey, configProviderProps, datePickTypes, installer as default, defaultNamespace$1 as defaultNamespace, install, localeContextKey$1 as localeContextKey, makeInstaller, namespaceContextKey$1 as namespaceContextKey, provideGlobalConfig, translate$1 as translate, useGetDerivedNamespace$1 as useGetDerivedNamespace, useGlobalConfig$1 as useGlobalConfig, useGlobalSize$1 as useGlobalSize, useLocale$1 as useLocale, useNamespace$1 as useNamespace, useSizeProp$1 as useSizeProp, useSizeProps, version };
@@ -6,3 +6,4 @@ export * from './tab';
6
6
  export * from './icon';
7
7
  export * from './pagination';
8
8
  export * from './tooltip';
9
+ export * from './page-size';
@@ -6,6 +6,7 @@ export { HzztTab } from './tab/index.mjs';
6
6
  export { HzztIcon } from './icon/index.mjs';
7
7
  export { HzztPagination } from './pagination/index.mjs';
8
8
  export { HzztTooltip } from './tooltip/index.mjs';
9
+ export { HzztPageSize } from './page-size/index.mjs';
9
10
  export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
10
11
  export { configProviderContextKey } from './config-provider/src/constants.mjs';
11
12
  export { provideGlobalConfig, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -84,7 +84,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
84
84
  __props.isManual ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref(t)("pageSize.d")) + toDisplayString(__props.modelValue) + toDisplayString(unref(t)("pageSize.page")), 1)) : createCommentVNode("v-if", true),
85
85
  __props.pageSizeOptions.length ? (openBlock(), createElementBlock("div", {
86
86
  key: 2,
87
- class: normalizeClass([_ctx.e("option"), "flex align-items-center"])
87
+ class: normalizeClass([unref(ns).e("option"), "flex align-items-center"])
88
88
  }, [
89
89
  createElementVNode("span", _hoisted_3, toDisplayString(unref(t)("lang.per_page")), 1),
90
90
  createVNode(unref(ElSelect), {
@@ -109,7 +109,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
109
  ], 2)) : createCommentVNode("v-if", true),
110
110
  unref(page) > 1 || __props.isManual ? (openBlock(), createElementBlock("div", {
111
111
  key: 3,
112
- class: normalizeClass(_ctx.e("pagination"))
112
+ class: normalizeClass(unref(ns).e("pagination"))
113
113
  }, [
114
114
  !__props.isManual ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.modelValue) + "/" + toDisplayString(unref(page)), 1)) : createCommentVNode("v-if", true),
115
115
  unref(page) > 2 && __props.modelValue > 2 ? (openBlock(), createBlock(unref(ElButton), {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/page-size/src/index.vue"],"sourcesContent":["<template>\n <main\n :class=\"compKls\"\n class=\"flex wrap align-items-center justify-content-end\"\n >\n <span v-if=\"total > 0 && !isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.total') }}{{ total }}{{ t('pageSize.strip') }}</span\n >\n <span v-if=\"isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.d') }}{{ modelValue }}{{ t('pageSize.page') }}</span\n >\n <div\n v-if=\"pageSizeOptions.length\"\n :class=\"e('option')\"\n class=\"flex align-items-center\"\n >\n <span class=\"line-height-1\">{{ t('lang.per_page') }}</span>\n <el-select\n v-model=\"sizeValue\"\n :disabled=\"disabled\"\n :size=\"size\"\n :clearable=\"false\"\n @change=\"pageSizeChange\"\n >\n <el-option\n v-for=\"item in pageSizeOptions\"\n :key=\"item\"\n :label=\"`${item}${t('pageSize.strip')}`\"\n :value=\"item\"\n />\n </el-select>\n </div>\n <div v-if=\"page > 1 || isManual\" :class=\"e('pagination')\">\n <span v-if=\"!isManual\" class=\"margin-l-1 margin-r-2\"\n >{{ modelValue }}/{{ page }}</span\n >\n <el-button\n v-if=\"page > 2 && modelValue > 2\"\n type=\"primary\"\n style=\"margin-right: 2px\"\n :size=\"size\"\n @click=\"currentChange(1)\"\n >\n <hzzt-icon name=\"d-arrow-left\" />\n </el-button>\n <el-input-number\n v-model=\"innerPage\"\n class=\"width-2\"\n :size=\"size\"\n :min=\"1\"\n :max=\"page\"\n @change=\"currentChange\"\n />\n <el-button\n v-if=\"page > 2 && modelValue < page\"\n type=\"primary\"\n style=\"margin-left: 2px\"\n :size=\"size\"\n @click=\"currentChange(page)\"\n >\n <hzzt-icon name=\"d-arrow-right\" />\n </el-button>\n </div>\n </main>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElButton, ElInputNumber, ElSelect } from 'element-plus'\nimport { useLocale, useNamespace, useSizeProp } from '@hzzt-plus/hooks'\nimport HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n\ndefineOptions({\n name: 'HzztPageSize',\n})\n\nconst props = defineProps({\n modelValue: {\n type: Number,\n default: 1,\n },\n pageSize: {\n type: Number,\n default: 20,\n },\n total: {\n type: Number,\n default: 0,\n },\n disabled: Boolean,\n isManual: Boolean,\n isLastPage: Boolean,\n pageSizeOptions: {\n type: Array,\n default: () => [20, 50, 100, 200, 500, 1000, 2000],\n },\n size: useSizeProp,\n})\n\nconst emit = defineEmits([\n 'page-size-change',\n 'update:modelValue',\n 'current-change',\n])\n\nconst sizeValue = ref(props.pageSize)\nconst innerPage = ref(props.modelValue || 0)\nconst { t } = useLocale()\nconst ns = useNamespace('page-size')\n\nconst compKls = computed(() => {\n return [ns.b(), ns.m(props.size)]\n})\n\nconst page = computed(() => Math.ceil(props.total / props.pageSize))\n\nwatch(\n () => props.pageSize,\n (val) => {\n sizeValue.value = val\n }\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n innerPage.value = val\n }\n)\n\nfunction pageSizeChange(size: number) {\n emit('page-size-change', size)\n}\n\nfunction currentChange(page: number) {\n emit('update:modelValue', page)\n emit('current-change', page)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;mCAwEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACpC,IAAA,MAAM,SAAY,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,CAAC,CAAA,CAAA;AAC3C,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA,CAAC,GAAG,CAAE,EAAA,EAAG,GAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA,CAAA;AAAA,KACjC,CAAA,CAAA;AAED,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM,IAAA,CAAK,KAAK,KAAM,CAAA,KAAA,GAAQ,KAAM,CAAA,QAAQ,CAAC,CAAA,CAAA;AAEnE,IAAA,KAAA,CACE,MAAM,KAAA,CAAM,QACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAA,KAAA,CACE,MAAM,KAAA,CAAM,UACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAA,SAAA,cAAA,CAAwB,IAAc,EAAA;AACpC,MAAA,IAAA,CAAK,oBAAoB,IAAI,CAAA,CAAA;AAAA,KAC/B;AAEA,IAAA,SAAA,aAAA,CAAuB,KAAc,EAAA;AACnC,MAAA,IAAA,CAAK,qBAAqB,KAAI,CAAA,CAAA;AAC9B,MAAA,IAAA,CAAK,kBAAkB,KAAI,CAAA,CAAA;AAAA,KAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/page-size/src/index.vue"],"sourcesContent":["<template>\n <main\n :class=\"compKls\"\n class=\"flex wrap align-items-center justify-content-end\"\n >\n <span v-if=\"total > 0 && !isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.total') }}{{ total }}{{ t('pageSize.strip') }}</span\n >\n <span v-if=\"isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.d') }}{{ modelValue }}{{ t('pageSize.page') }}</span\n >\n <div\n v-if=\"pageSizeOptions.length\"\n :class=\"ns.e('option')\"\n class=\"flex align-items-center\"\n >\n <span class=\"line-height-1\">{{ t('lang.per_page') }}</span>\n <el-select\n v-model=\"sizeValue\"\n :disabled=\"disabled\"\n :size=\"size\"\n :clearable=\"false\"\n @change=\"pageSizeChange\"\n >\n <el-option\n v-for=\"item in pageSizeOptions\"\n :key=\"item\"\n :label=\"`${item}${t('pageSize.strip')}`\"\n :value=\"item\"\n />\n </el-select>\n </div>\n <div v-if=\"page > 1 || isManual\" :class=\"ns.e('pagination')\">\n <span v-if=\"!isManual\" class=\"margin-l-1 margin-r-2\"\n >{{ modelValue }}/{{ page }}</span\n >\n <el-button\n v-if=\"page > 2 && modelValue > 2\"\n type=\"primary\"\n style=\"margin-right: 2px\"\n :size=\"size\"\n @click=\"currentChange(1)\"\n >\n <hzzt-icon name=\"d-arrow-left\" />\n </el-button>\n <el-input-number\n v-model=\"innerPage\"\n class=\"width-2\"\n :size=\"size\"\n :min=\"1\"\n :max=\"page\"\n @change=\"currentChange\"\n />\n <el-button\n v-if=\"page > 2 && modelValue < page\"\n type=\"primary\"\n style=\"margin-left: 2px\"\n :size=\"size\"\n @click=\"currentChange(page)\"\n >\n <hzzt-icon name=\"d-arrow-right\" />\n </el-button>\n </div>\n </main>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElButton, ElInputNumber, ElSelect } from 'element-plus'\nimport { useLocale, useNamespace, useSizeProp } from '@hzzt-plus/hooks'\nimport HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n\ndefineOptions({\n name: 'HzztPageSize',\n})\n\nconst props = defineProps({\n modelValue: {\n type: Number,\n default: 1,\n },\n pageSize: {\n type: Number,\n default: 20,\n },\n total: {\n type: Number,\n default: 0,\n },\n disabled: Boolean,\n isManual: Boolean,\n isLastPage: Boolean,\n pageSizeOptions: {\n type: Array,\n default: () => [20, 50, 100, 200, 500, 1000, 2000],\n },\n size: useSizeProp,\n})\n\nconst emit = defineEmits([\n 'page-size-change',\n 'update:modelValue',\n 'current-change',\n])\n\nconst sizeValue = ref(props.pageSize)\nconst innerPage = ref(props.modelValue || 0)\nconst { t } = useLocale()\nconst ns = useNamespace('page-size')\n\nconst compKls = computed(() => {\n return [ns.b(), ns.m(props.size)]\n})\n\nconst page = computed(() => Math.ceil(props.total / props.pageSize))\n\nwatch(\n () => props.pageSize,\n (val) => {\n sizeValue.value = val\n }\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n innerPage.value = val\n }\n)\n\nfunction pageSizeChange(size: number) {\n emit('page-size-change', size)\n}\n\nfunction currentChange(page: number) {\n emit('update:modelValue', page)\n emit('current-change', page)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;mCAwEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACpC,IAAA,MAAM,SAAY,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,CAAC,CAAA,CAAA;AAC3C,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA,CAAC,GAAG,CAAE,EAAA,EAAG,GAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA,CAAA;AAAA,KACjC,CAAA,CAAA;AAED,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM,IAAA,CAAK,KAAK,KAAM,CAAA,KAAA,GAAQ,KAAM,CAAA,QAAQ,CAAC,CAAA,CAAA;AAEnE,IAAA,KAAA,CACE,MAAM,KAAA,CAAM,QACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAA,KAAA,CACE,MAAM,KAAA,CAAM,UACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAA,SAAA,cAAA,CAAwB,IAAc,EAAA;AACpC,MAAA,IAAA,CAAK,oBAAoB,IAAI,CAAA,CAAA;AAAA,KAC/B;AAEA,IAAA,SAAA,aAAA,CAAuB,KAAc,EAAA;AACnC,MAAA,IAAA,CAAK,qBAAqB,KAAI,CAAA,CAAA;AAC9B,MAAA,IAAA,CAAK,kBAAkB,KAAI,CAAA,CAAA;AAAA,KAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/es/index.mjs CHANGED
@@ -16,6 +16,7 @@ export { HzztTab } from './components/tab/index.mjs';
16
16
  export { HzztIcon } from './components/icon/index.mjs';
17
17
  export { HzztPagination } from './components/pagination/index.mjs';
18
18
  export { HzztTooltip } from './components/tooltip/index.mjs';
19
+ export { HzztPageSize } from './components/page-size/index.mjs';
19
20
  export { INSTALLED_KEY } from './constants/key.mjs';
20
21
  export { componentSizeMap, componentSizes } from './constants/size.mjs';
21
22
  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;;;;"}
@@ -6,3 +6,4 @@ export * from './tab';
6
6
  export * from './icon';
7
7
  export * from './pagination';
8
8
  export * from './tooltip';
9
+ export * from './page-size';
@@ -10,6 +10,7 @@ var index$4 = require('./tab/index.js');
10
10
  var index$5 = require('./icon/index.js');
11
11
  var index$6 = require('./pagination/index.js');
12
12
  var index$7 = require('./tooltip/index.js');
13
+ var index$8 = require('./page-size/index.js');
13
14
  var configProviderProps = require('./config-provider/src/config-provider-props.js');
14
15
  var constants = require('./config-provider/src/constants.js');
15
16
  var useGlobalConfig = require('./config-provider/src/hooks/use-global-config.js');
@@ -24,6 +25,7 @@ exports.HzztTab = index$4.HzztTab;
24
25
  exports.HzztIcon = index$5.HzztIcon;
25
26
  exports.HzztPagination = index$6.HzztPagination;
26
27
  exports.HzztTooltip = index$7.HzztTooltip;
28
+ exports.HzztPageSize = index$8.HzztPageSize;
27
29
  exports.configProviderProps = configProviderProps.configProviderProps;
28
30
  exports.configProviderContextKey = constants.configProviderContextKey;
29
31
  exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -88,7 +88,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
88
88
  __props.isManual ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(vue.unref(t)("pageSize.d")) + vue.toDisplayString(__props.modelValue) + vue.toDisplayString(vue.unref(t)("pageSize.page")), 1)) : vue.createCommentVNode("v-if", true),
89
89
  __props.pageSizeOptions.length ? (vue.openBlock(), vue.createElementBlock("div", {
90
90
  key: 2,
91
- class: vue.normalizeClass([_ctx.e("option"), "flex align-items-center"])
91
+ class: vue.normalizeClass([vue.unref(ns).e("option"), "flex align-items-center"])
92
92
  }, [
93
93
  vue.createElementVNode("span", _hoisted_3, vue.toDisplayString(vue.unref(t)("lang.per_page")), 1),
94
94
  vue.createVNode(vue.unref(elementPlus.ElSelect), {
@@ -113,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
113
113
  ], 2)) : vue.createCommentVNode("v-if", true),
114
114
  vue.unref(page) > 1 || __props.isManual ? (vue.openBlock(), vue.createElementBlock("div", {
115
115
  key: 3,
116
- class: vue.normalizeClass(_ctx.e("pagination"))
116
+ class: vue.normalizeClass(vue.unref(ns).e("pagination"))
117
117
  }, [
118
118
  !__props.isManual ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, vue.toDisplayString(__props.modelValue) + "/" + vue.toDisplayString(vue.unref(page)), 1)) : vue.createCommentVNode("v-if", true),
119
119
  vue.unref(page) > 2 && __props.modelValue > 2 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../packages/components/page-size/src/index.vue"],"sourcesContent":["<template>\n <main\n :class=\"compKls\"\n class=\"flex wrap align-items-center justify-content-end\"\n >\n <span v-if=\"total > 0 && !isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.total') }}{{ total }}{{ t('pageSize.strip') }}</span\n >\n <span v-if=\"isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.d') }}{{ modelValue }}{{ t('pageSize.page') }}</span\n >\n <div\n v-if=\"pageSizeOptions.length\"\n :class=\"e('option')\"\n class=\"flex align-items-center\"\n >\n <span class=\"line-height-1\">{{ t('lang.per_page') }}</span>\n <el-select\n v-model=\"sizeValue\"\n :disabled=\"disabled\"\n :size=\"size\"\n :clearable=\"false\"\n @change=\"pageSizeChange\"\n >\n <el-option\n v-for=\"item in pageSizeOptions\"\n :key=\"item\"\n :label=\"`${item}${t('pageSize.strip')}`\"\n :value=\"item\"\n />\n </el-select>\n </div>\n <div v-if=\"page > 1 || isManual\" :class=\"e('pagination')\">\n <span v-if=\"!isManual\" class=\"margin-l-1 margin-r-2\"\n >{{ modelValue }}/{{ page }}</span\n >\n <el-button\n v-if=\"page > 2 && modelValue > 2\"\n type=\"primary\"\n style=\"margin-right: 2px\"\n :size=\"size\"\n @click=\"currentChange(1)\"\n >\n <hzzt-icon name=\"d-arrow-left\" />\n </el-button>\n <el-input-number\n v-model=\"innerPage\"\n class=\"width-2\"\n :size=\"size\"\n :min=\"1\"\n :max=\"page\"\n @change=\"currentChange\"\n />\n <el-button\n v-if=\"page > 2 && modelValue < page\"\n type=\"primary\"\n style=\"margin-left: 2px\"\n :size=\"size\"\n @click=\"currentChange(page)\"\n >\n <hzzt-icon name=\"d-arrow-right\" />\n </el-button>\n </div>\n </main>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElButton, ElInputNumber, ElSelect } from 'element-plus'\nimport { useLocale, useNamespace, useSizeProp } from '@hzzt-plus/hooks'\nimport HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n\ndefineOptions({\n name: 'HzztPageSize',\n})\n\nconst props = defineProps({\n modelValue: {\n type: Number,\n default: 1,\n },\n pageSize: {\n type: Number,\n default: 20,\n },\n total: {\n type: Number,\n default: 0,\n },\n disabled: Boolean,\n isManual: Boolean,\n isLastPage: Boolean,\n pageSizeOptions: {\n type: Array,\n default: () => [20, 50, 100, 200, 500, 1000, 2000],\n },\n size: useSizeProp,\n})\n\nconst emit = defineEmits([\n 'page-size-change',\n 'update:modelValue',\n 'current-change',\n])\n\nconst sizeValue = ref(props.pageSize)\nconst innerPage = ref(props.modelValue || 0)\nconst { t } = useLocale()\nconst ns = useNamespace('page-size')\n\nconst compKls = computed(() => {\n return [ns.b(), ns.m(props.size)]\n})\n\nconst page = computed(() => Math.ceil(props.total / props.pageSize))\n\nwatch(\n () => props.pageSize,\n (val) => {\n sizeValue.value = val\n }\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n innerPage.value = val\n }\n)\n\nfunction pageSizeChange(size: number) {\n emit('page-size-change', size)\n}\n\nfunction currentChange(page: number) {\n emit('update:modelValue', page)\n emit('current-change', page)\n}\n</script>\n"],"names":["ref","useLocale","useNamespace","computed","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;uCAwEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAM,MAAA,SAAA,GAAYA,OAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACpC,IAAA,MAAM,SAAY,GAAAA,OAAA,CAAI,KAAM,CAAA,UAAA,IAAc,CAAC,CAAA,CAAA;AAC3C,IAAM,MAAA,EAAE,MAAMC,iBAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAC7B,MAAO,OAAA,CAAC,GAAG,CAAE,EAAA,EAAG,GAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA,CAAA;AAAA,KACjC,CAAA,CAAA;AAED,IAAM,MAAA,IAAA,GAAOA,aAAS,MAAM,IAAA,CAAK,KAAK,KAAM,CAAA,KAAA,GAAQ,KAAM,CAAA,QAAQ,CAAC,CAAA,CAAA;AAEnE,IAAAC,SAAA,CACE,MAAM,KAAA,CAAM,QACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAAA,SAAA,CACE,MAAM,KAAA,CAAM,UACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAA,SAAA,cAAA,CAAwB,IAAc,EAAA;AACpC,MAAA,IAAA,CAAK,oBAAoB,IAAI,CAAA,CAAA;AAAA,KAC/B;AAEA,IAAA,SAAA,aAAA,CAAuB,KAAc,EAAA;AACnC,MAAA,IAAA,CAAK,qBAAqB,KAAI,CAAA,CAAA;AAC9B,MAAA,IAAA,CAAK,kBAAkB,KAAI,CAAA,CAAA;AAAA,KAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../packages/components/page-size/src/index.vue"],"sourcesContent":["<template>\n <main\n :class=\"compKls\"\n class=\"flex wrap align-items-center justify-content-end\"\n >\n <span v-if=\"total > 0 && !isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.total') }}{{ total }}{{ t('pageSize.strip') }}</span\n >\n <span v-if=\"isManual\" style=\"white-space: nowrap\"\n >{{ t('pageSize.d') }}{{ modelValue }}{{ t('pageSize.page') }}</span\n >\n <div\n v-if=\"pageSizeOptions.length\"\n :class=\"ns.e('option')\"\n class=\"flex align-items-center\"\n >\n <span class=\"line-height-1\">{{ t('lang.per_page') }}</span>\n <el-select\n v-model=\"sizeValue\"\n :disabled=\"disabled\"\n :size=\"size\"\n :clearable=\"false\"\n @change=\"pageSizeChange\"\n >\n <el-option\n v-for=\"item in pageSizeOptions\"\n :key=\"item\"\n :label=\"`${item}${t('pageSize.strip')}`\"\n :value=\"item\"\n />\n </el-select>\n </div>\n <div v-if=\"page > 1 || isManual\" :class=\"ns.e('pagination')\">\n <span v-if=\"!isManual\" class=\"margin-l-1 margin-r-2\"\n >{{ modelValue }}/{{ page }}</span\n >\n <el-button\n v-if=\"page > 2 && modelValue > 2\"\n type=\"primary\"\n style=\"margin-right: 2px\"\n :size=\"size\"\n @click=\"currentChange(1)\"\n >\n <hzzt-icon name=\"d-arrow-left\" />\n </el-button>\n <el-input-number\n v-model=\"innerPage\"\n class=\"width-2\"\n :size=\"size\"\n :min=\"1\"\n :max=\"page\"\n @change=\"currentChange\"\n />\n <el-button\n v-if=\"page > 2 && modelValue < page\"\n type=\"primary\"\n style=\"margin-left: 2px\"\n :size=\"size\"\n @click=\"currentChange(page)\"\n >\n <hzzt-icon name=\"d-arrow-right\" />\n </el-button>\n </div>\n </main>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElButton, ElInputNumber, ElSelect } from 'element-plus'\nimport { useLocale, useNamespace, useSizeProp } from '@hzzt-plus/hooks'\nimport HzztIcon from '@hzzt-plus/components/icon/src/index.vue'\n\ndefineOptions({\n name: 'HzztPageSize',\n})\n\nconst props = defineProps({\n modelValue: {\n type: Number,\n default: 1,\n },\n pageSize: {\n type: Number,\n default: 20,\n },\n total: {\n type: Number,\n default: 0,\n },\n disabled: Boolean,\n isManual: Boolean,\n isLastPage: Boolean,\n pageSizeOptions: {\n type: Array,\n default: () => [20, 50, 100, 200, 500, 1000, 2000],\n },\n size: useSizeProp,\n})\n\nconst emit = defineEmits([\n 'page-size-change',\n 'update:modelValue',\n 'current-change',\n])\n\nconst sizeValue = ref(props.pageSize)\nconst innerPage = ref(props.modelValue || 0)\nconst { t } = useLocale()\nconst ns = useNamespace('page-size')\n\nconst compKls = computed(() => {\n return [ns.b(), ns.m(props.size)]\n})\n\nconst page = computed(() => Math.ceil(props.total / props.pageSize))\n\nwatch(\n () => props.pageSize,\n (val) => {\n sizeValue.value = val\n }\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n innerPage.value = val\n }\n)\n\nfunction pageSizeChange(size: number) {\n emit('page-size-change', size)\n}\n\nfunction currentChange(page: number) {\n emit('update:modelValue', page)\n emit('current-change', page)\n}\n</script>\n"],"names":["ref","useLocale","useNamespace","computed","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;uCAwEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAM,MAAA,SAAA,GAAYA,OAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACpC,IAAA,MAAM,SAAY,GAAAA,OAAA,CAAI,KAAM,CAAA,UAAA,IAAc,CAAC,CAAA,CAAA;AAC3C,IAAM,MAAA,EAAE,MAAMC,iBAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAC7B,MAAO,OAAA,CAAC,GAAG,CAAE,EAAA,EAAG,GAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAC,CAAA,CAAA;AAAA,KACjC,CAAA,CAAA;AAED,IAAM,MAAA,IAAA,GAAOA,aAAS,MAAM,IAAA,CAAK,KAAK,KAAM,CAAA,KAAA,GAAQ,KAAM,CAAA,QAAQ,CAAC,CAAA,CAAA;AAEnE,IAAAC,SAAA,CACE,MAAM,KAAA,CAAM,QACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAAA,SAAA,CACE,MAAM,KAAA,CAAM,UACZ,EAAA,CAAC,GAAQ,KAAA;AACP,MAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,KAEtB,CAAA,CAAA;AAEA,IAAA,SAAA,cAAA,CAAwB,IAAc,EAAA;AACpC,MAAA,IAAA,CAAK,oBAAoB,IAAI,CAAA,CAAA;AAAA,KAC/B;AAEA,IAAA,SAAA,aAAA,CAAuB,KAAc,EAAA;AACnC,MAAA,IAAA,CAAK,qBAAqB,KAAI,CAAA,CAAA;AAC9B,MAAA,IAAA,CAAK,kBAAkB,KAAI,CAAA,CAAA;AAAA,KAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.js CHANGED
@@ -19,16 +19,17 @@ var index$4 = require('./components/tab/index.js');
19
19
  var index$5 = require('./components/icon/index.js');
20
20
  var index$6 = require('./components/pagination/index.js');
21
21
  var index$7 = require('./components/tooltip/index.js');
22
+ var index$8 = require('./components/page-size/index.js');
22
23
  var key = require('./constants/key.js');
23
24
  var size = require('./constants/size.js');
24
25
  var date = require('./constants/date.js');
25
- var index$8 = require('./directives/download/index.js');
26
- var index$9 = require('./directives/height/index.js');
27
- var index$a = require('./directives/blur/index.js');
28
- var index$b = require('./directives/highlight/index.js');
29
- var index$c = require('./hooks/use-locale/index.js');
30
- var index$d = require('./hooks/use-size/index.js');
31
- var index$e = require('./hooks/use-namespace/index.js');
26
+ var index$9 = require('./directives/download/index.js');
27
+ var index$a = require('./directives/height/index.js');
28
+ var index$b = require('./directives/blur/index.js');
29
+ var index$c = require('./directives/highlight/index.js');
30
+ var index$d = require('./hooks/use-locale/index.js');
31
+ var index$e = require('./hooks/use-size/index.js');
32
+ var index$f = require('./hooks/use-namespace/index.js');
32
33
 
33
34
  const install = defaults["default"].install;
34
35
  const version = defaults["default"].version;
@@ -47,28 +48,29 @@ exports.HzztTab = index$4.HzztTab;
47
48
  exports.HzztIcon = index$5.HzztIcon;
48
49
  exports.HzztPagination = index$6.HzztPagination;
49
50
  exports.HzztTooltip = index$7.HzztTooltip;
51
+ exports.HzztPageSize = index$8.HzztPageSize;
50
52
  exports.INSTALLED_KEY = key.INSTALLED_KEY;
51
53
  exports.componentSizeMap = size.componentSizeMap;
52
54
  exports.componentSizes = size.componentSizes;
53
55
  exports.WEEK_DAYS = date.WEEK_DAYS;
54
56
  exports.datePickTypes = date.datePickTypes;
55
- exports.Download = index$8["default"];
56
- exports.Height = index$9["default"];
57
- exports.Blur = index$a["default"];
58
- exports.Highlight = index$b["default"];
59
- exports.buildLocaleContext = index$c.buildLocaleContext;
60
- exports.buildTranslator = index$c.buildTranslator;
61
- exports.localeContextKey = index$c.localeContextKey;
62
- exports.translate = index$c.translate;
63
- exports.useLocale = index$c.useLocale;
64
- exports.SIZE_INJECTION_KEY = index$d.SIZE_INJECTION_KEY;
65
- exports.useGlobalSize = index$d.useGlobalSize;
66
- exports.useSizeProp = index$d.useSizeProp;
67
- exports.useSizeProps = index$d.useSizeProps;
68
- exports.defaultNamespace = index$e.defaultNamespace;
69
- exports.namespaceContextKey = index$e.namespaceContextKey;
70
- exports.useGetDerivedNamespace = index$e.useGetDerivedNamespace;
71
- exports.useNamespace = index$e.useNamespace;
57
+ exports.Download = index$9["default"];
58
+ exports.Height = index$a["default"];
59
+ exports.Blur = index$b["default"];
60
+ exports.Highlight = index$c["default"];
61
+ exports.buildLocaleContext = index$d.buildLocaleContext;
62
+ exports.buildTranslator = index$d.buildTranslator;
63
+ exports.localeContextKey = index$d.localeContextKey;
64
+ exports.translate = index$d.translate;
65
+ exports.useLocale = index$d.useLocale;
66
+ exports.SIZE_INJECTION_KEY = index$e.SIZE_INJECTION_KEY;
67
+ exports.useGlobalSize = index$e.useGlobalSize;
68
+ exports.useSizeProp = index$e.useSizeProp;
69
+ exports.useSizeProps = index$e.useSizeProps;
70
+ exports.defaultNamespace = index$f.defaultNamespace;
71
+ exports.namespaceContextKey = index$f.namespaceContextKey;
72
+ exports.useGetDerivedNamespace = index$f.useGetDerivedNamespace;
73
+ exports.useNamespace = index$f.useNamespace;
72
74
  exports.install = install;
73
75
  exports.version = version;
74
76
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","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":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hzzt-plus",
3
- "version": "0.0.2-dev-05",
3
+ "version": "0.0.2-dev07",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "hzzt-plus",