@nutui/nutui 3.2.6 → 3.2.7
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 +41 -0
- package/README.md +11 -1
- package/dist/nutui.es.js +682 -1156
- package/dist/nutui.umd.js +689 -1164
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +11 -4
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +1 -1
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +9 -12
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +1 -1
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +8 -2
- package/dist/packages/_es/Ellipsis.js +3 -3
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +16 -5
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +9 -2
- package/dist/packages/_es/Input.js +5 -12
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +1 -1
- package/dist/packages/_es/MenuItem.js +5 -2
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +1 -1
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +6 -47
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +19 -24
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +24 -10
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +1 -1
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +1 -1
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +6 -6
- package/dist/packages/_es/Video.js +3 -2
- package/dist/packages/_es/WaterMark.js +1 -1
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +8 -2
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/address/index.scss +5 -1
- package/dist/packages/card/index.scss +1 -0
- package/dist/packages/ellipsis/index.scss +4 -0
- package/dist/packages/formitem/index.scss +2 -0
- package/dist/packages/imagepreview/index.scss +5 -0
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/menuitem/index.scss +1 -0
- package/dist/packages/signature/index.scss +6 -2
- package/dist/packages/skeleton/index.scss +21 -19
- package/dist/packages/sticky/index.scss +3 -0
- package/dist/packages/tabbaritem/index.scss +4 -0
- package/dist/packages/timeselect/index.scss +0 -1
- package/dist/smartips/attributes.json +32 -56
- package/dist/smartips/tags.json +6 -16
- package/dist/smartips/web-types.json +48 -109
- package/dist/style.css +1 -1
- package/dist/styles/font/config.json +4 -0
- package/dist/styles/font/demo_index.html +118 -26
- package/dist/styles/font/iconfont.css +23 -7
- package/dist/styles/font/iconfont.js +6 -6
- package/dist/styles/font/iconfont.json +35 -7
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +51 -52
- package/dist/styles/themes/jdb.scss +51 -52
- package/dist/styles/themes/jddkh.scss +51 -52
- package/dist/styles/themes/jdt.scss +51 -52
- package/dist/styles/variables-jdb.scss +8 -1
- package/dist/styles/variables-jddkh.scss +8 -1
- package/dist/styles/variables-jdt.scss +8 -1
- package/dist/styles/variables.scss +8 -1
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/audio/index.vue.d.ts +4 -4
- package/dist/types/__VUE/calendar/index.vue.d.ts +11 -0
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +15 -5
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/elevator/index.vue.d.ts +2 -1
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +0 -1
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +3 -1
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/Column.vue.d.ts +4 -4
- package/dist/types/__VUE/picker/index.vue.d.ts +4 -4
- package/dist/types/__VUE/popover/index.vue.d.ts +1 -1
- package/dist/types/__VUE/range/index.vue.d.ts +7 -7
- package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/skeleton/common.d.ts +2 -3
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -3
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -0
- package/dist/types/__VUE/uploader/index.vue.d.ts +14 -5
- package/dist/types/__VUE/video/index.vue.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +1 -2
- package/package.json +2 -1
- package/dist/packages/_es/OldPicker.js +0 -486
- package/dist/packages/oldpicker/index.scss +0 -133
- package/dist/types/__VUE/oldpicker/Column.vue.d.ts +0 -96
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +0 -22
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +0 -369
- package/dist/types/__VUE/oldpicker/types.d.ts +0 -24
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Nov 18 2022 19:57:44 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -74,6 +74,11 @@ const _sfc_main = create({
|
|
|
74
74
|
endDate: {
|
|
75
75
|
type: String,
|
|
76
76
|
default: Utils.getDay(365)
|
|
77
|
+
},
|
|
78
|
+
firstDayOfWeek: {
|
|
79
|
+
type: Number,
|
|
80
|
+
default: 0,
|
|
81
|
+
validator: (val) => val >= 0 && val <= 6
|
|
77
82
|
}
|
|
78
83
|
},
|
|
79
84
|
emits: ["choose", "close", "update:visible", "select"],
|
|
@@ -165,7 +170,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
170
|
"show-today": _ctx.showToday,
|
|
166
171
|
"show-title": _ctx.showTitle,
|
|
167
172
|
"show-sub-title": _ctx.showSubTitle,
|
|
168
|
-
"to-date-animation": _ctx.toDateAnimation
|
|
173
|
+
"to-date-animation": _ctx.toDateAnimation,
|
|
174
|
+
"first-day-of-week": _ctx.firstDayOfWeek
|
|
169
175
|
}, createSlots({ _: 2 }, [
|
|
170
176
|
_ctx.showTopBtn ? {
|
|
171
177
|
name: "btn",
|
|
@@ -201,7 +207,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
201
207
|
]),
|
|
202
208
|
key: "3"
|
|
203
209
|
} : void 0
|
|
204
|
-
]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title", "to-date-animation"])) : createCommentVNode("", true)
|
|
210
|
+
]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title", "to-date-animation", "first-day-of-week"])) : createCommentVNode("", true)
|
|
205
211
|
]),
|
|
206
212
|
_: 3
|
|
207
213
|
}, 8, ["visible", "onClickOverlay", "onClickCloseIcon"])) : (openBlock(), createBlock(_component_nut_calendar_item, {
|
|
@@ -224,6 +230,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
224
230
|
"show-title": _ctx.showTitle,
|
|
225
231
|
"show-sub-title": _ctx.showSubTitle,
|
|
226
232
|
"to-date-animation": _ctx.toDateAnimation,
|
|
233
|
+
"first-day-of-week": _ctx.firstDayOfWeek,
|
|
227
234
|
ref: "calendarRef"
|
|
228
235
|
}, createSlots({ _: 2 }, [
|
|
229
236
|
_ctx.showTopBtn ? {
|
|
@@ -260,7 +267,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
260
267
|
]),
|
|
261
268
|
key: "3"
|
|
262
269
|
} : void 0
|
|
263
|
-
]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title", "to-date-animation"]));
|
|
270
|
+
]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title", "to-date-animation", "first-day-of-week"]));
|
|
264
271
|
}
|
|
265
272
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
266
273
|
export { index as default };
|
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Nov 18 2022 19:57:44 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -131,17 +131,6 @@ const _sfc_main = create({
|
|
|
131
131
|
proxyData.openExpanded = true;
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
|
-
watch(
|
|
135
|
-
() => {
|
|
136
|
-
var _a, _b;
|
|
137
|
-
return (_b = (_a = ctx == null ? void 0 : ctx.slots) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a);
|
|
138
|
-
},
|
|
139
|
-
() => {
|
|
140
|
-
setTimeout(() => {
|
|
141
|
-
animation();
|
|
142
|
-
}, 300);
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
134
|
const init = () => {
|
|
146
135
|
const { name } = props;
|
|
147
136
|
const active = parent && parent.props.active;
|
|
@@ -159,6 +148,14 @@ const _sfc_main = create({
|
|
|
159
148
|
});
|
|
160
149
|
};
|
|
161
150
|
onMounted(() => {
|
|
151
|
+
const MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
|
152
|
+
var observer = new MutationObserver(() => {
|
|
153
|
+
animation();
|
|
154
|
+
});
|
|
155
|
+
observer.observe(document.getElementsByClassName("collapse-wrapper")[0], {
|
|
156
|
+
childList: true,
|
|
157
|
+
subtree: true
|
|
158
|
+
});
|
|
162
159
|
init();
|
|
163
160
|
});
|
|
164
161
|
const emptyContent = computed(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Nov 18 2022 19:57:44 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -38,7 +38,7 @@ const _sfc_main = create({
|
|
|
38
38
|
default: 35
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
emits: ["click-item", "click-index"],
|
|
41
|
+
emits: ["click-item", "click-index", "change"],
|
|
42
42
|
setup(props, context) {
|
|
43
43
|
const listview = ref(null);
|
|
44
44
|
const state = reactive({
|
|
@@ -173,6 +173,12 @@ const _sfc_main = create({
|
|
|
173
173
|
state.fixedTop = fixedTop;
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
|
+
watch(
|
|
177
|
+
() => state.currentIndex,
|
|
178
|
+
(newVal) => {
|
|
179
|
+
context.emit("change", newVal);
|
|
180
|
+
}
|
|
181
|
+
);
|
|
176
182
|
return {
|
|
177
183
|
classes,
|
|
178
184
|
...toRefs(state),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Nov 18 2022 19:57:44 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -193,13 +193,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
193
193
|
}, [
|
|
194
194
|
!_ctx.exceeded ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true),
|
|
195
195
|
_ctx.exceeded && !_ctx.expanded ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
196
|
-
createTextVNode(toDisplayString(_ctx.ellipsis.leading)
|
|
196
|
+
createTextVNode(toDisplayString(_ctx.ellipsis.leading), 1),
|
|
197
197
|
_ctx.expandText ? (openBlock(), createElementBlock("span", {
|
|
198
198
|
key: 0,
|
|
199
199
|
class: "nut-ellipsis-text",
|
|
200
200
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.clickHandle(1), ["stop"]))
|
|
201
201
|
}, toDisplayString(_ctx.expandText), 1)) : createCommentVNode("", true),
|
|
202
|
-
createTextVNode(
|
|
202
|
+
createTextVNode(toDisplayString(_ctx.ellipsis.tailing), 1)
|
|
203
203
|
])) : createCommentVNode("", true),
|
|
204
204
|
_ctx.exceeded && _ctx.expanded ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
205
205
|
createTextVNode(toDisplayString(_ctx.content) + " ", 1),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Nov 18 2022 19:57:44 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -384,7 +384,6 @@ const _sfc_main = create({
|
|
|
384
384
|
const state = reactive({
|
|
385
385
|
showPop: false,
|
|
386
386
|
active: 1,
|
|
387
|
-
maxNo: 1,
|
|
388
387
|
rootWidth: 0,
|
|
389
388
|
rootHeight: 0
|
|
390
389
|
});
|
|
@@ -419,7 +418,6 @@ const _sfc_main = create({
|
|
|
419
418
|
};
|
|
420
419
|
const closeDone = () => {
|
|
421
420
|
state.showPop = false;
|
|
422
|
-
state.active = 1;
|
|
423
421
|
emit("close");
|
|
424
422
|
};
|
|
425
423
|
const handleCloseIcon = () => {
|
|
@@ -438,14 +436,27 @@ const _sfc_main = create({
|
|
|
438
436
|
init();
|
|
439
437
|
}
|
|
440
438
|
);
|
|
439
|
+
watch(
|
|
440
|
+
() => props.initNo,
|
|
441
|
+
(val) => {
|
|
442
|
+
if (val != state.active) {
|
|
443
|
+
state.active = val;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
const initPage = computed(() => {
|
|
448
|
+
const maxNo = props.images.length + props.videos.length;
|
|
449
|
+
const _initPage = props.initNo > maxNo ? maxNo - 1 : props.initNo - 1;
|
|
450
|
+
return _initPage >= 0 ? _initPage : 0;
|
|
451
|
+
});
|
|
441
452
|
onMounted(() => {
|
|
442
453
|
state.active = props.initNo;
|
|
443
454
|
state.showPop = props.show;
|
|
444
|
-
state.maxNo = props.images.length + props.videos.length;
|
|
445
455
|
});
|
|
446
456
|
return {
|
|
447
457
|
swipeRef,
|
|
448
458
|
...toRefs(state),
|
|
459
|
+
initPage,
|
|
449
460
|
slideChangeEnd,
|
|
450
461
|
onClose,
|
|
451
462
|
handleCloseIcon,
|
|
@@ -485,7 +496,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
485
496
|
"is-preventDefault": false,
|
|
486
497
|
direction: "horizontal",
|
|
487
498
|
onChange: _ctx.slideChangeEnd,
|
|
488
|
-
"init-page": _ctx.
|
|
499
|
+
"init-page": _ctx.initPage,
|
|
489
500
|
"pagination-visible": _ctx.paginationVisible,
|
|
490
501
|
"pagination-color": _ctx.paginationColor
|
|
491
502
|
}, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Nov 18 2022 19:57:44 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, computed, onMounted, onUnmounted, ref, onActivated, onDeactivated, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, mergeProps, toDisplayString, renderSlot, Fragment, createCommentVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { u as useTouch } from "./index4.js";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
import "../locale/lang";
|
|
10
11
|
const { componentName, create, translate } = createComponent("infiniteloading");
|
|
@@ -57,6 +58,7 @@ const _sfc_main = create({
|
|
|
57
58
|
},
|
|
58
59
|
emits: ["scroll-change", "load-more", "refresh"],
|
|
59
60
|
setup(props, { emit, slots }) {
|
|
61
|
+
const touch = useTouch();
|
|
60
62
|
const state = reactive({
|
|
61
63
|
scrollEl: window,
|
|
62
64
|
scroller: null,
|
|
@@ -137,6 +139,7 @@ const _sfc_main = create({
|
|
|
137
139
|
state.isTouching = false;
|
|
138
140
|
};
|
|
139
141
|
const touchStart = (event) => {
|
|
142
|
+
touch.start(event);
|
|
140
143
|
if (state.beforeScrollTop == 0 && !state.isTouching && props.isOpenRefresh) {
|
|
141
144
|
state.y = event.touches[0].pageY;
|
|
142
145
|
state.isTouching = true;
|
|
@@ -145,8 +148,9 @@ const _sfc_main = create({
|
|
|
145
148
|
}
|
|
146
149
|
};
|
|
147
150
|
const touchMove = (event) => {
|
|
151
|
+
touch.move(event);
|
|
148
152
|
state.distance = event.touches[0].pageY - state.y;
|
|
149
|
-
if (state.distance > 0 && state.isTouching) {
|
|
153
|
+
if (touch.isVertical() && state.distance > 0 && state.isTouching) {
|
|
150
154
|
event.preventDefault();
|
|
151
155
|
if (state.distance >= state.refreshMaxH)
|
|
152
156
|
state.distance = state.refreshMaxH;
|
|
@@ -163,6 +167,9 @@ const _sfc_main = create({
|
|
|
163
167
|
emit("refresh", refreshDone);
|
|
164
168
|
}
|
|
165
169
|
}
|
|
170
|
+
setTimeout(() => {
|
|
171
|
+
touch.reset();
|
|
172
|
+
}, 0);
|
|
166
173
|
};
|
|
167
174
|
const getParentElement = (el) => {
|
|
168
175
|
return !!props.containerId ? document.querySelector(`#${props.containerId}`) : el && el.parentNode;
|