@nutui/nutui 3.1.22-beta.5 → 3.1.23-beta.1
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/CHANGELOG.md +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +20412 -4214
- package/dist/nutui.umd.js +20518 -4216
- package/dist/packages/_es/ActionSheet.js +149 -17
- package/dist/packages/_es/Address.js +535 -110
- package/dist/packages/_es/AddressList.js +615 -113
- package/dist/packages/_es/Animate.js +59 -17
- package/dist/packages/_es/Audio.js +257 -53
- package/dist/packages/_es/AudioOperate.js +100 -13
- package/dist/packages/_es/Avatar.js +162 -38
- package/dist/packages/_es/AvatarGroup.js +73 -14
- package/dist/packages/_es/BackTop.js +156 -43
- package/dist/packages/_es/Badge.js +86 -14
- package/dist/packages/_es/Barrage.js +120 -41
- package/dist/packages/_es/Button.js +128 -23
- package/dist/packages/_es/Calendar.js +246 -30
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +107 -10
- package/dist/packages/_es/Cascader.js +496 -147
- package/dist/packages/_es/Category.js +58 -15
- package/dist/packages/_es/CategoryPane.js +111 -11
- package/dist/packages/_es/Cell.js +108 -21
- package/dist/packages/_es/CellGroup.js +44 -9
- package/dist/packages/_es/Checkbox.js +134 -29
- package/dist/packages/_es/CheckboxGroup.js +79 -29
- package/dist/packages/_es/CircleProgress.js +150 -28
- package/dist/packages/_es/Col.js +56 -14
- package/dist/packages/_es/Collapse.js +109 -32
- package/dist/packages/_es/CollapseItem.js +253 -59
- package/dist/packages/_es/Comment.js +434 -64
- package/dist/packages/_es/ConfigProvider.js +20 -8
- package/dist/packages/_es/CountDown.js +238 -56
- package/dist/packages/_es/CountUp.js +539 -140
- package/dist/packages/_es/DatePicker.js +315 -98
- package/dist/packages/_es/Dialog.js +289 -60
- package/dist/packages/_es/Divider.js +65 -13
- package/dist/packages/_es/Drag.js +197 -56
- package/dist/packages/_es/Ecard.js +159 -24
- package/dist/packages/_es/Elevator.js +255 -58
- package/dist/packages/_es/Ellipsis.js +200 -58
- package/dist/packages/_es/Empty.js +71 -12
- package/dist/packages/_es/FixedNav.js +122 -15
- package/dist/packages/_es/Form.js +151 -64
- package/dist/packages/_es/FormItem.js +114 -15
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +144 -33
- package/dist/packages/_es/Icon.js +40 -15
- package/dist/packages/_es/Image.js +137 -26
- package/dist/packages/_es/ImagePreview.js +547 -76
- package/dist/packages/_es/Indicator.js +62 -15
- package/dist/packages/_es/InfiniteLoading.js +249 -57
- package/dist/packages/_es/Input.js +433 -51
- package/dist/packages/_es/InputNumber.js +160 -41
- package/dist/packages/_es/Layout.js +5 -4
- package/dist/packages/_es/List.js +106 -18
- package/dist/packages/_es/Menu.js +168 -44
- package/dist/packages/_es/MenuItem.js +173 -37
- package/dist/packages/_es/Navbar.js +192 -30
- package/dist/packages/_es/NoticeBar.js +380 -74
- package/dist/packages/_es/Notify.js +227 -72
- package/dist/packages/_es/NumberKeyboard.js +272 -41
- package/dist/packages/_es/OldPicker.js +457 -130
- package/dist/packages/_es/OverLay.js +98 -24
- package/dist/packages/_es/Pagination.js +157 -39
- package/dist/packages/_es/Picker.js +454 -129
- package/dist/packages/_es/Popover.js +957 -318
- package/dist/packages/_es/Popup.js +299 -55
- package/dist/packages/_es/Price.js +118 -16
- package/dist/packages/_es/Progress.js +146 -14
- package/dist/packages/_es/PullRefresh.js +339 -84
- package/dist/packages/_es/Radio.js +90 -22
- package/dist/packages/_es/RadioGroup.js +37 -8
- package/dist/packages/_es/Range.js +408 -83
- package/dist/packages/_es/Rate.js +192 -36
- package/dist/packages/_es/Row.js +64 -22
- package/dist/packages/_es/SearchBar.js +238 -37
- package/dist/packages/_es/ShortPassword.js +225 -35
- package/dist/packages/_es/SideNavBar.js +81 -24
- package/dist/packages/_es/SideNavBarItem.js +46 -11
- package/dist/packages/_es/Signature.js +160 -41
- package/dist/packages/_es/Skeleton.js +136 -20
- package/dist/packages/_es/Sku.js +491 -84
- package/dist/packages/_es/Step.js +115 -20
- package/dist/packages/_es/Steps.js +53 -18
- package/dist/packages/_es/Sticky.js +138 -53
- package/dist/packages/_es/SubSideNavBar.js +82 -17
- package/dist/packages/_es/Swipe.js +178 -41
- package/dist/packages/_es/Swiper.js +433 -121
- package/dist/packages/_es/SwiperItem.js +53 -22
- package/dist/packages/_es/Switch.js +116 -21
- package/dist/packages/_es/TabPane.js +39 -12
- package/dist/packages/_es/Tabbar.js +72 -17
- package/dist/packages/_es/TabbarItem.js +151 -29
- package/dist/packages/_es/Table.js +178 -18
- package/dist/packages/_es/Tabs.js +202 -43
- package/dist/packages/_es/Tag.js +97 -20
- package/dist/packages/_es/TextArea.js +160 -42
- package/dist/packages/_es/TimeDetail.js +79 -18
- package/dist/packages/_es/TimePannel.js +48 -14
- package/dist/packages/_es/TimeSelect.js +112 -15
- package/dist/packages/_es/Toast.js +310 -71
- package/dist/packages/_es/Uploader.js +455 -104
- package/dist/packages/_es/Video.js +332 -74
- package/dist/packages/_es/common.js +128 -38
- package/dist/packages/_es/component.js +76 -35
- package/dist/packages/_es/index.js +6 -5
- package/dist/packages/_es/index2.js +30 -9
- package/dist/packages/_es/index3.js +8 -6
- package/dist/packages/_es/index4.js +64 -13
- package/dist/packages/_es/index5.js +780 -164
- package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
- package/dist/packages/_es/pxCheck.js +5 -3
- package/dist/packages/_es/raf.js +15 -8
- package/dist/packages/imagepreview/index.scss +6 -1
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.js +105 -5
- package/dist/packages/locale/lang/id-ID.js +105 -5
- package/dist/packages/locale/lang/index.js +38 -16
- package/dist/packages/locale/lang/zh-CN.js +105 -5
- package/dist/packages/locale/lang/zh-TW.js +105 -5
- package/dist/packages/picker/index.scss +13 -0
- package/dist/smartips/attributes.json +8 -0
- package/dist/smartips/tags.json +3 -1
- package/dist/smartips/web-types.json +19 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +4 -1
- package/dist/styles/variables-jdt.scss +4 -1
- package/dist/styles/variables.scss +1 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +23 -25
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +4 -4
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -2
|
@@ -1,30 +1,104 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { computed, watch, onDeactivated, onBeforeUnmount, onMounted, onActivated, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const { componentName, create } = createComponent("overlay");
|
|
11
|
+
const overlayProps = {
|
|
12
|
+
visible: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
zIndex: {
|
|
17
|
+
type: [Number, String],
|
|
18
|
+
default: 2e3
|
|
19
|
+
},
|
|
20
|
+
duration: {
|
|
21
|
+
type: [Number, String],
|
|
22
|
+
default: 0.3
|
|
23
|
+
},
|
|
24
|
+
overlayClass: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
lockScroll: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
overlayStyle: {
|
|
33
|
+
type: Object
|
|
34
|
+
},
|
|
35
|
+
closeOnClickOverlay: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: true
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const _sfc_main = create({
|
|
41
|
+
props: overlayProps,
|
|
42
|
+
emits: ["click", "update:visible"],
|
|
43
|
+
setup(props, { emit }) {
|
|
44
|
+
const classes = computed(() => {
|
|
45
|
+
const prefixCls = componentName;
|
|
46
|
+
return {
|
|
47
|
+
[prefixCls]: true,
|
|
48
|
+
[props.overlayClass]: true
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
watch(() => props.visible, (value) => {
|
|
52
|
+
value ? lock() : unlock();
|
|
53
|
+
});
|
|
54
|
+
const lock = () => {
|
|
55
|
+
if (props.lockScroll && props.visible) {
|
|
56
|
+
document.body.classList.add("nut-overflow-hidden");
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const unlock = () => {
|
|
60
|
+
document.body.classList.remove("nut-overflow-hidden");
|
|
61
|
+
};
|
|
62
|
+
onDeactivated(unlock);
|
|
63
|
+
onBeforeUnmount(unlock);
|
|
64
|
+
onMounted(lock);
|
|
65
|
+
onActivated(lock);
|
|
66
|
+
const style = computed(() => {
|
|
67
|
+
return {
|
|
68
|
+
animationDuration: `${props.duration}s`,
|
|
69
|
+
zIndex: props.zIndex,
|
|
70
|
+
...props.overlayStyle
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
const touchmove = (e) => {
|
|
74
|
+
if (props.lockScroll)
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
};
|
|
77
|
+
const onClick = (e) => {
|
|
78
|
+
emit("click", e);
|
|
79
|
+
if (props.closeOnClickOverlay) {
|
|
80
|
+
emit("update:visible", false);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return { classes, style, touchmove, onClick };
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
87
|
+
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
88
|
+
default: withCtx(() => [
|
|
89
|
+
withDirectives(createElementVNode("view", {
|
|
90
|
+
class: normalizeClass(_ctx.classes),
|
|
91
|
+
onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.touchmove && _ctx.touchmove(...args), ["stop"])),
|
|
92
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
93
|
+
style: normalizeStyle(_ctx.style)
|
|
94
|
+
}, [
|
|
95
|
+
renderSlot(_ctx.$slots, "default")
|
|
96
|
+
], 38), [
|
|
97
|
+
[vShow, _ctx.visible]
|
|
98
|
+
])
|
|
99
|
+
]),
|
|
100
|
+
_: 3
|
|
15
101
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
document.body.classList.remove("nut-overflow-hidden");
|
|
20
|
-
};
|
|
21
|
-
l(u2), t(u2), a(c2), s(c2);
|
|
22
|
-
return { classes: i2, style: e(() => ({ animationDuration: `${n2.duration}s`, zIndex: n2.zIndex, ...n2.overlayStyle })), touchmove: (e2) => {
|
|
23
|
-
n2.lockScroll && e2.preventDefault();
|
|
24
|
-
}, onClick: (e2) => {
|
|
25
|
-
r2("click", e2), n2.closeOnClickOverlay && r2("update:visible", false);
|
|
26
|
-
} };
|
|
27
|
-
} }), [["render", function(e2, o2, l2, t2, a2, s2) {
|
|
28
|
-
return n(), r(i, { name: "overlay-fade" }, { default: c(() => [u(d("view", { class: v(e2.classes), onTouchmove: o2[0] || (o2[0] = p((...o3) => e2.touchmove && e2.touchmove(...o3), ["stop"])), onClick: o2[1] || (o2[1] = (...o3) => e2.onClick && e2.onClick(...o3)), style: m(e2.style) }, [y(e2.$slots, "default")], 38), [[f, e2.visible]])]), _: 3 });
|
|
29
|
-
}]]);
|
|
30
|
-
export { g as default, h as overlayProps };
|
|
102
|
+
}
|
|
103
|
+
var overlay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
104
|
+
export { overlay as default, overlayProps };
|
|
@@ -1,47 +1,165 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { toRefs
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { toRefs, computed, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
const { componentName, create, translate } = createComponent("pagination");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 1
|
|
16
|
+
},
|
|
17
|
+
mode: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "multi"
|
|
20
|
+
},
|
|
21
|
+
prevText: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
nextText: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
pageCount: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
totalItems: {
|
|
34
|
+
type: [String, Number],
|
|
35
|
+
default: "0"
|
|
36
|
+
},
|
|
37
|
+
itemsPerPage: {
|
|
38
|
+
type: [String, Number],
|
|
39
|
+
default: "10"
|
|
40
|
+
},
|
|
41
|
+
showPageSize: {
|
|
42
|
+
type: [String, Number],
|
|
43
|
+
default: "5"
|
|
44
|
+
},
|
|
45
|
+
forceEllipses: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
27
48
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
49
|
+
},
|
|
50
|
+
components: {},
|
|
51
|
+
emits: ["change", "update:modelValue"],
|
|
52
|
+
setup(props, { emit }) {
|
|
53
|
+
const { modelValue, mode, showPageSize, forceEllipses } = toRefs(props);
|
|
54
|
+
const countRef = computed(() => {
|
|
55
|
+
const { pageCount, totalItems, itemsPerPage } = toRefs(props);
|
|
56
|
+
const num = +pageCount.value || Math.ceil(+totalItems.value / +itemsPerPage.value);
|
|
57
|
+
return Math.max(1, num);
|
|
58
|
+
});
|
|
59
|
+
const select = (curPage, isSelect) => {
|
|
60
|
+
if (curPage > countRef.value || curPage < 1)
|
|
61
|
+
return;
|
|
62
|
+
if (curPage != modelValue.value)
|
|
63
|
+
emit("update:modelValue", curPage);
|
|
64
|
+
if (isSelect)
|
|
65
|
+
emit("change", curPage);
|
|
66
|
+
};
|
|
67
|
+
const setPage = (number, text, active) => {
|
|
68
|
+
return { number, text, active };
|
|
69
|
+
};
|
|
70
|
+
const pages = computed(() => {
|
|
71
|
+
if (mode.value == "simple")
|
|
72
|
+
return;
|
|
73
|
+
let items = [];
|
|
74
|
+
const pageCount = countRef.value;
|
|
75
|
+
const pageSize = showPageSize.value;
|
|
76
|
+
let startPage = 1;
|
|
77
|
+
let endPage = pageCount;
|
|
78
|
+
const partialShow = pageCount > pageSize;
|
|
79
|
+
if (partialShow) {
|
|
80
|
+
startPage = Math.max(modelValue.value - Math.floor(pageSize / 2), 1);
|
|
81
|
+
endPage = startPage + pageSize - 1;
|
|
82
|
+
if (endPage > pageCount) {
|
|
83
|
+
endPage = pageCount;
|
|
84
|
+
startPage = endPage - pageSize + 1;
|
|
85
|
+
}
|
|
32
86
|
}
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
87
|
+
for (var i = startPage; i <= endPage; i++) {
|
|
88
|
+
const page = setPage(i, i, modelValue.value == i);
|
|
89
|
+
items.push(page);
|
|
36
90
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
91
|
+
if (partialShow && pageSize > 0 && forceEllipses.value) {
|
|
92
|
+
if (startPage > 1) {
|
|
93
|
+
const prevPage = setPage(startPage - 1, "...");
|
|
94
|
+
items.unshift(prevPage);
|
|
95
|
+
}
|
|
96
|
+
if (endPage < pageCount) {
|
|
97
|
+
const nextPage = setPage(endPage + 1, "...");
|
|
98
|
+
items.push(nextPage);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return items;
|
|
102
|
+
});
|
|
103
|
+
watchEffect(() => {
|
|
104
|
+
select(modelValue.value, false);
|
|
105
|
+
});
|
|
106
|
+
return {
|
|
107
|
+
modelValue,
|
|
108
|
+
select,
|
|
109
|
+
countRef,
|
|
110
|
+
mode,
|
|
111
|
+
pages,
|
|
112
|
+
forceEllipses,
|
|
113
|
+
translate
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
const _hoisted_1 = { class: "nut-pagination" };
|
|
118
|
+
const _hoisted_2 = {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "nut-pagination-contain"
|
|
121
|
+
};
|
|
122
|
+
const _hoisted_3 = ["onClick"];
|
|
123
|
+
const _hoisted_4 = {
|
|
124
|
+
key: 1,
|
|
125
|
+
class: "nut-pagination-contain"
|
|
126
|
+
};
|
|
127
|
+
const _hoisted_5 = { class: "nut-pagination-simple" };
|
|
128
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
129
|
+
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
130
|
+
createElementVNode("view", {
|
|
131
|
+
class: normalizeClass(["nut-pagination-prev", _ctx.mode == "multi" ? "" : "simple-border", _ctx.modelValue == 1 ? "disabled" : ""]),
|
|
132
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.select(_ctx.modelValue - 1, true))
|
|
133
|
+
}, [
|
|
134
|
+
renderSlot(_ctx.$slots, "prev-text", {}, () => [
|
|
135
|
+
createTextVNode(toDisplayString(_ctx.prevText || _ctx.translate("prev")), 1)
|
|
136
|
+
])
|
|
137
|
+
], 2),
|
|
138
|
+
_ctx.mode == "multi" ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
139
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item, index2) => {
|
|
140
|
+
return openBlock(), createElementBlock("view", {
|
|
141
|
+
key: index2 + "pagination",
|
|
142
|
+
class: normalizeClass(["nut-pagination-item", item.active ? "active" : ""]),
|
|
143
|
+
onClick: ($event) => _ctx.select(item.number, true)
|
|
144
|
+
}, [
|
|
145
|
+
renderSlot(_ctx.$slots, "page", { item }, () => [
|
|
146
|
+
createTextVNode(toDisplayString(item.text), 1)
|
|
147
|
+
])
|
|
148
|
+
], 10, _hoisted_3);
|
|
149
|
+
}), 128))
|
|
150
|
+
])) : createCommentVNode("", true),
|
|
151
|
+
_ctx.mode == "simple" ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
152
|
+
createElementVNode("view", _hoisted_5, toDisplayString(_ctx.modelValue) + "/" + toDisplayString(_ctx.countRef), 1)
|
|
153
|
+
])) : createCommentVNode("", true),
|
|
154
|
+
createElementVNode("view", {
|
|
155
|
+
class: normalizeClass(["nut-pagination-next", _ctx.modelValue >= _ctx.countRef ? "disabled" : ""]),
|
|
156
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.select(_ctx.modelValue + 1, true))
|
|
157
|
+
}, [
|
|
158
|
+
renderSlot(_ctx.$slots, "next-text", {}, () => [
|
|
159
|
+
createTextVNode(toDisplayString(_ctx.nextText || _ctx.translate("next")), 1)
|
|
160
|
+
])
|
|
161
|
+
], 2)
|
|
162
|
+
]);
|
|
163
|
+
}
|
|
164
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
165
|
+
export { index as default };
|