@nutui/nutui 3.1.12-beta.0 → 3.1.12-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/dist/nutui.d.ts +4 -1
- package/dist/nutui.es.js +3943 -4130
- package/dist/nutui.umd.js +3947 -4201
- package/dist/packages/_es/ActionSheet.js +13 -12
- package/dist/packages/_es/Address.js +63 -49
- package/dist/packages/_es/Avatar.js +4 -5
- package/dist/packages/_es/BackTop.js +72 -109
- package/dist/packages/_es/Badge.js +4 -5
- package/dist/packages/_es/Barrage.js +63 -57
- package/dist/packages/_es/Button.js +5 -6
- package/dist/packages/_es/Calendar.js +27 -18
- package/dist/packages/_es/Card.js +104 -0
- package/dist/packages/_es/Cell.js +5 -13
- package/dist/packages/_es/CellGroup.js +4 -5
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +9 -4
- package/dist/packages/_es/CircleProgress.js +142 -46
- package/dist/packages/_es/Col.js +4 -5
- package/dist/packages/_es/Collapse.js +35 -10
- package/dist/packages/_es/CollapseItem.js +80 -35
- package/dist/packages/_es/CountDown.js +7 -5
- package/dist/packages/_es/CountUp.js +34 -31
- package/dist/packages/_es/DatePicker.js +451 -219
- package/dist/packages/_es/Dialog.js +24 -89
- package/dist/packages/_es/Divider.js +5 -6
- package/dist/packages/_es/Drag.js +76 -50
- package/dist/packages/_es/Elevator.js +81 -52
- package/dist/packages/_es/FixedNav.js +8 -9
- package/dist/packages/_es/Form.js +137 -0
- package/dist/packages/_es/FormItem.js +109 -0
- package/dist/packages/_es/Icon.js +6 -40
- package/dist/packages/_es/ImagePreview.js +23 -21
- package/dist/packages/_es/InfiniteLoading.js +95 -109
- package/dist/packages/_es/Input.js +22 -21
- package/dist/packages/_es/InputNumber.js +24 -18
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +16 -14
- package/dist/packages/_es/MenuItem.js +9 -11
- package/dist/packages/_es/Navbar.js +7 -7
- package/dist/packages/_es/NoticeBar.js +39 -26
- package/dist/packages/_es/Notify.js +30 -166
- package/dist/packages/_es/NumberKeyboard.js +10 -6
- package/dist/packages/_es/OverLay.js +22 -29
- package/dist/packages/_es/Pagination.js +8 -9
- package/dist/packages/_es/Picker.js +61 -447
- package/dist/packages/_es/Popover.js +146 -25
- package/dist/packages/_es/Popup.js +17 -77
- package/dist/packages/_es/Price.js +18 -7
- package/dist/packages/_es/Progress.js +23 -12
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +37 -30
- package/dist/packages/_es/Rate.js +16 -20
- package/dist/packages/_es/Row.js +4 -5
- package/dist/packages/_es/SearchBar.js +7 -5
- package/dist/packages/_es/ShortPassword.js +89 -59
- package/dist/packages/_es/Signature.js +70 -71
- package/dist/packages/_es/Sku.js +54 -79
- package/dist/packages/_es/Step.js +10 -8
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +42 -27
- package/dist/packages/_es/Swiper.js +17 -418
- package/dist/packages/_es/SwiperItem.js +14 -39
- package/dist/packages/_es/Switch.js +4 -5
- package/dist/packages/_es/TabPane.js +4 -5
- package/dist/packages/_es/Tabbar.js +4 -5
- package/dist/packages/_es/TabbarItem.js +8 -9
- package/dist/packages/_es/Tabs.js +22 -16
- package/dist/packages/_es/Tag.js +5 -6
- package/dist/packages/_es/TextArea.js +16 -12
- package/dist/packages/_es/TimeDetail.js +7 -5
- package/dist/packages/_es/TimePannel.js +7 -5
- package/dist/packages/_es/TimeSelect.js +12 -7
- package/dist/packages/_es/Toast.js +41 -163
- package/dist/packages/_es/Uploader.js +109 -149
- package/dist/packages/_es/commonProps.js +30 -0
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +44 -0
- package/dist/packages/_es/index2.js +40 -27
- package/dist/packages/_es/index3.js +413 -7
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/_es/util.js +47 -0
- package/dist/packages/button/index.scss +6 -0
- package/dist/packages/card/index.scss +97 -0
- package/dist/packages/checkbox/index.scss +1 -1
- package/dist/packages/form/index.scss +2 -0
- package/dist/packages/formitem/index.scss +60 -0
- package/dist/packages/numberkeyboard/index.scss +1 -1
- package/dist/packages/switch/index.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -2
- package/dist/styles/themes/default.scss +35 -32
- package/dist/styles/variables.scss +11 -1
- package/package.json +2 -2
- package/dist/packages/_es/Video.js +0 -405
- package/dist/packages/_es/plugin-vue_export-helper.js +0 -13
|
@@ -1,38 +1,19 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2021 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import {
|
|
6
|
+
import { watch, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, vShow } from "vue";
|
|
26
7
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
8
|
+
import _sfc_main$1 from "./Popup.js";
|
|
9
|
+
import "./use-lock-scroll.js";
|
|
29
10
|
import "./OverLay.js";
|
|
30
|
-
import "./
|
|
11
|
+
import "./index.taro.vue_vue&type=script&lang.js";
|
|
31
12
|
import "./pxCheck.js";
|
|
32
13
|
const { componentName, create } = createComponent("notify");
|
|
33
|
-
|
|
14
|
+
var _sfc_main = create({
|
|
34
15
|
components: {
|
|
35
|
-
[
|
|
16
|
+
[_sfc_main$1.name]: _sfc_main$1
|
|
36
17
|
},
|
|
37
18
|
props: {
|
|
38
19
|
id: String,
|
|
@@ -48,24 +29,16 @@ const _sfc_main = create({
|
|
|
48
29
|
type: String,
|
|
49
30
|
default: "danger"
|
|
50
31
|
},
|
|
51
|
-
|
|
32
|
+
visible: {
|
|
52
33
|
type: Boolean,
|
|
53
34
|
default: false
|
|
54
|
-
}
|
|
55
|
-
onClose: Function,
|
|
56
|
-
onClick: Function,
|
|
57
|
-
unmount: Function
|
|
35
|
+
}
|
|
58
36
|
},
|
|
59
|
-
|
|
37
|
+
emits: ["update:visible", "closed", "click"],
|
|
38
|
+
setup(props, { emit }) {
|
|
60
39
|
let timer = null;
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
});
|
|
64
|
-
onMounted(() => {
|
|
65
|
-
state.mounted = true;
|
|
66
|
-
});
|
|
67
|
-
const clickCover = () => {
|
|
68
|
-
props.onClick && props.onClick();
|
|
40
|
+
const onClick = () => {
|
|
41
|
+
emit("click");
|
|
69
42
|
};
|
|
70
43
|
const clearTimer = () => {
|
|
71
44
|
if (timer) {
|
|
@@ -74,8 +47,14 @@ const _sfc_main = create({
|
|
|
74
47
|
}
|
|
75
48
|
};
|
|
76
49
|
const hide = () => {
|
|
77
|
-
|
|
50
|
+
emit("update:visible", false);
|
|
51
|
+
emit("closed");
|
|
78
52
|
};
|
|
53
|
+
watch(() => props.visible, (value) => {
|
|
54
|
+
if (value) {
|
|
55
|
+
show();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
79
58
|
const show = () => {
|
|
80
59
|
clearTimer();
|
|
81
60
|
if (props.duration) {
|
|
@@ -84,150 +63,35 @@ const _sfc_main = create({
|
|
|
84
63
|
}, props.duration);
|
|
85
64
|
}
|
|
86
65
|
};
|
|
87
|
-
if (props.duration) {
|
|
88
|
-
show();
|
|
89
|
-
}
|
|
90
|
-
watch(() => props.duration, (val) => {
|
|
91
|
-
if (val) {
|
|
92
|
-
show();
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
66
|
const onAfterLeave = () => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
67
|
+
if (props.visible) {
|
|
68
|
+
clearTimer();
|
|
69
|
+
hide();
|
|
70
|
+
}
|
|
99
71
|
};
|
|
100
|
-
return {
|
|
72
|
+
return { hide, onAfterLeave, onClick };
|
|
101
73
|
}
|
|
102
74
|
});
|
|
103
75
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
104
76
|
return openBlock(), createBlock(Transition, {
|
|
105
|
-
name: "
|
|
77
|
+
name: "nut-fade",
|
|
106
78
|
onAfterLeave: _ctx.onAfterLeave
|
|
107
79
|
}, {
|
|
108
80
|
default: withCtx(() => [
|
|
109
81
|
withDirectives(createElementVNode("view", {
|
|
110
82
|
class: normalizeClass(["popup-top", "nut-notify", `nut-notify--${_ctx.type}`, { className: _ctx.className }]),
|
|
111
83
|
style: normalizeStyle({ color: _ctx.color, background: _ctx.background }),
|
|
112
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.
|
|
84
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
113
85
|
}, [
|
|
114
86
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
115
87
|
createTextVNode(toDisplayString(_ctx.msg), 1)
|
|
116
88
|
], 64))
|
|
117
89
|
], 6), [
|
|
118
|
-
[vShow, _ctx.
|
|
90
|
+
[vShow, _ctx.visible]
|
|
119
91
|
])
|
|
120
92
|
]),
|
|
121
93
|
_: 3
|
|
122
94
|
}, 8, ["onAfterLeave"]);
|
|
123
95
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
type: "base",
|
|
127
|
-
showPopup: false,
|
|
128
|
-
msg: "",
|
|
129
|
-
color: void 0,
|
|
130
|
-
background: void 0,
|
|
131
|
-
duration: 3e3,
|
|
132
|
-
className: "",
|
|
133
|
-
onClosed: null,
|
|
134
|
-
onClick: null,
|
|
135
|
-
onOpened: null,
|
|
136
|
-
textTimer: null,
|
|
137
|
-
unmount: null
|
|
138
|
-
};
|
|
139
|
-
let idsMap = [];
|
|
140
|
-
let optsMap = [];
|
|
141
|
-
const clearNotify = (id) => {
|
|
142
|
-
if (id) {
|
|
143
|
-
const container = document.getElementById(id);
|
|
144
|
-
optsMap = optsMap.filter((item) => item.id !== id);
|
|
145
|
-
idsMap = idsMap.filter((item) => item !== id);
|
|
146
|
-
if (container) {
|
|
147
|
-
document.body.removeChild(container);
|
|
148
|
-
}
|
|
149
|
-
} else {
|
|
150
|
-
idsMap.forEach((item) => {
|
|
151
|
-
const container = document.getElementById(item);
|
|
152
|
-
if (container) {
|
|
153
|
-
document.body.removeChild(container);
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
optsMap = [];
|
|
157
|
-
idsMap = [];
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
const updateNotify = (opts) => {
|
|
161
|
-
const container = document.getElementById(opts.id);
|
|
162
|
-
if (container) {
|
|
163
|
-
const currentOpt = optsMap.find((item) => item.id === opts.id);
|
|
164
|
-
if (currentOpt) {
|
|
165
|
-
opts = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), currentOpt), opts);
|
|
166
|
-
} else {
|
|
167
|
-
opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
|
|
168
|
-
}
|
|
169
|
-
const instance = createVNode(Notify, opts);
|
|
170
|
-
render(instance, container);
|
|
171
|
-
return instance.component.ctx;
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
const mountNotify = (opts) => {
|
|
175
|
-
opts.unmount = clearNotify;
|
|
176
|
-
let _id;
|
|
177
|
-
if (opts.id) {
|
|
178
|
-
_id = opts.id;
|
|
179
|
-
if (idsMap.find((item) => item === opts.id)) {
|
|
180
|
-
return updateNotify(opts);
|
|
181
|
-
}
|
|
182
|
-
} else {
|
|
183
|
-
_id = new Date().getTime() + "";
|
|
184
|
-
}
|
|
185
|
-
opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
|
|
186
|
-
opts.id = _id;
|
|
187
|
-
idsMap.push(opts.id);
|
|
188
|
-
optsMap.push(opts);
|
|
189
|
-
const container = document.createElement("view");
|
|
190
|
-
container.id = opts.id;
|
|
191
|
-
const instance = createVNode(Notify, opts);
|
|
192
|
-
render(instance, container);
|
|
193
|
-
document.body.appendChild(container);
|
|
194
|
-
setTimeout(() => {
|
|
195
|
-
instance.showPopup = true;
|
|
196
|
-
}, 0);
|
|
197
|
-
return instance.component.ctx;
|
|
198
|
-
};
|
|
199
|
-
const errorMsg = (msg) => {
|
|
200
|
-
if (!msg) {
|
|
201
|
-
console.warn("[NutUI Notify]: msg\u4E0D\u80FD\u4E3A\u7A7A");
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
const NotifyFunction = {
|
|
206
|
-
text(msg, obj = {}) {
|
|
207
|
-
errorMsg(msg);
|
|
208
|
-
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg }));
|
|
209
|
-
},
|
|
210
|
-
primary(msg, obj = {}) {
|
|
211
|
-
errorMsg(msg);
|
|
212
|
-
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "primary" }));
|
|
213
|
-
},
|
|
214
|
-
success(msg, obj = {}) {
|
|
215
|
-
errorMsg(msg);
|
|
216
|
-
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "success" }));
|
|
217
|
-
},
|
|
218
|
-
danger(msg, obj = {}) {
|
|
219
|
-
errorMsg(msg);
|
|
220
|
-
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "danger" }));
|
|
221
|
-
},
|
|
222
|
-
warn(msg, obj = {}) {
|
|
223
|
-
errorMsg(msg);
|
|
224
|
-
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "warning" }));
|
|
225
|
-
},
|
|
226
|
-
hide() {
|
|
227
|
-
clearNotify();
|
|
228
|
-
},
|
|
229
|
-
install(app) {
|
|
230
|
-
app.config.globalProperties.$notify = NotifyFunction;
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
export { Notify, NotifyFunction, NotifyFunction as default };
|
|
96
|
+
_sfc_main.render = _sfc_render;
|
|
97
|
+
export { _sfc_main as default };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, watch, onMounted, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass, createTextVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
8
|
const { create } = createComponent("numberkeyboard");
|
|
10
|
-
|
|
9
|
+
var _sfc_main = create({
|
|
11
10
|
props: {
|
|
12
11
|
title: {
|
|
13
12
|
type: String,
|
|
@@ -36,6 +35,10 @@ const _sfc_main = create({
|
|
|
36
35
|
randomKeys: {
|
|
37
36
|
type: Boolean,
|
|
38
37
|
default: false
|
|
38
|
+
},
|
|
39
|
+
overlay: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: true
|
|
39
42
|
}
|
|
40
43
|
},
|
|
41
44
|
emits: ["input", "delete", "close", "update:value"],
|
|
@@ -171,6 +174,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
174
|
visible: _ctx.show,
|
|
172
175
|
"onUpdate:visible": _cache[6] || (_cache[6] = ($event) => _ctx.show = $event),
|
|
173
176
|
position: "bottom",
|
|
177
|
+
overlay: _ctx.overlay,
|
|
174
178
|
onClickOverlay: _cache[7] || (_cache[7] = ($event) => _ctx.closeBoard()),
|
|
175
179
|
"overlay-class": "nut-numberkeyboard-overlay"
|
|
176
180
|
}, {
|
|
@@ -242,7 +246,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
242
246
|
], 512)
|
|
243
247
|
]),
|
|
244
248
|
_: 1
|
|
245
|
-
}, 8, ["visible"]);
|
|
249
|
+
}, 8, ["visible", "overlay"]);
|
|
246
250
|
}
|
|
247
|
-
|
|
248
|
-
export {
|
|
251
|
+
_sfc_main.render = _sfc_render;
|
|
252
|
+
export { _sfc_main as default };
|
|
@@ -14,14 +14,16 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
+
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
18
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
19
|
+
};
|
|
17
20
|
/*!
|
|
18
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
|
|
19
22
|
* (c) 2021 @jdf2e.
|
|
20
23
|
* Released under the MIT License.
|
|
21
24
|
*/
|
|
22
|
-
import { computed,
|
|
25
|
+
import { computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementBlock, normalizeClass, normalizeStyle, renderSlot, vShow } from "vue";
|
|
23
26
|
import { c as createComponent } from "./component.js";
|
|
24
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
25
27
|
const { componentName, create } = createComponent("overlay");
|
|
26
28
|
const overlayProps = {
|
|
27
29
|
visible: {
|
|
@@ -52,7 +54,7 @@ const overlayProps = {
|
|
|
52
54
|
default: true
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
|
-
|
|
57
|
+
var _sfc_main = create({
|
|
56
58
|
props: overlayProps,
|
|
57
59
|
emits: ["click", "update:visible"],
|
|
58
60
|
setup(props, { emit }) {
|
|
@@ -63,56 +65,47 @@ const _sfc_main = create({
|
|
|
63
65
|
[props.overlayClass]: true
|
|
64
66
|
};
|
|
65
67
|
});
|
|
66
|
-
watch(() => props.visible, (value) => {
|
|
67
|
-
value ? lock() : unlock();
|
|
68
|
-
});
|
|
69
|
-
const lock = () => {
|
|
70
|
-
if (props.lockScroll && props.visible) {
|
|
71
|
-
document.body.classList.add("nut-overflow-hidden");
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
const unlock = () => {
|
|
75
|
-
document.body.classList.remove("nut-overflow-hidden");
|
|
76
|
-
};
|
|
77
|
-
onDeactivated(unlock);
|
|
78
|
-
onBeforeUnmount(unlock);
|
|
79
|
-
onMounted(lock);
|
|
80
|
-
onActivated(lock);
|
|
81
68
|
const style = computed(() => {
|
|
82
69
|
return __spreadValues({
|
|
83
70
|
animationDuration: `${props.duration}s`,
|
|
84
71
|
zIndex: props.zIndex
|
|
85
72
|
}, props.overlayStyle);
|
|
86
73
|
});
|
|
87
|
-
const touchmove = (e) => {
|
|
88
|
-
if (props.lockScroll)
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
};
|
|
91
74
|
const onClick = (e) => {
|
|
92
75
|
emit("click", e);
|
|
93
76
|
if (props.closeOnClickOverlay) {
|
|
94
77
|
emit("update:visible", false);
|
|
95
78
|
}
|
|
96
79
|
};
|
|
97
|
-
return { classes, style,
|
|
80
|
+
return { classes, style, onClick };
|
|
98
81
|
}
|
|
99
82
|
});
|
|
100
83
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
101
84
|
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
102
85
|
default: withCtx(() => [
|
|
103
|
-
withDirectives(
|
|
86
|
+
_ctx.lockScroll ? withDirectives((openBlock(), createElementBlock("view", {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: normalizeClass(_ctx.classes),
|
|
89
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
90
|
+
style: normalizeStyle(_ctx.style),
|
|
91
|
+
"catch-move": true
|
|
92
|
+
}, [
|
|
93
|
+
renderSlot(_ctx.$slots, "default")
|
|
94
|
+
], 6)), [
|
|
95
|
+
[vShow, _ctx.visible]
|
|
96
|
+
]) : withDirectives((openBlock(), createElementBlock("view", {
|
|
97
|
+
key: 1,
|
|
104
98
|
class: normalizeClass(_ctx.classes),
|
|
105
|
-
onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.touchmove && _ctx.touchmove(...args), ["stop"])),
|
|
106
99
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
107
100
|
style: normalizeStyle(_ctx.style)
|
|
108
101
|
}, [
|
|
109
102
|
renderSlot(_ctx.$slots, "default")
|
|
110
|
-
],
|
|
103
|
+
], 6)), [
|
|
111
104
|
[vShow, _ctx.visible]
|
|
112
105
|
])
|
|
113
106
|
]),
|
|
114
107
|
_: 3
|
|
115
108
|
});
|
|
116
109
|
}
|
|
117
|
-
|
|
118
|
-
export {
|
|
110
|
+
_sfc_main.render = _sfc_render;
|
|
111
|
+
export { _sfc_main as default, overlayProps };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { toRefs, computed, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
8
|
const { componentName, create } = createComponent("pagination");
|
|
10
|
-
|
|
9
|
+
var _sfc_main = create({
|
|
11
10
|
props: {
|
|
12
11
|
modelValue: {
|
|
13
12
|
type: Number,
|
|
@@ -67,13 +66,13 @@ const _sfc_main = create({
|
|
|
67
66
|
return { number, text, active };
|
|
68
67
|
};
|
|
69
68
|
const pages = computed(() => {
|
|
70
|
-
if (mode.value == "simple")
|
|
71
|
-
return;
|
|
72
69
|
let items = [];
|
|
73
70
|
const pageCount = countRef.value;
|
|
74
71
|
const pageSize = showPageSize.value;
|
|
75
72
|
let startPage = 1;
|
|
76
73
|
let endPage = pageCount;
|
|
74
|
+
if (mode.value == "simple")
|
|
75
|
+
return;
|
|
77
76
|
const partialShow = pageCount > pageSize;
|
|
78
77
|
if (partialShow) {
|
|
79
78
|
startPage = Math.max(modelValue.value - Math.floor(pageSize / 2), 1);
|
|
@@ -134,9 +133,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
134
133
|
])
|
|
135
134
|
], 2),
|
|
136
135
|
_ctx.mode == "multi" ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
137
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item,
|
|
136
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item, index) => {
|
|
138
137
|
return openBlock(), createElementBlock("view", {
|
|
139
|
-
key:
|
|
138
|
+
key: index + "pagination",
|
|
140
139
|
class: normalizeClass(["nut-pagination-item", item.active ? "active" : ""]),
|
|
141
140
|
onClick: ($event) => _ctx.select(item.number, true)
|
|
142
141
|
}, [
|
|
@@ -159,5 +158,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
159
158
|
], 2)
|
|
160
159
|
]);
|
|
161
160
|
}
|
|
162
|
-
|
|
163
|
-
export {
|
|
161
|
+
_sfc_main.render = _sfc_render;
|
|
162
|
+
export { _sfc_main as default };
|