hzzt-plus 0.0.2-dev-01 → 0.0.2-dev-02
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 +121 -53
- package/dist/index.full.min.js +7 -7
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +122 -55
- package/dist/locale/en.js +4 -0
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.js.map +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.min.mjs.map +1 -1
- package/dist/locale/en.mjs +4 -0
- package/dist/locale/zh-cn.js +4 -0
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.js.map +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.min.mjs.map +1 -1
- package/dist/locale/zh-cn.mjs +4 -0
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +1 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +46 -0
- package/es/components/pagination/index.mjs +8 -0
- package/es/components/pagination/index.mjs.map +1 -0
- package/es/components/pagination/src/index.mjs +68 -0
- package/es/components/pagination/src/index.mjs.map +1 -0
- package/es/components/pagination/src/index.vue.d.ts +46 -0
- package/es/components/pagination/style/css.d.ts +2 -0
- package/es/components/pagination/style/css.mjs +3 -0
- package/es/components/pagination/style/css.mjs.map +1 -0
- package/es/components/pagination/style/index.d.ts +2 -0
- package/es/components/pagination/style/index.mjs +3 -0
- package/es/components/pagination/style/index.mjs.map +1 -0
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/en.d.ts +4 -0
- package/es/locale/lang/en.mjs +4 -0
- package/es/locale/lang/en.mjs.map +1 -1
- package/es/locale/lang/zh-cn.d.ts +4 -0
- package/es/locale/lang/zh-cn.mjs +4 -0
- package/es/locale/lang/zh-cn.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/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/pagination/index.d.ts +46 -0
- package/lib/components/pagination/index.js +13 -0
- package/lib/components/pagination/index.js.map +1 -0
- package/lib/components/pagination/src/index.js +72 -0
- package/lib/components/pagination/src/index.js.map +1 -0
- package/lib/components/pagination/src/index.vue.d.ts +46 -0
- package/lib/components/pagination/style/css.d.ts +2 -0
- package/lib/components/pagination/style/css.js +6 -0
- package/lib/components/pagination/style/css.js.map +1 -0
- package/lib/components/pagination/style/index.d.ts +2 -0
- package/lib/components/pagination/style/index.js +6 -0
- package/lib/components/pagination/style/index.js.map +1 -0
- package/lib/index.js +21 -19
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/en.d.ts +4 -0
- package/lib/locale/lang/en.js +4 -0
- package/lib/locale/lang/en.js.map +1 -1
- package/lib/locale/lang/zh-cn.d.ts +4 -0
- package/lib/locale/lang/zh-cn.js +4 -0
- package/lib/locale/lang/zh-cn.js.map +1 -1
- package/package.json +1 -1
- package/theme/base.css +1 -1
- package/theme/hzzt-pagination.css +1 -0
- package/theme/index.css +1 -1
- package/theme/src/base.scss +4 -3
- package/theme/src/common/index.scss +48 -0
- package/theme/src/index.scss +2 -0
- package/theme/src/pagination.scss +17 -0
package/dist/index.full.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Hzzt Plus v0.0.1 */
|
|
2
2
|
|
|
3
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, warn, unref, computed, isRef, ref, inject, getCurrentInstance, provide, renderSlot, useSlots, createCommentVNode, createTextVNode, toDisplayString, mergeProps, withDirectives, withModifiers, normalizeClass, Fragment, renderList, watch, useAttrs, createBlock, normalizeProps, guardReactiveProps, withCtx, resolveDynamicComponent } from 'vue';
|
|
3
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, warn, unref, computed, isRef, ref, inject, getCurrentInstance, provide, renderSlot, useSlots, createCommentVNode, createTextVNode, toDisplayString, mergeProps, withDirectives, withModifiers, normalizeClass, Fragment, renderList, watch, useAttrs, createBlock, normalizeProps, guardReactiveProps, withCtx, resolveDynamicComponent, createVNode } from 'vue';
|
|
4
4
|
|
|
5
5
|
var _a;
|
|
6
6
|
const isClient = typeof window !== "undefined";
|
|
@@ -12392,6 +12392,10 @@ var English = {
|
|
|
12392
12392
|
collapse: {
|
|
12393
12393
|
expand: "expand",
|
|
12394
12394
|
retract: "retract"
|
|
12395
|
+
},
|
|
12396
|
+
pagination: {
|
|
12397
|
+
total: "total",
|
|
12398
|
+
strip: "strip"
|
|
12395
12399
|
}
|
|
12396
12400
|
}
|
|
12397
12401
|
};
|
|
@@ -12531,20 +12535,20 @@ var _export_sfc$1 = (sfc, props) => {
|
|
|
12531
12535
|
return target;
|
|
12532
12536
|
};
|
|
12533
12537
|
|
|
12534
|
-
const _hoisted_1$
|
|
12538
|
+
const _hoisted_1$4 = {
|
|
12535
12539
|
key: 0,
|
|
12536
12540
|
class: "hzzt-title flex align-items-center"
|
|
12537
12541
|
};
|
|
12538
|
-
const _hoisted_2$
|
|
12542
|
+
const _hoisted_2$4 = {
|
|
12539
12543
|
key: 0,
|
|
12540
12544
|
class: "decorative-line"
|
|
12541
12545
|
};
|
|
12542
|
-
const _hoisted_3$
|
|
12543
|
-
const __default__$
|
|
12546
|
+
const _hoisted_3$4 = { class: "label-name" };
|
|
12547
|
+
const __default__$5 = defineComponent({
|
|
12544
12548
|
name: "HzztTitle"
|
|
12545
12549
|
});
|
|
12546
|
-
const _sfc_main$
|
|
12547
|
-
...__default__$
|
|
12550
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
12551
|
+
...__default__$5,
|
|
12548
12552
|
props: {
|
|
12549
12553
|
label: String,
|
|
12550
12554
|
sideline: {
|
|
@@ -12560,10 +12564,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12560
12564
|
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);
|
|
12561
12565
|
});
|
|
12562
12566
|
return (_ctx, _cache) => {
|
|
12563
|
-
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
12564
|
-
__props.sideline ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
12567
|
+
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
12568
|
+
__props.sideline ? (openBlock(), createElementBlock("span", _hoisted_2$4)) : createCommentVNode("v-if", true),
|
|
12565
12569
|
renderSlot(_ctx.$slots, "before"),
|
|
12566
|
-
createElementVNode("label", _hoisted_3$
|
|
12570
|
+
createElementVNode("label", _hoisted_3$4, [
|
|
12567
12571
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
12568
12572
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
12569
12573
|
])
|
|
@@ -12572,7 +12576,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12572
12576
|
};
|
|
12573
12577
|
}
|
|
12574
12578
|
});
|
|
12575
|
-
var Title = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
12579
|
+
var Title = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "index.vue"]]);
|
|
12576
12580
|
|
|
12577
12581
|
const HzztTitle = withInstall$1(Title);
|
|
12578
12582
|
|
|
@@ -12744,12 +12748,12 @@ const iconProps = buildProps({
|
|
|
12744
12748
|
}
|
|
12745
12749
|
});
|
|
12746
12750
|
|
|
12747
|
-
const __default__$
|
|
12751
|
+
const __default__$4 = defineComponent({
|
|
12748
12752
|
name: "ElIcon",
|
|
12749
12753
|
inheritAttrs: false
|
|
12750
12754
|
});
|
|
12751
|
-
const _sfc_main$
|
|
12752
|
-
...__default__$
|
|
12755
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
12756
|
+
...__default__$4,
|
|
12753
12757
|
props: iconProps,
|
|
12754
12758
|
setup(__props) {
|
|
12755
12759
|
const props = __props;
|
|
@@ -12773,7 +12777,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
12773
12777
|
};
|
|
12774
12778
|
}
|
|
12775
12779
|
});
|
|
12776
|
-
var Icon$1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12780
|
+
var Icon$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "icon.vue"]]);
|
|
12777
12781
|
|
|
12778
12782
|
const ElIcon = withInstall(Icon$1);
|
|
12779
12783
|
|
|
@@ -12843,18 +12847,18 @@ const ClickOutside = {
|
|
|
12843
12847
|
}
|
|
12844
12848
|
};
|
|
12845
12849
|
|
|
12846
|
-
const _hoisted_1$
|
|
12847
|
-
const _hoisted_2$
|
|
12848
|
-
const _hoisted_3$
|
|
12849
|
-
const _hoisted_4$
|
|
12850
|
+
const _hoisted_1$3 = ["onClick"];
|
|
12851
|
+
const _hoisted_2$3 = { class: "hzzt-dropdown-name" };
|
|
12852
|
+
const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("span", { class: "caret" }, null, -1);
|
|
12853
|
+
const _hoisted_4$3 = { class: "hzzt-dropdown-menu" };
|
|
12850
12854
|
const _hoisted_5$2 = ["onClick"];
|
|
12851
12855
|
const _hoisted_6$2 = { class: "submenu" };
|
|
12852
12856
|
const _hoisted_7$2 = ["onClick"];
|
|
12853
|
-
const __default__$
|
|
12857
|
+
const __default__$3 = defineComponent({
|
|
12854
12858
|
name: "HzztDropDown"
|
|
12855
12859
|
});
|
|
12856
|
-
const _sfc_main$
|
|
12857
|
-
...__default__$
|
|
12860
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
12861
|
+
...__default__$3,
|
|
12858
12862
|
props: {
|
|
12859
12863
|
options: {
|
|
12860
12864
|
type: Array,
|
|
@@ -12909,9 +12913,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12909
12913
|
createElementVNode("li", {
|
|
12910
12914
|
class: normalizeClass({ "hzzt-dropdown-li": true, "hzzt-dropdown-li-show": toggle.value })
|
|
12911
12915
|
}, [
|
|
12912
|
-
createElementVNode("span", _hoisted_2$
|
|
12913
|
-
_hoisted_3$
|
|
12914
|
-
createElementVNode("ul", _hoisted_4$
|
|
12916
|
+
createElementVNode("span", _hoisted_2$3, toDisplayString(__props.label), 1),
|
|
12917
|
+
_hoisted_3$3,
|
|
12918
|
+
createElementVNode("ul", _hoisted_4$3, [
|
|
12915
12919
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
12916
12920
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
12917
12921
|
unref(isEmpty)(option[__props.props.children]) ? (openBlock(), createElementBlock("li", {
|
|
@@ -12951,31 +12955,31 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
12951
12955
|
}), 256))
|
|
12952
12956
|
])
|
|
12953
12957
|
], 2)
|
|
12954
|
-
], 8, _hoisted_1$
|
|
12958
|
+
], 8, _hoisted_1$3)), [
|
|
12955
12959
|
[unref(ClickOutside), close]
|
|
12956
12960
|
]);
|
|
12957
12961
|
};
|
|
12958
12962
|
}
|
|
12959
12963
|
});
|
|
12960
|
-
var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
12964
|
+
var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "index.vue"]]);
|
|
12961
12965
|
|
|
12962
12966
|
const HzztDropdown = withInstall$1(Dropdown);
|
|
12963
12967
|
|
|
12964
|
-
const _hoisted_1$
|
|
12965
|
-
const _hoisted_2$
|
|
12966
|
-
const _hoisted_3$
|
|
12967
|
-
const _hoisted_4$
|
|
12968
|
+
const _hoisted_1$2 = { class: "hzzt-collapse" };
|
|
12969
|
+
const _hoisted_2$2 = { class: "flex align-items-center" };
|
|
12970
|
+
const _hoisted_3$2 = { class: "hzzt-collapse-title-wrapper" };
|
|
12971
|
+
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
12968
12972
|
const _hoisted_5$1 = { class: "hzzt-collapse-title" };
|
|
12969
12973
|
const _hoisted_6$1 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
12970
12974
|
const _hoisted_7$1 = {
|
|
12971
12975
|
key: 0,
|
|
12972
12976
|
class: "hzzt-collapse-text"
|
|
12973
12977
|
};
|
|
12974
|
-
const __default__$
|
|
12978
|
+
const __default__$2 = defineComponent({
|
|
12975
12979
|
name: "HzztCollapse"
|
|
12976
12980
|
});
|
|
12977
|
-
const _sfc_main$
|
|
12978
|
-
...__default__$
|
|
12981
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
12982
|
+
...__default__$2,
|
|
12979
12983
|
props: {
|
|
12980
12984
|
defaultActive: {
|
|
12981
12985
|
type: Boolean,
|
|
@@ -13002,14 +13006,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
13002
13006
|
active.value = !active.value;
|
|
13003
13007
|
}
|
|
13004
13008
|
return (_ctx, _cache) => {
|
|
13005
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13009
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
13006
13010
|
createElementVNode("div", {
|
|
13007
13011
|
class: "hzzt-collapse-header",
|
|
13008
13012
|
onClick: toggle
|
|
13009
13013
|
}, [
|
|
13010
|
-
createElementVNode("div", _hoisted_2$
|
|
13011
|
-
createElementVNode("div", _hoisted_3$
|
|
13012
|
-
_hoisted_4$
|
|
13014
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
13015
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
13016
|
+
_hoisted_4$2,
|
|
13013
13017
|
createElementVNode("div", _hoisted_5$1, toDisplayString(__props.title), 1)
|
|
13014
13018
|
]),
|
|
13015
13019
|
_hoisted_6$1
|
|
@@ -13022,25 +13026,25 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
13022
13026
|
};
|
|
13023
13027
|
}
|
|
13024
13028
|
});
|
|
13025
|
-
var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
13029
|
+
var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "index.vue"]]);
|
|
13026
13030
|
|
|
13027
13031
|
const HzztCollapse = withInstall$1(Collapse);
|
|
13028
13032
|
|
|
13029
|
-
const _hoisted_1 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
|
|
13030
|
-
const _hoisted_2 = { class: "flex align-items-center" };
|
|
13031
|
-
const _hoisted_3 = { class: "flex" };
|
|
13032
|
-
const _hoisted_4 = ["onClick"];
|
|
13033
|
+
const _hoisted_1$1 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
|
|
13034
|
+
const _hoisted_2$1 = { class: "flex align-items-center" };
|
|
13035
|
+
const _hoisted_3$1 = { class: "flex" };
|
|
13036
|
+
const _hoisted_4$1 = ["onClick"];
|
|
13033
13037
|
const _hoisted_5 = { class: "hzzt-tab-badge" };
|
|
13034
13038
|
const _hoisted_6 = {
|
|
13035
13039
|
key: 0,
|
|
13036
13040
|
class: "hzzt-tab-badge-count"
|
|
13037
13041
|
};
|
|
13038
13042
|
const _hoisted_7 = { class: "flex wrap" };
|
|
13039
|
-
const __default__ = defineComponent({
|
|
13043
|
+
const __default__$1 = defineComponent({
|
|
13040
13044
|
name: "HzztTab"
|
|
13041
13045
|
});
|
|
13042
|
-
const _sfc_main$
|
|
13043
|
-
...__default__,
|
|
13046
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
13047
|
+
...__default__$1,
|
|
13044
13048
|
props: {
|
|
13045
13049
|
tabList: {
|
|
13046
13050
|
type: Array,
|
|
@@ -13069,9 +13073,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
13069
13073
|
emit("tab-click", tab, event);
|
|
13070
13074
|
}
|
|
13071
13075
|
return (_ctx, _cache) => {
|
|
13072
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
13073
|
-
createElementVNode("div", _hoisted_2, [
|
|
13074
|
-
createElementVNode("div", _hoisted_3, [
|
|
13076
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
13077
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
13078
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
13075
13079
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(customTabList), (tab) => {
|
|
13076
13080
|
return openBlock(), createElementBlock("div", {
|
|
13077
13081
|
key: tab.key,
|
|
@@ -13084,7 +13088,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
13084
13088
|
}, toDisplayString(tab.label), 3),
|
|
13085
13089
|
tab.number && tab.number !== 0 ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(tab.number > 999 ? "999+" : tab.number), 1)) : createCommentVNode("v-if", true)
|
|
13086
13090
|
])
|
|
13087
|
-
], 8, _hoisted_4);
|
|
13091
|
+
], 8, _hoisted_4$1);
|
|
13088
13092
|
}), 128))
|
|
13089
13093
|
]),
|
|
13090
13094
|
renderSlot(_ctx.$slots, "filter"),
|
|
@@ -13097,11 +13101,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
13097
13101
|
};
|
|
13098
13102
|
}
|
|
13099
13103
|
});
|
|
13100
|
-
var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
13104
|
+
var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "index.vue"]]);
|
|
13101
13105
|
|
|
13102
13106
|
const HzztTab = withInstall$1(Tab);
|
|
13103
13107
|
|
|
13104
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13108
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
13105
13109
|
__name: "index",
|
|
13106
13110
|
props: {
|
|
13107
13111
|
name: {
|
|
@@ -13127,7 +13131,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13127
13131
|
};
|
|
13128
13132
|
}
|
|
13129
13133
|
});
|
|
13130
|
-
var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__file", "index.vue"]]);
|
|
13134
|
+
var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "index.vue"]]);
|
|
13131
13135
|
|
|
13132
13136
|
const HzztIcon = {
|
|
13133
13137
|
install(app) {
|
|
@@ -13141,13 +13145,76 @@ function tarnsElIconName(name) {
|
|
|
13141
13145
|
return "hzzt-el" + name.replace(/[A-Z]/g, (match) => "-" + match.toLocaleLowerCase());
|
|
13142
13146
|
}
|
|
13143
13147
|
|
|
13148
|
+
const _hoisted_1 = { class: "flex justify-content-between hzzt-pagination" };
|
|
13149
|
+
const _hoisted_2 = { class: "flex align-items-center font-12" };
|
|
13150
|
+
const _hoisted_3 = { class: "flex align-items-center font-14" };
|
|
13151
|
+
const _hoisted_4 = { class: "flex" };
|
|
13152
|
+
const __default__ = defineComponent({
|
|
13153
|
+
name: "HzztPagination"
|
|
13154
|
+
});
|
|
13155
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13156
|
+
...__default__,
|
|
13157
|
+
props: {
|
|
13158
|
+
pagination: {
|
|
13159
|
+
type: Object,
|
|
13160
|
+
default: () => ({
|
|
13161
|
+
total: 0,
|
|
13162
|
+
current_page: 1,
|
|
13163
|
+
total_pages: 1
|
|
13164
|
+
})
|
|
13165
|
+
}
|
|
13166
|
+
},
|
|
13167
|
+
emits: ["prev", "next"],
|
|
13168
|
+
setup(__props, { emit }) {
|
|
13169
|
+
const props = __props;
|
|
13170
|
+
const { t } = useLocale();
|
|
13171
|
+
function prePage() {
|
|
13172
|
+
if (props.pagination.current_page > 1) {
|
|
13173
|
+
emit("prev", props.pagination.current_page - 1);
|
|
13174
|
+
} else {
|
|
13175
|
+
return false;
|
|
13176
|
+
}
|
|
13177
|
+
}
|
|
13178
|
+
function nextPage() {
|
|
13179
|
+
if (props.pagination.current_page < props.pagination.total_pages) {
|
|
13180
|
+
emit("next", props.pagination.current_page + 1);
|
|
13181
|
+
} else {
|
|
13182
|
+
return false;
|
|
13183
|
+
}
|
|
13184
|
+
}
|
|
13185
|
+
return (_ctx, _cache) => {
|
|
13186
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
13187
|
+
createElementVNode("p", _hoisted_2, toDisplayString(unref(t)("hzzt.pagination.total")) + toDisplayString(__props.pagination.total) + toDisplayString(unref(t)("hzzt.pagination.strip")), 1),
|
|
13188
|
+
createElementVNode("div", _hoisted_3, [
|
|
13189
|
+
renderSlot(_ctx.$slots, "right"),
|
|
13190
|
+
createVNode(unref(HzztIcon), {
|
|
13191
|
+
class: normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page > 1 }]),
|
|
13192
|
+
name: "arrow-left",
|
|
13193
|
+
onClick: prePage
|
|
13194
|
+
}, null, 8, ["class"]),
|
|
13195
|
+
createElementVNode("p", _hoisted_4, toDisplayString(__props.pagination.current_page) + "/" + toDisplayString(__props.pagination.total_pages), 1),
|
|
13196
|
+
createVNode(unref(HzztIcon), {
|
|
13197
|
+
class: normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page < __props.pagination.total_pages }]),
|
|
13198
|
+
name: "arrow-right",
|
|
13199
|
+
onClick: nextPage
|
|
13200
|
+
}, null, 8, ["class"])
|
|
13201
|
+
])
|
|
13202
|
+
]);
|
|
13203
|
+
};
|
|
13204
|
+
}
|
|
13205
|
+
});
|
|
13206
|
+
var Pagination = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__file", "index.vue"]]);
|
|
13207
|
+
|
|
13208
|
+
const HzztPagination = withInstall$1(Pagination);
|
|
13209
|
+
|
|
13144
13210
|
var Components = [
|
|
13145
13211
|
HzztConfigProvider,
|
|
13146
13212
|
HzztTitle,
|
|
13147
13213
|
HzztDropdown,
|
|
13148
13214
|
HzztCollapse,
|
|
13149
13215
|
HzztTab,
|
|
13150
|
-
HzztIcon
|
|
13216
|
+
HzztIcon,
|
|
13217
|
+
HzztPagination
|
|
13151
13218
|
];
|
|
13152
13219
|
|
|
13153
13220
|
var Plugins = [];
|
|
@@ -13283,4 +13350,4 @@ function setCssText(el, show, prop, value) {
|
|
|
13283
13350
|
const install = installer.install;
|
|
13284
13351
|
const version = installer.version;
|
|
13285
13352
|
|
|
13286
|
-
export { Blur, Download, Height, Highlight, HzztCollapse, HzztConfigProvider, HzztDropdown, HzztIcon, HzztTab, HzztTitle, INSTALLED_KEY, SIZE_INJECTION_KEY, WEEK_DAYS, buildLocaleContext, buildTranslator, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, datePickTypes, installer as default, install, localeContextKey, makeInstaller, provideGlobalConfig, translate, useGlobalConfig, useGlobalSize, useLocale, useSizeProp, useSizeProps, version };
|
|
13353
|
+
export { Blur, Download, Height, Highlight, HzztCollapse, HzztConfigProvider, HzztDropdown, HzztIcon, HzztPagination, HzztTab, HzztTitle, INSTALLED_KEY, SIZE_INJECTION_KEY, WEEK_DAYS, buildLocaleContext, buildTranslator, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, datePickTypes, installer as default, install, localeContextKey, makeInstaller, provideGlobalConfig, translate, useGlobalConfig, useGlobalSize, useLocale, useSizeProp, useSizeProps, version };
|
package/dist/locale/en.js
CHANGED
package/dist/locale/en.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v0.0.1 */(function(e,
|
|
1
|
+
/*! Hzzt Plus v0.0.1 */(function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.HzztPlusLocaleEn=t())})(this,function(){"use strict";var e={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"total",strip:"strip"}}};return e});
|
|
2
2
|
//# sourceMappingURL=en.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.min.js","sources":["../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n }\n },\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,WAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"en.min.js","sources":["../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n },\n pagination: {\n total: 'total',\n strip: 'strip',\n }\n },\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,WAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;;;;"}
|
package/dist/locale/en.min.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v0.0.1 */var
|
|
1
|
+
/*! Hzzt Plus v0.0.1 */var t={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"total",strip:"strip"}}};export{t as default};
|
|
2
2
|
//# sourceMappingURL=en.min.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.min.mjs","sources":["../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n }\n },\n}\n"],"names":[],"mappings":";;AAAA,SAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"en.min.mjs","sources":["../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n },\n pagination: {\n total: 'total',\n strip: 'strip',\n }\n },\n}\n"],"names":[],"mappings":";;AAAA,SAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;;;;"}
|
package/dist/locale/en.mjs
CHANGED
package/dist/locale/zh-cn.js
CHANGED
package/dist/locale/zh-cn.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v0.0.1 */(function(e,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis!="undefined"?globalThis:e||self,e.HzztPlusLocaleZhCn=n())})(this,function(){"use strict";var e={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"}}};return e});
|
|
1
|
+
/*! Hzzt Plus v0.0.1 */(function(e,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis!="undefined"?globalThis:e||self,e.HzztPlusLocaleZhCn=n())})(this,function(){"use strict";var e={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"}}};return e});
|
|
2
2
|
//# sourceMappingURL=zh-cn.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-cn.min.js","sources":["../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n }\n },\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,aAAc,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"zh-cn.min.js","sources":["../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n },\n pagination: {\n total: '共',\n strip: '条',\n }\n },\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,aAAc,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v0.0.1 */var a={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"}}};export{a as default};
|
|
1
|
+
/*! Hzzt Plus v0.0.1 */var a={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"}}};export{a as default};
|
|
2
2
|
//# sourceMappingURL=zh-cn.min.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-cn.min.mjs","sources":["../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n }\n },\n}\n"],"names":[],"mappings":";;AAAA,WAAc,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"zh-cn.min.mjs","sources":["../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n },\n pagination: {\n total: '共',\n strip: '条',\n }\n },\n}\n"],"names":[],"mappings":";;AAAA,WAAc,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;"}
|
package/dist/locale/zh-cn.mjs
CHANGED
package/es/component.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { HzztCollapse } from './components/collapse/index.mjs';
|
|
|
4
4
|
import { HzztConfigProvider } from './components/config-provider/index.mjs';
|
|
5
5
|
import { HzztTab } from './components/tab/index.mjs';
|
|
6
6
|
import { HzztIcon } from './components/icon/index.mjs';
|
|
7
|
+
import { HzztPagination } from './components/pagination/index.mjs';
|
|
7
8
|
|
|
8
9
|
var Components = [
|
|
9
10
|
HzztConfigProvider,
|
|
@@ -11,7 +12,8 @@ var Components = [
|
|
|
11
12
|
HzztDropdown,
|
|
12
13
|
HzztCollapse,
|
|
13
14
|
HzztTab,
|
|
14
|
-
HzztIcon
|
|
15
|
+
HzztIcon,
|
|
16
|
+
HzztPagination
|
|
15
17
|
];
|
|
16
18
|
|
|
17
19
|
export { Components as default };
|
package/es/component.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.mjs","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {HzztTitle} from '@hzzt-plus/components/title'\nimport {HzztDropdown} from '@hzzt-plus/components/dropdown'\nimport {HzztCollapse} from '@hzzt-plus/components/collapse'\nimport {HzztConfigProvider} from '@hzzt-plus/components/config-provider'\nimport {HzztTab} from '@hzzt-plus/components/tab'\nimport {HzztIcon} from '@hzzt-plus/components/icon'\n\nimport type {Plugin} from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n] as Plugin[]\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.mjs","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {HzztTitle} from '@hzzt-plus/components/title'\nimport {HzztDropdown} from '@hzzt-plus/components/dropdown'\nimport {HzztCollapse} from '@hzzt-plus/components/collapse'\nimport {HzztConfigProvider} from '@hzzt-plus/components/config-provider'\nimport {HzztTab} from '@hzzt-plus/components/tab'\nimport {HzztIcon} from '@hzzt-plus/components/icon'\nimport {HzztPagination} from '@hzzt-plus/components/pagination'\n\nimport type {Plugin} from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n] as Plugin[]\n"],"names":[],"mappings":";;;;;;;;AAOA,iBAAe;AACf,EAAE,kBAAkB;AACpB,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,YAAY;AACd,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,cAAc;AAChB,CAAC;;;;"}
|
package/es/components/index.d.ts
CHANGED
package/es/components/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ export { HzztCollapse } from './collapse/index.mjs';
|
|
|
4
4
|
export { HzztConfigProvider } from './config-provider/index.mjs';
|
|
5
5
|
export { HzztTab } from './tab/index.mjs';
|
|
6
6
|
export { HzztIcon } from './icon/index.mjs';
|
|
7
|
+
export { HzztPagination } from './pagination/index.mjs';
|
|
7
8
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
|
8
9
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
|
9
10
|
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":";;;;;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const HzztPagination: import("hzzt-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
pagination: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
total: number;
|
|
6
|
+
current_page: number;
|
|
7
|
+
total_pages: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
pagination: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: () => {
|
|
15
|
+
total: number;
|
|
16
|
+
current_page: number;
|
|
17
|
+
total_pages: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>>;
|
|
24
|
+
emit: (event: "prev" | "next", ...args: any[]) => void;
|
|
25
|
+
t: import("../..").Translator;
|
|
26
|
+
prePage: () => false | undefined;
|
|
27
|
+
nextPage: () => false | undefined;
|
|
28
|
+
HzztIcon: {
|
|
29
|
+
install(app: import("vue").App<any>): void;
|
|
30
|
+
};
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("prev" | "next")[], "prev" | "next", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
pagination: {
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
default: () => {
|
|
35
|
+
total: number;
|
|
36
|
+
current_page: number;
|
|
37
|
+
total_pages: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}>> & {
|
|
41
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
pagination: Record<string, any>;
|
|
45
|
+
}>> & Record<string, any>;
|
|
46
|
+
export default HzztPagination;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '../../utils/index.mjs';
|
|
2
|
+
import Pagination from './src/index.mjs';
|
|
3
|
+
import { withInstall } from '../../utils/vue/install.mjs';
|
|
4
|
+
|
|
5
|
+
const HzztPagination = withInstall(Pagination);
|
|
6
|
+
|
|
7
|
+
export { HzztPagination, HzztPagination as default };
|
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/pagination/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\n\nimport Pagination from './src/index.vue';\n\nexport const HzztPagination = withInstall(Pagination);\nexport default HzztPagination\n"],"names":[],"mappings":";;;;AAEY,MAAC,cAAc,GAAG,WAAW,CAAC,UAAU;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, renderSlot, createVNode, normalizeClass } from 'vue';
|
|
2
|
+
import { HzztIcon } from '../../icon/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { class: "flex justify-content-between hzzt-pagination" };
|
|
8
|
+
const _hoisted_2 = { class: "flex align-items-center font-12" };
|
|
9
|
+
const _hoisted_3 = { class: "flex align-items-center font-14" };
|
|
10
|
+
const _hoisted_4 = { class: "flex" };
|
|
11
|
+
const __default__ = defineComponent({
|
|
12
|
+
name: "HzztPagination"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: {
|
|
17
|
+
pagination: {
|
|
18
|
+
type: Object,
|
|
19
|
+
default: () => ({
|
|
20
|
+
total: 0,
|
|
21
|
+
current_page: 1,
|
|
22
|
+
total_pages: 1
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["prev", "next"],
|
|
27
|
+
setup(__props, { emit }) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const { t } = useLocale();
|
|
30
|
+
function prePage() {
|
|
31
|
+
if (props.pagination.current_page > 1) {
|
|
32
|
+
emit("prev", props.pagination.current_page - 1);
|
|
33
|
+
} else {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function nextPage() {
|
|
38
|
+
if (props.pagination.current_page < props.pagination.total_pages) {
|
|
39
|
+
emit("next", props.pagination.current_page + 1);
|
|
40
|
+
} else {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
46
|
+
createElementVNode("p", _hoisted_2, toDisplayString(unref(t)("hzzt.pagination.total")) + toDisplayString(__props.pagination.total) + toDisplayString(unref(t)("hzzt.pagination.strip")), 1),
|
|
47
|
+
createElementVNode("div", _hoisted_3, [
|
|
48
|
+
renderSlot(_ctx.$slots, "right"),
|
|
49
|
+
createVNode(unref(HzztIcon), {
|
|
50
|
+
class: normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page > 1 }]),
|
|
51
|
+
name: "arrow-left",
|
|
52
|
+
onClick: prePage
|
|
53
|
+
}, null, 8, ["class"]),
|
|
54
|
+
createElementVNode("p", _hoisted_4, toDisplayString(__props.pagination.current_page) + "/" + toDisplayString(__props.pagination.total_pages), 1),
|
|
55
|
+
createVNode(unref(HzztIcon), {
|
|
56
|
+
class: normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page < __props.pagination.total_pages }]),
|
|
57
|
+
name: "arrow-right",
|
|
58
|
+
onClick: nextPage
|
|
59
|
+
}, null, 8, ["class"])
|
|
60
|
+
])
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "index.vue"]]);
|
|
66
|
+
|
|
67
|
+
export { Pagination as default };
|
|
68
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/pagination/src/index.vue"],"sourcesContent":["<template>\n <div class=\"flex justify-content-between hzzt-pagination\">\n <p class=\"flex align-items-center font-12\">\n {{ t('hzzt.pagination.total') }}{{ pagination.total }}{{ t('hzzt.pagination.strip') }}\n </p>\n <div class=\"flex align-items-center font-14\">\n <slot name=\"right\" />\n <hzzt-icon class=\"hzzt-pagination-arrow\" :class=\"{ active: pagination.current_page > 1 }\" name=\"arrow-left\"\n @click=\"prePage\" />\n <p class=\"flex\">\n {{ pagination.current_page }}/{{ pagination.total_pages }}\n </p>\n <hzzt-icon\n class=\"hzzt-pagination-arrow\"\n :class=\"{ active: pagination.current_page < pagination.total_pages }\"\n name=\"arrow-right\"\n @click=\"nextPage\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n\n import {HzztIcon} from '@hzzt-plus/components/icon'\n import {useLocale} from '@hzzt-plus/hooks'\n\n defineOptions({\n name: 'HzztPagination',\n });\n\n const props = defineProps({\n pagination: {\n type: Object,\n default: () => ({\n total: 0,\n current_page: 1,\n total_pages: 1,\n }),\n },\n });\n\n const emit = defineEmits(['prev', 'next']);\n const {t} = useLocale();\n\n function prePage() {\n if (props.pagination.current_page > 1) {\n emit('prev', props.pagination.current_page - 1);\n } else {\n return false;\n }\n }\n\n function nextPage() {\n if (props.pagination.current_page < props.pagination.total_pages) {\n emit('next', props.pagination.current_page + 1);\n } else {\n return false;\n }\n }\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCA2BgB,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;AAcA,IAAM,MAAA,EAAC,MAAK,SAAU,EAAA,CAAA;AAEtB,IAAmB,SAAA,OAAA,GAAA;AACjB,MAAI,IAAA,KAAA,CAAM,UAAW,CAAA,YAAA,GAAe,CAAG,EAAA;AACrC,QAAA,IAAA,CAAK,MAAQ,EAAA,KAAA,CAAM,UAAW,CAAA,YAAA,GAAe,CAAC,CAAA,CAAA;AAAA,OACzC,MAAA;AACL,QAAO,OAAA,KAAA,CAAA;AAAA,OACT;AAAA,KACF;AAEA,IAAoB,SAAA,QAAA,GAAA;AAClB,MAAA,IAAI,KAAM,CAAA,UAAA,CAAW,YAAe,GAAA,KAAA,CAAM,WAAW,WAAa,EAAA;AAChE,QAAA,IAAA,CAAK,MAAQ,EAAA,KAAA,CAAM,UAAW,CAAA,YAAA,GAAe,CAAC,CAAA,CAAA;AAAA,OACzC,MAAA;AACL,QAAO,OAAA,KAAA,CAAA;AAAA,OACT;AAAA,KACF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|