@nutui/nutui 3.3.0 → 3.3.1-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.es.js +331 -297
- package/dist/nutui.umd.js +327 -293
- package/dist/packages/_es/ActionSheet.js +1 -1
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/AddressList.js +2 -2
- 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 +1 -1
- 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 +2 -2
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- 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 +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +2 -2
- 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 +3 -3
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +18 -26
- package/dist/packages/_es/Input.js +1 -1
- 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 +8 -3
- 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 +17 -7
- package/dist/packages/_es/Popover.js +171 -81
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/Price.js +7 -2
- package/dist/packages/_es/Progress.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 +1 -1
- 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 +57 -115
- 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 +4 -8
- package/dist/packages/_es/TabbarItem.js +12 -13
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +6 -9
- 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 +1 -1
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/WaterMark.js +1 -1
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +6 -2
- 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 +1 -1
- package/dist/packages/_es/interceptor.js +2 -2
- package/dist/packages/_es/mountComponent.js +2 -2
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/props.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/infiniteloading/index.scss +2 -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/picker/index.scss +10 -4
- package/dist/packages/popover/index.scss +10 -38
- package/dist/packages/price/index.scss +5 -0
- package/dist/smartips/attributes.json +36 -8
- package/dist/smartips/tags.json +13 -6
- package/dist/smartips/web-types.json +72 -9
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +44 -44
- package/dist/styles/themes/jdb.scss +44 -44
- package/dist/styles/themes/jddkh.scss +44 -44
- package/dist/styles/themes/jdt.scss +44 -44
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +4 -4
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/audio/index.vue.d.ts +4 -4
- package/dist/types/__VUE/avatar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
- package/dist/types/__VUE/badge/index.vue.d.ts +1 -1
- package/dist/types/__VUE/button/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +4 -4
- package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cell/index.vue.d.ts +4 -4
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/dialog/index.vue.d.ts +5 -5
- package/dist/types/__VUE/divider/index.vue.d.ts +1 -1
- package/dist/types/__VUE/fixednav/index.vue.d.ts +1 -1
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +3 -3
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +3 -3
- package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +11 -2
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +6 -6
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +1 -1
- package/dist/types/__VUE/overlay/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 +26 -8
- package/dist/types/__VUE/popover/index.vue.d.ts +37 -8
- package/dist/types/__VUE/popover/type.d.ts +7 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/price/index.vue.d.ts +9 -0
- package/dist/types/__VUE/range/index.vue.d.ts +7 -7
- package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/skeleton/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +9 -8
- package/dist/types/__VUE/swiperitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -11
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +4 -4
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/__VUE/uploader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/video/index.vue.d.ts +3 -3
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/__VUE/swiper/use-touch.d.ts +0 -20
package/dist/nutui.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.3.
|
|
2
|
+
* @nutui/nutui v3.3.1-beta.1 Fri Dec 16 2022 16:18:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -353,6 +353,10 @@
|
|
|
353
353
|
}
|
|
354
354
|
return num.toString();
|
|
355
355
|
};
|
|
356
|
+
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
|
357
|
+
const getScrollTopRoot = () => {
|
|
358
|
+
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
359
|
+
};
|
|
356
360
|
const langs = vue.reactive({
|
|
357
361
|
"zh-CN": new Lang$1(),
|
|
358
362
|
"en-US": new Lang()
|
|
@@ -579,7 +583,7 @@
|
|
|
579
583
|
}
|
|
580
584
|
});
|
|
581
585
|
const _hoisted_1$1f = { class: "nut-button__warp" };
|
|
582
|
-
function _sfc_render$
|
|
586
|
+
function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
583
587
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
584
588
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
585
589
|
class: vue.normalizeClass(_ctx.classes),
|
|
@@ -607,7 +611,7 @@
|
|
|
607
611
|
])
|
|
608
612
|
], 6);
|
|
609
613
|
}
|
|
610
|
-
var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$
|
|
614
|
+
var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1A]]);
|
|
611
615
|
function useRouter() {
|
|
612
616
|
const proxy = vue.getCurrentInstance().proxy;
|
|
613
617
|
return proxy.$router || null;
|
|
@@ -622,7 +626,7 @@
|
|
|
622
626
|
};
|
|
623
627
|
const _hoisted_3$N = { class: "title" };
|
|
624
628
|
const _hoisted_4$C = { class: "nut-cell__title-desc" };
|
|
625
|
-
function render$
|
|
629
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
626
630
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
627
631
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
628
632
|
class: vue.normalizeClass(_ctx.classes),
|
|
@@ -711,7 +715,7 @@
|
|
|
711
715
|
};
|
|
712
716
|
}
|
|
713
717
|
});
|
|
714
|
-
var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", render$
|
|
718
|
+
var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", render$2]]);
|
|
715
719
|
const { componentName: componentName$1g, create: create$1K } = createComponent("cell-group");
|
|
716
720
|
const _sfc_main$1K = create$1K({
|
|
717
721
|
props: {
|
|
@@ -739,7 +743,7 @@
|
|
|
739
743
|
class: "nut-cell-group__desc"
|
|
740
744
|
};
|
|
741
745
|
const _hoisted_3$M = { class: "nut-cell-group__warp" };
|
|
742
|
-
function _sfc_render$
|
|
746
|
+
function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
743
747
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
744
748
|
class: vue.normalizeClass(_ctx.classes)
|
|
745
749
|
}, [
|
|
@@ -750,7 +754,7 @@
|
|
|
750
754
|
])
|
|
751
755
|
], 2);
|
|
752
756
|
}
|
|
753
|
-
var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$
|
|
757
|
+
var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1z]]);
|
|
754
758
|
let count = 0;
|
|
755
759
|
const CLSNAME = "nut-overflow-hidden";
|
|
756
760
|
const useLockScroll = (isLock) => {
|
|
@@ -828,7 +832,7 @@
|
|
|
828
832
|
return { classes, style, onClick };
|
|
829
833
|
}
|
|
830
834
|
});
|
|
831
|
-
function _sfc_render$
|
|
835
|
+
function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
832
836
|
return vue.openBlock(), vue.createBlock(vue.Transition, { name: "overlay-fade" }, {
|
|
833
837
|
default: vue.withCtx(() => [
|
|
834
838
|
vue.withDirectives(vue.createElementVNode("view", {
|
|
@@ -844,7 +848,7 @@
|
|
|
844
848
|
_: 3
|
|
845
849
|
});
|
|
846
850
|
}
|
|
847
|
-
var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$
|
|
851
|
+
var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1y]]);
|
|
848
852
|
const popupProps = {
|
|
849
853
|
visible: {
|
|
850
854
|
type: Boolean,
|
|
@@ -1019,7 +1023,7 @@
|
|
|
1019
1023
|
};
|
|
1020
1024
|
const { componentName: componentName$1e, create: create$1I } = createComponent("popup");
|
|
1021
1025
|
const _sfc_main$1I = create$1I(component$9(componentName$1e));
|
|
1022
|
-
function _sfc_render$
|
|
1026
|
+
function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1023
1027
|
const _component_nut_overlay = vue.resolveComponent("nut-overlay");
|
|
1024
1028
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
1025
1029
|
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
@@ -1065,7 +1069,7 @@
|
|
|
1065
1069
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
1066
1070
|
], 8, ["to", "disabled"]);
|
|
1067
1071
|
}
|
|
1068
|
-
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$
|
|
1072
|
+
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1x]]);
|
|
1069
1073
|
const component$8 = {
|
|
1070
1074
|
props: {
|
|
1071
1075
|
theme: { type: String, default: "" },
|
|
@@ -1188,7 +1192,7 @@
|
|
|
1188
1192
|
key: 1,
|
|
1189
1193
|
class: "nut-img-error"
|
|
1190
1194
|
};
|
|
1191
|
-
function _sfc_render$
|
|
1195
|
+
function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1192
1196
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
1193
1197
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
1194
1198
|
class: vue.normalizeClass(_ctx.classes),
|
|
@@ -1219,7 +1223,7 @@
|
|
|
1219
1223
|
])) : vue.createCommentVNode("", true)
|
|
1220
1224
|
], 6);
|
|
1221
1225
|
}
|
|
1222
|
-
var Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$
|
|
1226
|
+
var Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1w]]);
|
|
1223
1227
|
const { create: create$1F } = createComponent("layout");
|
|
1224
1228
|
const _sfc_main$1F = create$1F({});
|
|
1225
1229
|
const { componentName: componentName$1b, create: create$1E } = createComponent("col");
|
|
@@ -1258,7 +1262,7 @@
|
|
|
1258
1262
|
};
|
|
1259
1263
|
}
|
|
1260
1264
|
});
|
|
1261
|
-
function _sfc_render$
|
|
1265
|
+
function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1262
1266
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
1263
1267
|
class: vue.normalizeClass(_ctx.classes),
|
|
1264
1268
|
style: vue.normalizeStyle(_ctx.style)
|
|
@@ -1266,7 +1270,7 @@
|
|
|
1266
1270
|
vue.renderSlot(_ctx.$slots, "default")
|
|
1267
1271
|
], 6);
|
|
1268
1272
|
}
|
|
1269
|
-
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$
|
|
1273
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1v]]);
|
|
1270
1274
|
const { componentName: componentName$1a, create: create$1D } = createComponent("row");
|
|
1271
1275
|
const _sfc_main$1D = create$1D({
|
|
1272
1276
|
props: {
|
|
@@ -1312,14 +1316,14 @@
|
|
|
1312
1316
|
};
|
|
1313
1317
|
}
|
|
1314
1318
|
});
|
|
1315
|
-
function _sfc_render$
|
|
1319
|
+
function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1316
1320
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
1317
1321
|
class: vue.normalizeClass(_ctx.getClasses())
|
|
1318
1322
|
}, [
|
|
1319
1323
|
vue.renderSlot(_ctx.$slots, "default")
|
|
1320
1324
|
], 2);
|
|
1321
1325
|
}
|
|
1322
|
-
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$
|
|
1326
|
+
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1u]]);
|
|
1323
1327
|
function isWindow(val) {
|
|
1324
1328
|
return val === window;
|
|
1325
1329
|
}
|
|
@@ -1542,7 +1546,7 @@
|
|
|
1542
1546
|
return { classes };
|
|
1543
1547
|
}
|
|
1544
1548
|
});
|
|
1545
|
-
function _sfc_render$
|
|
1549
|
+
function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1546
1550
|
return _ctx.direction === "horizontal" ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
1547
1551
|
key: 0,
|
|
1548
1552
|
class: vue.normalizeClass(_ctx.classes)
|
|
@@ -1553,7 +1557,7 @@
|
|
|
1553
1557
|
class: vue.normalizeClass(_ctx.classes)
|
|
1554
1558
|
}, null, 2));
|
|
1555
1559
|
}
|
|
1556
|
-
var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$
|
|
1560
|
+
var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1t]]);
|
|
1557
1561
|
function flattenVNodes(children, childName) {
|
|
1558
1562
|
const result = [];
|
|
1559
1563
|
const traverse = (children2) => {
|
|
@@ -1807,7 +1811,7 @@
|
|
|
1807
1811
|
key: 3,
|
|
1808
1812
|
class: "nut-grid-item__text"
|
|
1809
1813
|
};
|
|
1810
|
-
function _sfc_render$
|
|
1814
|
+
function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1811
1815
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
1812
1816
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
1813
1817
|
class: vue.normalizeClass(_ctx.rootClass),
|
|
@@ -1830,7 +1834,7 @@
|
|
|
1830
1834
|
], 2)
|
|
1831
1835
|
], 6);
|
|
1832
1836
|
}
|
|
1833
|
-
var GridItem = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$
|
|
1837
|
+
var GridItem = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1s]]);
|
|
1834
1838
|
const { componentName: componentName$15, create: create$1y } = createComponent("navbar");
|
|
1835
1839
|
const _sfc_main$1y = create$1y({
|
|
1836
1840
|
props: {
|
|
@@ -1936,7 +1940,7 @@
|
|
|
1936
1940
|
key: 0,
|
|
1937
1941
|
class: "nut-navbar__text"
|
|
1938
1942
|
};
|
|
1939
|
-
function _sfc_render$
|
|
1943
|
+
function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1940
1944
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
1941
1945
|
return _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$1a, [
|
|
1942
1946
|
vue.createElementVNode("view", {
|
|
@@ -2020,7 +2024,7 @@
|
|
|
2020
2024
|
])
|
|
2021
2025
|
], 6));
|
|
2022
2026
|
}
|
|
2023
|
-
var Navbar = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$
|
|
2027
|
+
var Navbar = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1r]]);
|
|
2024
2028
|
const { componentName: componentName$14, translate: translate$s } = createComponent("fixednav");
|
|
2025
2029
|
const component$6 = {
|
|
2026
2030
|
props: {
|
|
@@ -2095,7 +2099,7 @@
|
|
|
2095
2099
|
class: "b"
|
|
2096
2100
|
};
|
|
2097
2101
|
const _hoisted_6$o = { class: "text" };
|
|
2098
|
-
function render$
|
|
2102
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2099
2103
|
const _component_nut_overlay = vue.resolveComponent("nut-overlay");
|
|
2100
2104
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
2101
2105
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -2141,7 +2145,7 @@
|
|
|
2141
2145
|
}
|
|
2142
2146
|
const { create: create$1x } = createComponent("fixednav");
|
|
2143
2147
|
const _sfc_main$1x = create$1x(component$6);
|
|
2144
|
-
var FixedNav = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", render$
|
|
2148
|
+
var FixedNav = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", render$1]]);
|
|
2145
2149
|
const { componentName: componentName$13, create: create$1w } = createComponent("menu");
|
|
2146
2150
|
const _sfc_main$1w = create$1w({
|
|
2147
2151
|
props: {
|
|
@@ -2293,7 +2297,7 @@
|
|
|
2293
2297
|
});
|
|
2294
2298
|
const _hoisted_1$18 = ["onClick"];
|
|
2295
2299
|
const _hoisted_2$Y = { class: "nut-menu__title-text" };
|
|
2296
|
-
function _sfc_render$
|
|
2300
|
+
function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2297
2301
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
2298
2302
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
2299
2303
|
class: vue.normalizeClass(_ctx.classes)
|
|
@@ -2325,7 +2329,7 @@
|
|
|
2325
2329
|
vue.renderSlot(_ctx.$slots, "default")
|
|
2326
2330
|
], 2);
|
|
2327
2331
|
}
|
|
2328
|
-
var Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$
|
|
2332
|
+
var Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1q]]);
|
|
2329
2333
|
const { componentName: componentName$12, create: create$1v } = createComponent("menu-item");
|
|
2330
2334
|
const _sfc_main$1v = create$1v({
|
|
2331
2335
|
props: {
|
|
@@ -2348,6 +2352,10 @@
|
|
|
2348
2352
|
optionIcon: {
|
|
2349
2353
|
type: String,
|
|
2350
2354
|
default: "Check"
|
|
2355
|
+
},
|
|
2356
|
+
classPrefix: {
|
|
2357
|
+
type: String,
|
|
2358
|
+
default: "nut-icon"
|
|
2351
2359
|
}
|
|
2352
2360
|
},
|
|
2353
2361
|
components: {
|
|
@@ -2442,7 +2450,7 @@
|
|
|
2442
2450
|
});
|
|
2443
2451
|
const _hoisted_1$17 = { class: "nut-menu-item__content nut-menu-item__overflow" };
|
|
2444
2452
|
const _hoisted_2$X = ["onClick"];
|
|
2445
|
-
function _sfc_render$
|
|
2453
|
+
function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2446
2454
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
2447
2455
|
const _component_nut_popup = vue.resolveComponent("nut-popup");
|
|
2448
2456
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -2483,8 +2491,9 @@
|
|
|
2483
2491
|
option.value === _ctx.modelValue ? (vue.openBlock(), vue.createBlock(_component_nut_icon, vue.mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
2484
2492
|
class: { activeTitleClass: option.value === _ctx.modelValue, inactiveTitleClass: option.value !== _ctx.modelValue },
|
|
2485
2493
|
name: _ctx.optionIcon,
|
|
2486
|
-
color: _ctx.parent.props.activeColor
|
|
2487
|
-
|
|
2494
|
+
color: _ctx.parent.props.activeColor,
|
|
2495
|
+
"class-prefix": _ctx.classPrefix
|
|
2496
|
+
}), null, 16, ["class", "name", "color", "class-prefix"])) : vue.createCommentVNode("", true),
|
|
2488
2497
|
vue.createElementVNode("view", {
|
|
2489
2498
|
class: vue.normalizeClass({ activeTitleClass: option.value === _ctx.modelValue, inactiveTitleClass: option.value !== _ctx.modelValue }),
|
|
2490
2499
|
style: vue.normalizeStyle({ color: option.value === _ctx.modelValue ? _ctx.parent.props.activeColor : "" })
|
|
@@ -2500,7 +2509,7 @@
|
|
|
2500
2509
|
[vue.vShow, _ctx.state.showWrapper]
|
|
2501
2510
|
]);
|
|
2502
2511
|
}
|
|
2503
|
-
var MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$
|
|
2512
|
+
var MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1p]]);
|
|
2504
2513
|
const { create: create$1u } = createComponent("tabbar");
|
|
2505
2514
|
const _sfc_main$1u = create$1u({
|
|
2506
2515
|
props: {
|
|
@@ -2512,10 +2521,6 @@
|
|
|
2512
2521
|
type: Boolean,
|
|
2513
2522
|
default: false
|
|
2514
2523
|
},
|
|
2515
|
-
type: {
|
|
2516
|
-
type: String,
|
|
2517
|
-
default: "base"
|
|
2518
|
-
},
|
|
2519
2524
|
size: {
|
|
2520
2525
|
type: String,
|
|
2521
2526
|
default: "20px"
|
|
@@ -2545,7 +2550,7 @@
|
|
|
2545
2550
|
val: props.visible,
|
|
2546
2551
|
children: []
|
|
2547
2552
|
});
|
|
2548
|
-
const nutTabbar = vue.ref(
|
|
2553
|
+
const nutTabbar = vue.ref();
|
|
2549
2554
|
function changeIndex(index, active) {
|
|
2550
2555
|
emit("update:visible", active);
|
|
2551
2556
|
parentData.modelValue = active;
|
|
@@ -2569,8 +2574,7 @@
|
|
|
2569
2574
|
vue.onMounted(() => {
|
|
2570
2575
|
if (bottom.value && placeholder.value) {
|
|
2571
2576
|
vue.nextTick(() => {
|
|
2572
|
-
|
|
2573
|
-
height.value = (_a = nutTabbar == null ? void 0 : nutTabbar.value) == null ? void 0 : _a.getBoundingClientRect().height;
|
|
2577
|
+
height.value = useRect(nutTabbar).height;
|
|
2574
2578
|
});
|
|
2575
2579
|
}
|
|
2576
2580
|
});
|
|
@@ -2581,7 +2585,7 @@
|
|
|
2581
2585
|
};
|
|
2582
2586
|
}
|
|
2583
2587
|
});
|
|
2584
|
-
function _sfc_render$
|
|
2588
|
+
function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2585
2589
|
return _ctx.bottom && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2586
2590
|
key: 0,
|
|
2587
2591
|
class: "nut-tabbar__placeholder",
|
|
@@ -2600,7 +2604,7 @@
|
|
|
2600
2604
|
vue.renderSlot(_ctx.$slots, "default")
|
|
2601
2605
|
], 2));
|
|
2602
2606
|
}
|
|
2603
|
-
var Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$
|
|
2607
|
+
var Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1o]]);
|
|
2604
2608
|
const { create: create$1t } = createComponent("tabbar-item");
|
|
2605
2609
|
const _sfc_main$1t = create$1t({
|
|
2606
2610
|
props: {
|
|
@@ -2620,7 +2624,7 @@
|
|
|
2620
2624
|
default: ""
|
|
2621
2625
|
},
|
|
2622
2626
|
num: {
|
|
2623
|
-
type:
|
|
2627
|
+
type: Number,
|
|
2624
2628
|
default: ""
|
|
2625
2629
|
},
|
|
2626
2630
|
activeImg: {
|
|
@@ -2662,8 +2666,8 @@
|
|
|
2662
2666
|
var _a;
|
|
2663
2667
|
if (child.proxy) {
|
|
2664
2668
|
parent.children.push(child.proxy);
|
|
2665
|
-
const index =
|
|
2666
|
-
state.index = (_a = props.name) != null ? _a : index
|
|
2669
|
+
const index = parent.children.indexOf(child.proxy);
|
|
2670
|
+
state.index = (_a = props.name) != null ? _a : index;
|
|
2667
2671
|
}
|
|
2668
2672
|
};
|
|
2669
2673
|
relation(vue.getCurrentInstance());
|
|
@@ -2734,7 +2738,7 @@
|
|
|
2734
2738
|
};
|
|
2735
2739
|
const _hoisted_6$n = { key: 3 };
|
|
2736
2740
|
const _hoisted_7$k = { key: 0 };
|
|
2737
|
-
function _sfc_render$
|
|
2741
|
+
function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2738
2742
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
2739
2743
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2740
2744
|
class: vue.normalizeClass(["nut-tabbar-item", { "nut-tabbar-item__icon--unactive": !_ctx.active }]),
|
|
@@ -2745,13 +2749,12 @@
|
|
|
2745
2749
|
}, [
|
|
2746
2750
|
vue.createElementVNode("view", _hoisted_1$16, [
|
|
2747
2751
|
!_ctx.dot ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
2748
|
-
_ctx.num && _ctx.num <= 99 ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$W, vue.toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num
|
|
2752
|
+
_ctx.num && _ctx.num <= 99 ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$W, vue.toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num >= 100 ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$I, vue.toDisplayString("99+"))) : vue.createCommentVNode("", true)
|
|
2749
2753
|
], 64)) : vue.createCommentVNode("", true),
|
|
2750
2754
|
_ctx.dot ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$z)) : vue.createCommentVNode("", true),
|
|
2751
|
-
_ctx.
|
|
2755
|
+
_ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$q, [
|
|
2752
2756
|
vue.renderSlot(_ctx.$slots, "icon", { active: _ctx.active })
|
|
2753
|
-
])) : vue.
|
|
2754
|
-
_ctx.icon && !_ctx.isHaveSlot("icon") ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_6$n, [
|
|
2757
|
+
])) : _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_6$n, [
|
|
2755
2758
|
vue.createVNode(_component_nut_icon, {
|
|
2756
2759
|
class: "nut-tabbar-item_icon-box_icon",
|
|
2757
2760
|
size: _ctx.state.size,
|
|
@@ -2759,8 +2762,7 @@
|
|
|
2759
2762
|
"font-class-name": _ctx.fontClassName,
|
|
2760
2763
|
"class-prefix": _ctx.classPrefix
|
|
2761
2764
|
}, null, 8, ["size", "name", "font-class-name", "class-prefix"])
|
|
2762
|
-
])) : vue.
|
|
2763
|
-
!_ctx.icon && _ctx.activeImg && !_ctx.isHaveSlot("icon") ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2765
|
+
])) : _ctx.activeImg ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2764
2766
|
key: 4,
|
|
2765
2767
|
class: "nut-tabbar-item_icon-box_icon",
|
|
2766
2768
|
style: vue.normalizeStyle({
|
|
@@ -2772,16 +2774,17 @@
|
|
|
2772
2774
|
vue.createElementVNode("view", {
|
|
2773
2775
|
class: vue.normalizeClass([
|
|
2774
2776
|
"nut-tabbar-item_icon-box_nav-word",
|
|
2775
|
-
{ "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg && !_ctx.
|
|
2777
|
+
{ "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg && !_ctx.$slots.icon }
|
|
2776
2778
|
])
|
|
2777
2779
|
}, [
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2781
|
+
_ctx.tabTitle ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_7$k, vue.toDisplayString(_ctx.tabTitle), 1)) : vue.createCommentVNode("", true)
|
|
2782
|
+
])
|
|
2780
2783
|
], 2)
|
|
2781
2784
|
])
|
|
2782
2785
|
], 6);
|
|
2783
2786
|
}
|
|
2784
|
-
var TabbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$
|
|
2787
|
+
var TabbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1n]]);
|
|
2785
2788
|
function useExpose(apis) {
|
|
2786
2789
|
const instance = vue.getCurrentInstance();
|
|
2787
2790
|
if (instance) {
|
|
@@ -2980,7 +2983,7 @@
|
|
|
2980
2983
|
const _hoisted_4$y = { class: "fixed-title" };
|
|
2981
2984
|
const _hoisted_5$p = { class: "nut-elevator__bars__inner" };
|
|
2982
2985
|
const _hoisted_6$m = ["data-index", "onClick"];
|
|
2983
|
-
function _sfc_render$
|
|
2986
|
+
function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2984
2987
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
2985
2988
|
class: vue.normalizeClass(_ctx.classes)
|
|
2986
2989
|
}, [
|
|
@@ -3051,7 +3054,7 @@
|
|
|
3051
3054
|
], 32)
|
|
3052
3055
|
], 2);
|
|
3053
3056
|
}
|
|
3054
|
-
var Elevator = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$
|
|
3057
|
+
var Elevator = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1m]]);
|
|
3055
3058
|
const { create: create$1r, translate: translate$r } = createComponent("pagination");
|
|
3056
3059
|
const _sfc_main$1r = create$1r({
|
|
3057
3060
|
props: {
|
|
@@ -3170,7 +3173,7 @@
|
|
|
3170
3173
|
class: "nut-pagination-contain"
|
|
3171
3174
|
};
|
|
3172
3175
|
const _hoisted_5$o = { class: "nut-pagination-simple" };
|
|
3173
|
-
function _sfc_render$
|
|
3176
|
+
function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3174
3177
|
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$14, [
|
|
3175
3178
|
vue.createElementVNode("view", {
|
|
3176
3179
|
class: vue.normalizeClass(["nut-pagination-prev", _ctx.mode == "multi" ? "" : "simple-border", _ctx.modelValue == 1 ? "disabled" : ""]),
|
|
@@ -3206,7 +3209,7 @@
|
|
|
3206
3209
|
], 2)
|
|
3207
3210
|
]);
|
|
3208
3211
|
}
|
|
3209
|
-
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$
|
|
3212
|
+
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1l]]);
|
|
3210
3213
|
class Title {
|
|
3211
3214
|
constructor() {
|
|
3212
3215
|
this.title = "";
|
|
@@ -3333,9 +3336,6 @@
|
|
|
3333
3336
|
init(vnodes);
|
|
3334
3337
|
}
|
|
3335
3338
|
);
|
|
3336
|
-
const getScrollTopRoot = () => {
|
|
3337
|
-
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
3338
|
-
};
|
|
3339
3339
|
vue.watch(
|
|
3340
3340
|
() => props.modelValue,
|
|
3341
3341
|
(value) => {
|
|
@@ -3398,9 +3398,11 @@
|
|
|
3398
3398
|
};
|
|
3399
3399
|
}
|
|
3400
3400
|
};
|
|
3401
|
+
const { create: create$1q } = createComponent("tabs");
|
|
3402
|
+
const _sfc_main$1q = create$1q(component$5);
|
|
3401
3403
|
const _hoisted_1$13 = ["onClick"];
|
|
3402
3404
|
const _hoisted_2$T = ["onClick"];
|
|
3403
|
-
function
|
|
3405
|
+
function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3404
3406
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
3405
3407
|
const _component_nut_sticky = vue.resolveComponent("nut-sticky");
|
|
3406
3408
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -3490,9 +3492,7 @@
|
|
|
3490
3492
|
], 4)
|
|
3491
3493
|
], 2);
|
|
3492
3494
|
}
|
|
3493
|
-
|
|
3494
|
-
const _sfc_main$1q = create$1q(component$5);
|
|
3495
|
-
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", render$1]]);
|
|
3495
|
+
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1k]]);
|
|
3496
3496
|
const { create: create$1p } = createComponent("tabpane");
|
|
3497
3497
|
const _sfc_main$1p = create$1p({
|
|
3498
3498
|
props: {
|
|
@@ -3789,7 +3789,7 @@
|
|
|
3789
3789
|
}
|
|
3790
3790
|
return "";
|
|
3791
3791
|
}
|
|
3792
|
-
function useTouch
|
|
3792
|
+
function useTouch() {
|
|
3793
3793
|
const startX = vue.ref(0);
|
|
3794
3794
|
const startY = vue.ref(0);
|
|
3795
3795
|
const moveX = vue.ref(0);
|
|
@@ -3893,7 +3893,7 @@
|
|
|
3893
3893
|
let currentValue;
|
|
3894
3894
|
const root = vue.ref();
|
|
3895
3895
|
const dragStatus = vue.ref();
|
|
3896
|
-
const touch = useTouch
|
|
3896
|
+
const touch = useTouch();
|
|
3897
3897
|
const marksList = vue.computed(() => {
|
|
3898
3898
|
const { marks, max, min } = props;
|
|
3899
3899
|
const marksKeys = Object.keys(marks);
|
|
@@ -6371,7 +6371,7 @@
|
|
|
6371
6371
|
},
|
|
6372
6372
|
emits: ["click", "change"],
|
|
6373
6373
|
setup(props, { emit }) {
|
|
6374
|
-
const touch = useTouch
|
|
6374
|
+
const touch = useTouch();
|
|
6375
6375
|
const wrapper = vue.ref();
|
|
6376
6376
|
const state = vue.reactive({
|
|
6377
6377
|
touchParams: {
|
|
@@ -6495,7 +6495,7 @@
|
|
|
6495
6495
|
let currentDeg = (-updateMove / state.lineSpacing + 1) * state.rotation;
|
|
6496
6496
|
const maxDeg = (props.column.length + 1) * state.rotation;
|
|
6497
6497
|
const minDeg = 0;
|
|
6498
|
-
deg =
|
|
6498
|
+
deg = clamp(currentDeg, minDeg, maxDeg);
|
|
6499
6499
|
if (minDeg < deg && deg < maxDeg) {
|
|
6500
6500
|
setTransform(updateMove, null, void 0, deg + "deg");
|
|
6501
6501
|
state.currIndex = Math.abs(Math.round(updateMove / state.lineSpacing)) + 1;
|
|
@@ -6636,6 +6636,14 @@
|
|
|
6636
6636
|
swipeDuration: {
|
|
6637
6637
|
type: [Number, String],
|
|
6638
6638
|
default: 1e3
|
|
6639
|
+
},
|
|
6640
|
+
showOkText: {
|
|
6641
|
+
type: Boolean,
|
|
6642
|
+
default: true
|
|
6643
|
+
},
|
|
6644
|
+
showCancelText: {
|
|
6645
|
+
type: Boolean,
|
|
6646
|
+
default: true
|
|
6639
6647
|
}
|
|
6640
6648
|
},
|
|
6641
6649
|
emits: ["close", "change", "confirm", "update:visible", "update:modelValue"],
|
|
@@ -6844,15 +6852,17 @@
|
|
|
6844
6852
|
}, {
|
|
6845
6853
|
default: vue.withCtx(() => [
|
|
6846
6854
|
vue.createElementVNode("view", _hoisted_1$V, [
|
|
6847
|
-
vue.
|
|
6855
|
+
_ctx.showCancelText ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
6856
|
+
key: 0,
|
|
6848
6857
|
class: "nut-picker__left",
|
|
6849
6858
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
|
|
6850
|
-
}, vue.toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1),
|
|
6859
|
+
}, vue.toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1)) : vue.createCommentVNode("", true),
|
|
6851
6860
|
vue.createElementVNode("view", _hoisted_2$K, vue.toDisplayString(_ctx.title), 1),
|
|
6852
|
-
vue.
|
|
6861
|
+
_ctx.showOkText ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
6862
|
+
key: 1,
|
|
6853
6863
|
class: "nut-picker__right",
|
|
6854
6864
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirmHandler())
|
|
6855
|
-
}, vue.toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)
|
|
6865
|
+
}, vue.toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)) : vue.createCommentVNode("", true)
|
|
6856
6866
|
]),
|
|
6857
6867
|
vue.renderSlot(_ctx.$slots, "top"),
|
|
6858
6868
|
vue.createElementVNode("view", _hoisted_3$A, [
|
|
@@ -8073,7 +8083,7 @@
|
|
|
8073
8083
|
}
|
|
8074
8084
|
return v;
|
|
8075
8085
|
};
|
|
8076
|
-
const touch = useTouch
|
|
8086
|
+
const touch = useTouch();
|
|
8077
8087
|
const touchMethods = {
|
|
8078
8088
|
onTouchStart(event) {
|
|
8079
8089
|
if (!props.touchable)
|
|
@@ -9606,7 +9616,7 @@
|
|
|
9606
9616
|
}
|
|
9607
9617
|
state.offset = offset;
|
|
9608
9618
|
};
|
|
9609
|
-
const touch = useTouch
|
|
9619
|
+
const touch = useTouch();
|
|
9610
9620
|
const touchMethods = {
|
|
9611
9621
|
onTouchStart(event) {
|
|
9612
9622
|
if (props.disabled)
|
|
@@ -10504,7 +10514,7 @@
|
|
|
10504
10514
|
},
|
|
10505
10515
|
emits: ["scroll-change", "load-more", "refresh"],
|
|
10506
10516
|
setup(props, { emit, slots }) {
|
|
10507
|
-
const touch = useTouch
|
|
10517
|
+
const touch = useTouch();
|
|
10508
10518
|
const state = vue.reactive({
|
|
10509
10519
|
scrollEl: window,
|
|
10510
10520
|
scroller: null,
|
|
@@ -10526,17 +10536,9 @@
|
|
|
10526
10536
|
const getStyle = vue.computed(() => {
|
|
10527
10537
|
return {
|
|
10528
10538
|
height: state.distance < 0 ? `0px` : `${state.distance}px`,
|
|
10529
|
-
|
|
10539
|
+
transitionDuration: state.isTouching ? 0 : `0.2s`
|
|
10530
10540
|
};
|
|
10531
10541
|
});
|
|
10532
|
-
const requestAniFrame2 = () => {
|
|
10533
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(callback) {
|
|
10534
|
-
window.setTimeout(callback, 1e3 / 60);
|
|
10535
|
-
};
|
|
10536
|
-
};
|
|
10537
|
-
const getWindowScrollTop = () => {
|
|
10538
|
-
return window.pageYOffset !== void 0 ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
|
|
10539
|
-
};
|
|
10540
10542
|
const calculateTopPosition = (el) => {
|
|
10541
10543
|
return !el ? 0 : el.offsetTop + calculateTopPosition(el.offsetParent);
|
|
10542
10544
|
};
|
|
@@ -10544,8 +10546,8 @@
|
|
|
10544
10546
|
let offsetDistance = 0;
|
|
10545
10547
|
let resScrollTop = 0;
|
|
10546
10548
|
let direction = "down";
|
|
10547
|
-
const windowScrollTop = getWindowScrollTop();
|
|
10548
10549
|
if (props.useWindow) {
|
|
10550
|
+
const windowScrollTop = getScrollTopRoot();
|
|
10549
10551
|
if (state.scroller) {
|
|
10550
10552
|
offsetDistance = calculateTopPosition(state.scroller) + state.scroller.offsetHeight - windowScrollTop - window.innerHeight;
|
|
10551
10553
|
}
|
|
@@ -10568,7 +10570,7 @@
|
|
|
10568
10570
|
state.isInfiniting = false;
|
|
10569
10571
|
};
|
|
10570
10572
|
const handleScroll = () => {
|
|
10571
|
-
|
|
10573
|
+
requestAniFrame$1(() => {
|
|
10572
10574
|
if (!isScrollAtBottom() || !props.hasMore || state.isInfiniting) {
|
|
10573
10575
|
return false;
|
|
10574
10576
|
} else {
|
|
@@ -10620,14 +10622,16 @@
|
|
|
10620
10622
|
const getParentElement = (el) => {
|
|
10621
10623
|
return !!props.containerId ? document.querySelector(`#${props.containerId}`) : el && el.parentNode;
|
|
10622
10624
|
};
|
|
10625
|
+
const removeScrollListener = () => {
|
|
10626
|
+
state.scrollEl.removeEventListener("scroll", handleScroll, props.useCapture);
|
|
10627
|
+
};
|
|
10623
10628
|
vue.onMounted(() => {
|
|
10624
10629
|
const parentElement = getParentElement(state.scroller);
|
|
10625
10630
|
state.scrollEl = props.useWindow ? window : parentElement;
|
|
10626
10631
|
scrollListener();
|
|
10627
|
-
console.log(slots);
|
|
10628
10632
|
});
|
|
10629
10633
|
vue.onUnmounted(() => {
|
|
10630
|
-
|
|
10634
|
+
removeScrollListener();
|
|
10631
10635
|
});
|
|
10632
10636
|
const isKeepAlive = vue.ref(false);
|
|
10633
10637
|
vue.onActivated(() => {
|
|
@@ -10638,7 +10642,7 @@
|
|
|
10638
10642
|
});
|
|
10639
10643
|
vue.onDeactivated(() => {
|
|
10640
10644
|
isKeepAlive.value = true;
|
|
10641
|
-
|
|
10645
|
+
removeScrollListener();
|
|
10642
10646
|
});
|
|
10643
10647
|
return {
|
|
10644
10648
|
classes,
|
|
@@ -10661,10 +10665,7 @@
|
|
|
10661
10665
|
class: "bottom-box"
|
|
10662
10666
|
};
|
|
10663
10667
|
const _hoisted_6$e = { class: "bottom-text" };
|
|
10664
|
-
const _hoisted_7$c = {
|
|
10665
|
-
key: 0,
|
|
10666
|
-
class: "tips"
|
|
10667
|
-
};
|
|
10668
|
+
const _hoisted_7$c = { class: "tips" };
|
|
10668
10669
|
function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10669
10670
|
const _component_nut_icon = vue.resolveComponent("nut-icon");
|
|
10670
10671
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -10689,13 +10690,13 @@
|
|
|
10689
10690
|
]),
|
|
10690
10691
|
vue.createElementVNode("view", _hoisted_4$n, [
|
|
10691
10692
|
_ctx.isInfiniting ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_5$f, [
|
|
10692
|
-
|
|
10693
|
+
vue.renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
10693
10694
|
vue.createVNode(_component_nut_icon, vue.mergeProps({ class: "bottom-img" }, _ctx.$attrs, { name: _ctx.loadIcon }), null, 16, ["name"]),
|
|
10694
10695
|
vue.createElementVNode("view", _hoisted_6$e, vue.toDisplayString(_ctx.loadTxt || _ctx.translate("loading")), 1)
|
|
10695
|
-
]
|
|
10696
|
-
])) : !_ctx.hasMore ?
|
|
10697
|
-
|
|
10698
|
-
]
|
|
10696
|
+
])
|
|
10697
|
+
])) : !_ctx.hasMore ? vue.renderSlot(_ctx.$slots, "finished", { key: 1 }, () => [
|
|
10698
|
+
vue.createElementVNode("view", _hoisted_7$c, vue.toDisplayString(_ctx.loadMoreTxt || _ctx.translate("loadMoreTxt")), 1)
|
|
10699
|
+
]) : vue.createCommentVNode("", true)
|
|
10699
10700
|
])
|
|
10700
10701
|
], 34);
|
|
10701
10702
|
}
|
|
@@ -13290,54 +13291,6 @@
|
|
|
13290
13291
|
], 2);
|
|
13291
13292
|
}
|
|
13292
13293
|
var Step = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G]]);
|
|
13293
|
-
const DISTANCE = 5;
|
|
13294
|
-
function useTouch() {
|
|
13295
|
-
const state = vue.reactive({
|
|
13296
|
-
startX: 0,
|
|
13297
|
-
startY: 0,
|
|
13298
|
-
deltaX: 0,
|
|
13299
|
-
deltaY: 0,
|
|
13300
|
-
offsetX: 0,
|
|
13301
|
-
offsetY: 0,
|
|
13302
|
-
direction: ""
|
|
13303
|
-
});
|
|
13304
|
-
const getDirection2 = (x, y) => {
|
|
13305
|
-
if (x > y && x > DISTANCE)
|
|
13306
|
-
return "horizontal";
|
|
13307
|
-
if (y > x && y > DISTANCE)
|
|
13308
|
-
return "vertical";
|
|
13309
|
-
return "";
|
|
13310
|
-
};
|
|
13311
|
-
const reset = () => {
|
|
13312
|
-
state.startX = 0;
|
|
13313
|
-
state.startY = 0;
|
|
13314
|
-
state.deltaX = 0;
|
|
13315
|
-
state.deltaY = 0;
|
|
13316
|
-
state.offsetX = 0;
|
|
13317
|
-
state.offsetY = 0;
|
|
13318
|
-
state.direction = "";
|
|
13319
|
-
};
|
|
13320
|
-
const start = (e) => {
|
|
13321
|
-
reset();
|
|
13322
|
-
state.startX = e.touches[0].clientX;
|
|
13323
|
-
state.startY = e.touches[0].clientY;
|
|
13324
|
-
};
|
|
13325
|
-
const move = (e) => {
|
|
13326
|
-
state.deltaX = e.touches[0].clientX - state.startX;
|
|
13327
|
-
state.deltaY = e.touches[0].clientY - state.startY;
|
|
13328
|
-
state.offsetX = Math.abs(state.deltaX);
|
|
13329
|
-
state.offsetY = Math.abs(state.deltaY);
|
|
13330
|
-
if (!state.direction) {
|
|
13331
|
-
state.direction = getDirection2(state.offsetX, state.offsetY);
|
|
13332
|
-
}
|
|
13333
|
-
};
|
|
13334
|
-
return {
|
|
13335
|
-
state,
|
|
13336
|
-
start,
|
|
13337
|
-
reset,
|
|
13338
|
-
move
|
|
13339
|
-
};
|
|
13340
|
-
}
|
|
13341
13294
|
const { create: create$F, componentName: componentName$u } = createComponent("swiper");
|
|
13342
13295
|
const _sfc_main$F = create$F({
|
|
13343
13296
|
props: {
|
|
@@ -13350,7 +13303,7 @@
|
|
|
13350
13303
|
default: 0
|
|
13351
13304
|
},
|
|
13352
13305
|
direction: {
|
|
13353
|
-
type:
|
|
13306
|
+
type: String,
|
|
13354
13307
|
default: "horizontal"
|
|
13355
13308
|
},
|
|
13356
13309
|
paginationVisible: {
|
|
@@ -13419,11 +13372,25 @@
|
|
|
13419
13372
|
};
|
|
13420
13373
|
});
|
|
13421
13374
|
const isVertical = vue.computed(() => props.direction === "vertical");
|
|
13375
|
+
const classesInner = vue.computed(() => {
|
|
13376
|
+
const prefixCls = componentName$u;
|
|
13377
|
+
return {
|
|
13378
|
+
[`${prefixCls}-inner`]: true,
|
|
13379
|
+
[`${prefixCls}-vertical`]: isVertical.value
|
|
13380
|
+
};
|
|
13381
|
+
});
|
|
13382
|
+
const classesPagination = vue.computed(() => {
|
|
13383
|
+
const prefixCls = componentName$u;
|
|
13384
|
+
return {
|
|
13385
|
+
[`${prefixCls}-pagination`]: true,
|
|
13386
|
+
[`${prefixCls}-pagination-vertical`]: isVertical.value
|
|
13387
|
+
};
|
|
13388
|
+
});
|
|
13422
13389
|
const delTa = vue.computed(() => {
|
|
13423
|
-
return isVertical.value ? touch.
|
|
13390
|
+
return isVertical.value ? touch.deltaY.value : touch.deltaX.value;
|
|
13424
13391
|
});
|
|
13425
13392
|
const isCorrectDirection = vue.computed(() => {
|
|
13426
|
-
return touch.
|
|
13393
|
+
return touch.direction.value === props.direction;
|
|
13427
13394
|
});
|
|
13428
13395
|
const childCount = vue.computed(() => state.children.length);
|
|
13429
13396
|
const size = vue.computed(() => state[isVertical.value ? "height" : "width"]);
|
|
@@ -13438,12 +13405,7 @@
|
|
|
13438
13405
|
const activePagination = vue.computed(() => (state.active + childCount.value) % childCount.value);
|
|
13439
13406
|
const getStyle = () => {
|
|
13440
13407
|
let offset = 0;
|
|
13441
|
-
|
|
13442
|
-
offset = state.offset;
|
|
13443
|
-
} else {
|
|
13444
|
-
let val = isVertical.value ? state.rect.height - size.value : state.rect.width - size.value;
|
|
13445
|
-
offset = state.offset + (state.active === childCount.value - 1 ? -val / 2 : val / 2);
|
|
13446
|
-
}
|
|
13408
|
+
offset = state.offset;
|
|
13447
13409
|
state.style = {
|
|
13448
13410
|
transitionDuration: `${state.moving ? 0 : props.duration}ms`,
|
|
13449
13411
|
transform: `translate${isVertical.value ? "Y" : "X"}(${offset}px)`,
|
|
@@ -13454,26 +13416,27 @@
|
|
|
13454
13416
|
const relation = (child) => {
|
|
13455
13417
|
var _a;
|
|
13456
13418
|
let children = [];
|
|
13419
|
+
const childrenVNodeLen = state.childrenVNode.length;
|
|
13457
13420
|
let slot = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots);
|
|
13458
13421
|
slot = slot.filter((item) => item.children && Array.isArray(item.children));
|
|
13459
13422
|
slot.forEach((item) => {
|
|
13460
13423
|
children = children.concat(item.children);
|
|
13461
13424
|
});
|
|
13462
|
-
if (!
|
|
13425
|
+
if (!childrenVNodeLen) {
|
|
13463
13426
|
state.childrenVNode = children.slice();
|
|
13464
13427
|
child.proxy && state.children.push(child.proxy);
|
|
13465
13428
|
} else {
|
|
13466
|
-
if (
|
|
13429
|
+
if (childrenVNodeLen > children.length) {
|
|
13467
13430
|
state.children = state.children.filter((item) => child.proxy !== item);
|
|
13468
|
-
} else if (
|
|
13469
|
-
for (let i = 0; i <
|
|
13431
|
+
} else if (childrenVNodeLen < children.length) {
|
|
13432
|
+
for (let i = 0; i < childrenVNodeLen; i++) {
|
|
13470
13433
|
if (children[i].key !== state.childrenVNode[i].key) {
|
|
13471
13434
|
child.proxy && state.children.splice(i, 0, child.proxy);
|
|
13472
13435
|
child.vnode && state.childrenVNode.splice(i, 0, child.vnode);
|
|
13473
13436
|
break;
|
|
13474
13437
|
}
|
|
13475
13438
|
}
|
|
13476
|
-
if (
|
|
13439
|
+
if (childrenVNodeLen !== children.length) {
|
|
13477
13440
|
child.proxy && state.children.push(child.proxy);
|
|
13478
13441
|
child.vnode && state.childrenVNode.push(child.vnode);
|
|
13479
13442
|
}
|
|
@@ -13483,12 +13446,6 @@
|
|
|
13483
13446
|
}
|
|
13484
13447
|
}
|
|
13485
13448
|
};
|
|
13486
|
-
const range = (num, min, max) => {
|
|
13487
|
-
return Math.min(Math.max(num, min), max);
|
|
13488
|
-
};
|
|
13489
|
-
const requestFrame = (fn) => {
|
|
13490
|
-
window.requestAnimationFrame.call(window, fn);
|
|
13491
|
-
};
|
|
13492
13449
|
const getOffset = (active, offset = 0) => {
|
|
13493
13450
|
let currentPosition = active * size.value;
|
|
13494
13451
|
if (!props.loop) {
|
|
@@ -13496,7 +13453,7 @@
|
|
|
13496
13453
|
}
|
|
13497
13454
|
let targetOffset = offset - currentPosition;
|
|
13498
13455
|
if (!props.loop) {
|
|
13499
|
-
targetOffset =
|
|
13456
|
+
targetOffset = clamp(targetOffset, minOffset.value, 0);
|
|
13500
13457
|
}
|
|
13501
13458
|
return targetOffset;
|
|
13502
13459
|
};
|
|
@@ -13504,9 +13461,9 @@
|
|
|
13504
13461
|
const { active } = state;
|
|
13505
13462
|
if (pace) {
|
|
13506
13463
|
if (props.loop) {
|
|
13507
|
-
return
|
|
13464
|
+
return clamp(active + pace, -1, childCount.value);
|
|
13508
13465
|
}
|
|
13509
|
-
return
|
|
13466
|
+
return clamp(active + pace, 0, childCount.value - 1);
|
|
13510
13467
|
}
|
|
13511
13468
|
return active;
|
|
13512
13469
|
};
|
|
@@ -13545,48 +13502,39 @@
|
|
|
13545
13502
|
const stopAutoPlay = () => {
|
|
13546
13503
|
clearTimeout(state.autoplayTimer);
|
|
13547
13504
|
};
|
|
13548
|
-
const
|
|
13505
|
+
const jump = (pace) => {
|
|
13549
13506
|
resettPosition();
|
|
13550
13507
|
touch.reset();
|
|
13551
|
-
|
|
13552
|
-
|
|
13508
|
+
requestAniFrame$1(() => {
|
|
13509
|
+
requestAniFrame$1(() => {
|
|
13553
13510
|
state.moving = false;
|
|
13554
13511
|
move({
|
|
13555
|
-
pace
|
|
13512
|
+
pace,
|
|
13556
13513
|
isEmit: true
|
|
13557
13514
|
});
|
|
13558
13515
|
});
|
|
13559
13516
|
});
|
|
13560
13517
|
};
|
|
13518
|
+
const prev = () => {
|
|
13519
|
+
jump(-1);
|
|
13520
|
+
};
|
|
13561
13521
|
const next = () => {
|
|
13562
|
-
|
|
13563
|
-
touch.reset();
|
|
13564
|
-
requestFrame(() => {
|
|
13565
|
-
requestFrame(() => {
|
|
13566
|
-
state.moving = false;
|
|
13567
|
-
move({
|
|
13568
|
-
pace: 1,
|
|
13569
|
-
isEmit: true
|
|
13570
|
-
});
|
|
13571
|
-
});
|
|
13572
|
-
});
|
|
13522
|
+
jump(1);
|
|
13573
13523
|
};
|
|
13574
13524
|
const to = (index) => {
|
|
13575
13525
|
resettPosition();
|
|
13576
13526
|
touch.reset();
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13588
|
-
isEmit: true
|
|
13589
|
-
});
|
|
13527
|
+
requestAniFrame$1(() => {
|
|
13528
|
+
state.moving = false;
|
|
13529
|
+
let targetIndex;
|
|
13530
|
+
if (props.loop && childCount.value === index) {
|
|
13531
|
+
targetIndex = state.active === 0 ? 0 : index;
|
|
13532
|
+
} else {
|
|
13533
|
+
targetIndex = index % childCount.value;
|
|
13534
|
+
}
|
|
13535
|
+
move({
|
|
13536
|
+
pace: targetIndex - state.active,
|
|
13537
|
+
isEmit: true
|
|
13590
13538
|
});
|
|
13591
13539
|
});
|
|
13592
13540
|
};
|
|
@@ -13640,7 +13588,7 @@
|
|
|
13640
13588
|
const isShouldMove = Math.abs(speed) > 0.3 || Math.abs(delTa.value) > +(size.value / 2).toFixed(2);
|
|
13641
13589
|
if (isShouldMove && isCorrectDirection.value) {
|
|
13642
13590
|
let pace = 0;
|
|
13643
|
-
const offset = isVertical.value ? touch.
|
|
13591
|
+
const offset = isVertical.value ? touch.offsetY.value : touch.offsetX.value;
|
|
13644
13592
|
if (props.loop) {
|
|
13645
13593
|
pace = offset > 0 ? delTa.value > 0 ? -1 : 1 : 0;
|
|
13646
13594
|
} else {
|
|
@@ -13698,10 +13646,9 @@
|
|
|
13698
13646
|
return {
|
|
13699
13647
|
state,
|
|
13700
13648
|
classes,
|
|
13649
|
+
classesInner,
|
|
13650
|
+
classesPagination,
|
|
13701
13651
|
container,
|
|
13702
|
-
componentName: componentName$u,
|
|
13703
|
-
isVertical,
|
|
13704
|
-
slots,
|
|
13705
13652
|
activePagination,
|
|
13706
13653
|
onTouchStart,
|
|
13707
13654
|
onTouchMove,
|
|
@@ -13719,21 +13666,15 @@
|
|
|
13719
13666
|
onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
|
|
13720
13667
|
}, [
|
|
13721
13668
|
vue.createElementVNode("view", {
|
|
13722
|
-
class: vue.normalizeClass(
|
|
13723
|
-
[`${_ctx.componentName}-inner`]: true,
|
|
13724
|
-
[`${_ctx.componentName}-vertical`]: _ctx.isVertical
|
|
13725
|
-
}),
|
|
13669
|
+
class: vue.normalizeClass(_ctx.classesInner),
|
|
13726
13670
|
style: vue.normalizeStyle(_ctx.state.style)
|
|
13727
13671
|
}, [
|
|
13728
13672
|
vue.renderSlot(_ctx.$slots, "default")
|
|
13729
13673
|
], 6),
|
|
13730
13674
|
vue.renderSlot(_ctx.$slots, "page"),
|
|
13731
|
-
_ctx.paginationVisible && !_ctx
|
|
13675
|
+
_ctx.paginationVisible && !_ctx.$slots.page ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
13732
13676
|
key: 0,
|
|
13733
|
-
class: vue.normalizeClass(
|
|
13734
|
-
[`${_ctx.componentName}-pagination`]: true,
|
|
13735
|
-
[`${_ctx.componentName}-pagination-vertical`]: _ctx.isVertical
|
|
13736
|
-
})
|
|
13677
|
+
class: vue.normalizeClass(_ctx.classesPagination)
|
|
13737
13678
|
}, [
|
|
13738
13679
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.state.children.length, (item, index) => {
|
|
13739
13680
|
return vue.openBlock(), vue.createElementBlock("i", {
|
|
@@ -13825,12 +13766,17 @@
|
|
|
13825
13766
|
size: {
|
|
13826
13767
|
type: String,
|
|
13827
13768
|
default: "large"
|
|
13769
|
+
},
|
|
13770
|
+
strikeThrough: {
|
|
13771
|
+
type: Boolean,
|
|
13772
|
+
default: false
|
|
13828
13773
|
}
|
|
13829
13774
|
},
|
|
13830
13775
|
setup(props) {
|
|
13831
13776
|
const classes = vue.computed(() => {
|
|
13832
13777
|
return {
|
|
13833
|
-
[componentName$s]: true
|
|
13778
|
+
[componentName$s]: true,
|
|
13779
|
+
[`${componentName$s}--strike`]: props.strikeThrough
|
|
13834
13780
|
};
|
|
13835
13781
|
});
|
|
13836
13782
|
const showSymbol = vue.computed(() => {
|
|
@@ -13949,7 +13895,7 @@
|
|
|
13949
13895
|
displayWidth: 0,
|
|
13950
13896
|
displayHeight: 0
|
|
13951
13897
|
});
|
|
13952
|
-
const touch = useTouch
|
|
13898
|
+
const touch = useTouch();
|
|
13953
13899
|
const vertical = vue.computed(() => {
|
|
13954
13900
|
const { rootWidth, rootHeight } = props;
|
|
13955
13901
|
const rootRatio = rootHeight / rootWidth;
|
|
@@ -14107,7 +14053,6 @@
|
|
|
14107
14053
|
checkTap();
|
|
14108
14054
|
touch.reset();
|
|
14109
14055
|
};
|
|
14110
|
-
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
|
14111
14056
|
const closeSwiper = () => {
|
|
14112
14057
|
emit("close");
|
|
14113
14058
|
};
|
|
@@ -15362,6 +15307,7 @@
|
|
|
15362
15307
|
theme: { type: String, default: "light" },
|
|
15363
15308
|
location: { type: String, default: "bottom" },
|
|
15364
15309
|
offset: { type: Array, default: [0, 12] },
|
|
15310
|
+
arrowOffset: { type: Number, default: 0 },
|
|
15365
15311
|
customClass: { type: String, default: "" },
|
|
15366
15312
|
showArrow: { type: Boolean, default: true },
|
|
15367
15313
|
iconPrefix: { type: String, default: "nut-icon" },
|
|
@@ -15371,52 +15317,128 @@
|
|
|
15371
15317
|
overlayStyle: { type: Object },
|
|
15372
15318
|
closeOnClickOverlay: { type: Boolean, default: true },
|
|
15373
15319
|
closeOnClickAction: { type: Boolean, default: true },
|
|
15374
|
-
closeOnClickOutside: { type: Boolean, default: true }
|
|
15320
|
+
closeOnClickOutside: { type: Boolean, default: true },
|
|
15321
|
+
targetId: { type: String, default: "" },
|
|
15322
|
+
bgColor: { type: String, default: "" }
|
|
15375
15323
|
},
|
|
15376
15324
|
emits: ["update", "update:visible", "close", "choose", "open"],
|
|
15377
15325
|
setup(props, { emit }) {
|
|
15378
15326
|
const popoverRef = vue.ref();
|
|
15379
15327
|
const popoverContentRef = vue.ref();
|
|
15380
15328
|
const showPopup = vue.ref(props.visible);
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
rootHeight: 0
|
|
15384
|
-
});
|
|
15329
|
+
let rootRect = vue.ref();
|
|
15330
|
+
let conentRootRect = vue.ref();
|
|
15385
15331
|
const popoverArrow = vue.computed(() => {
|
|
15386
15332
|
const prefixCls = "nut-popover-arrow";
|
|
15387
15333
|
const loca = props.location;
|
|
15388
15334
|
const direction = loca.split("-")[0];
|
|
15389
15335
|
return `${prefixCls} ${prefixCls}-${direction} ${prefixCls}--${loca}`;
|
|
15390
15336
|
});
|
|
15391
|
-
const
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15337
|
+
const popoverArrowStyle = vue.computed(() => {
|
|
15338
|
+
const styles = {};
|
|
15339
|
+
const { bgColor, arrowOffset, location: location2 } = props;
|
|
15340
|
+
const direction = location2.split("-")[0];
|
|
15341
|
+
const skew = location2.split("-")[1];
|
|
15342
|
+
const base = 16;
|
|
15343
|
+
if (bgColor) {
|
|
15344
|
+
styles[`border${upperCaseFirst(direction)}Color`] = bgColor;
|
|
15345
|
+
}
|
|
15346
|
+
if (props.arrowOffset != 0) {
|
|
15347
|
+
if (["bottom", "top"].includes(direction)) {
|
|
15348
|
+
if (!skew) {
|
|
15349
|
+
styles.left = `calc(50% + ${arrowOffset}px)`;
|
|
15350
|
+
}
|
|
15351
|
+
if (skew == "start") {
|
|
15352
|
+
styles.left = `${base + arrowOffset}px`;
|
|
15353
|
+
}
|
|
15354
|
+
if (skew == "end") {
|
|
15355
|
+
styles.right = `${base - arrowOffset}px`;
|
|
15356
|
+
}
|
|
15357
|
+
}
|
|
15358
|
+
if (["left", "right"].includes(direction)) {
|
|
15359
|
+
if (!skew) {
|
|
15360
|
+
styles.top = `calc(50% - ${arrowOffset}px)`;
|
|
15361
|
+
}
|
|
15362
|
+
if (skew == "start") {
|
|
15363
|
+
styles.top = `${base - arrowOffset}px`;
|
|
15364
|
+
}
|
|
15365
|
+
if (skew == "end") {
|
|
15366
|
+
styles.bottom = `${base + arrowOffset}px`;
|
|
15367
|
+
}
|
|
15368
|
+
}
|
|
15369
|
+
}
|
|
15370
|
+
return styles;
|
|
15371
|
+
});
|
|
15372
|
+
const upperCaseFirst = (str) => {
|
|
15373
|
+
var str = str.toLowerCase();
|
|
15374
|
+
str = str.replace(/\b\w+\b/g, (word) => word.substring(0, 1).toUpperCase() + word.substring(1));
|
|
15375
|
+
return str;
|
|
15376
|
+
};
|
|
15377
|
+
const getRootPosition = vue.computed(() => {
|
|
15378
|
+
let styles = {};
|
|
15379
|
+
if (!rootRect.value || !conentRootRect.value)
|
|
15380
|
+
return {};
|
|
15381
|
+
const conentWidth = conentRootRect.value.width;
|
|
15382
|
+
const conentHeight = conentRootRect.value.height;
|
|
15383
|
+
const { width, height, left, top } = rootRect.value;
|
|
15384
|
+
const { location: location2, offset } = props;
|
|
15385
|
+
const direction = location2.split("-")[0];
|
|
15386
|
+
const skew = location2.split("-")[1];
|
|
15387
|
+
let cross = 0;
|
|
15388
|
+
let parallel = 0;
|
|
15395
15389
|
if (isArray(offset) && offset.length == 2) {
|
|
15396
15390
|
cross += +offset[1];
|
|
15397
|
-
|
|
15391
|
+
parallel += +offset[0];
|
|
15392
|
+
}
|
|
15393
|
+
if (width) {
|
|
15394
|
+
if (["bottom", "top"].includes(direction)) {
|
|
15395
|
+
const h = direction == "bottom" ? height + cross : -(conentHeight + cross);
|
|
15396
|
+
styles.top = `${top + h}px`;
|
|
15397
|
+
if (!skew) {
|
|
15398
|
+
styles.left = `${-(conentWidth - width) / 2 + left + parallel}px`;
|
|
15399
|
+
}
|
|
15400
|
+
if (skew == "start") {
|
|
15401
|
+
styles.left = `${left + parallel}px`;
|
|
15402
|
+
}
|
|
15403
|
+
if (skew == "end") {
|
|
15404
|
+
styles.left = `${rootRect.value.right + parallel}px`;
|
|
15405
|
+
}
|
|
15406
|
+
}
|
|
15407
|
+
if (["left", "right"].includes(direction)) {
|
|
15408
|
+
const contentW = direction == "left" ? -(conentWidth + cross) : width + cross;
|
|
15409
|
+
styles.left = `${left + contentW}px`;
|
|
15410
|
+
if (!skew) {
|
|
15411
|
+
styles.top = `${top - conentHeight / 2 + height / 2 - 4 + parallel}px`;
|
|
15412
|
+
}
|
|
15413
|
+
if (skew == "start") {
|
|
15414
|
+
styles.top = `${top + parallel}px`;
|
|
15415
|
+
}
|
|
15416
|
+
if (skew == "end") {
|
|
15417
|
+
styles.top = `${top + height + parallel}px`;
|
|
15418
|
+
}
|
|
15419
|
+
}
|
|
15398
15420
|
}
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
right: "left"
|
|
15406
|
-
};
|
|
15407
|
-
if (["top", "bottom"].includes(direction)) {
|
|
15408
|
-
style[mapd[direction]] = `${cross}px`;
|
|
15409
|
-
style.marginLeft = `${offset[0]}px`;
|
|
15410
|
-
} else {
|
|
15411
|
-
style[mapd[direction]] = `${lengthways}px`;
|
|
15412
|
-
style.marginTop = `${offset[0]}px`;
|
|
15421
|
+
return styles;
|
|
15422
|
+
});
|
|
15423
|
+
const customStyle = vue.computed(() => {
|
|
15424
|
+
const styles = {};
|
|
15425
|
+
if (props.bgColor) {
|
|
15426
|
+
styles.background = props.bgColor;
|
|
15413
15427
|
}
|
|
15414
|
-
return
|
|
15428
|
+
return styles;
|
|
15415
15429
|
});
|
|
15416
15430
|
const getContentWidth = () => {
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15431
|
+
let rect2 = useRect(popoverRef.value);
|
|
15432
|
+
if (props.targetId) {
|
|
15433
|
+
rect2 = useRect(document.querySelector(`#${props.targetId}`));
|
|
15434
|
+
}
|
|
15435
|
+
rootRect.value = rect2;
|
|
15436
|
+
setTimeout(() => {
|
|
15437
|
+
conentRootRect.value = {
|
|
15438
|
+
height: popoverContentRef.value.clientHeight,
|
|
15439
|
+
width: popoverContentRef.value.clientWidth
|
|
15440
|
+
};
|
|
15441
|
+
}, 0);
|
|
15420
15442
|
};
|
|
15421
15443
|
vue.watch(
|
|
15422
15444
|
() => props.visible,
|
|
@@ -15451,7 +15473,12 @@
|
|
|
15451
15473
|
const clickAway = (event) => {
|
|
15452
15474
|
const element = popoverRef.value;
|
|
15453
15475
|
const elContent = popoverContentRef.value;
|
|
15454
|
-
|
|
15476
|
+
let el = element && !element.contains(event.target);
|
|
15477
|
+
if (props.targetId) {
|
|
15478
|
+
const dom = document.querySelector(`#${props.targetId}`);
|
|
15479
|
+
el = dom && !dom.contains(event.target);
|
|
15480
|
+
}
|
|
15481
|
+
if (el && elContent && !elContent.contains(event.target) && props.closeOnClickOutside) {
|
|
15455
15482
|
closePopover();
|
|
15456
15483
|
}
|
|
15457
15484
|
};
|
|
@@ -15462,8 +15489,10 @@
|
|
|
15462
15489
|
closePopover,
|
|
15463
15490
|
chooseItem,
|
|
15464
15491
|
popoverRef,
|
|
15465
|
-
|
|
15466
|
-
|
|
15492
|
+
popoverContentRef,
|
|
15493
|
+
getRootPosition,
|
|
15494
|
+
customStyle,
|
|
15495
|
+
popoverArrowStyle
|
|
15467
15496
|
};
|
|
15468
15497
|
}
|
|
15469
15498
|
});
|
|
@@ -15474,59 +15503,64 @@
|
|
|
15474
15503
|
const _hoisted_2$o = ["onClick"];
|
|
15475
15504
|
const _hoisted_3$m = { class: "nut-popover-menu-item-name" };
|
|
15476
15505
|
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15477
|
-
const
|
|
15506
|
+
const _component_Icon = vue.resolveComponent("Icon");
|
|
15478
15507
|
const _component_nut_popup = vue.resolveComponent("nut-popup");
|
|
15479
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
15480
|
-
|
|
15481
|
-
|
|
15482
|
-
vue.createElementVNode("view", {
|
|
15508
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
15509
|
+
!_ctx.targetId ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
15510
|
+
key: 0,
|
|
15483
15511
|
class: "nut-popover-wrapper",
|
|
15484
15512
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.openPopover && _ctx.openPopover(...args)),
|
|
15485
15513
|
ref: "popoverRef"
|
|
15486
15514
|
}, [
|
|
15487
15515
|
vue.renderSlot(_ctx.$slots, "reference")
|
|
15488
|
-
], 512),
|
|
15489
|
-
vue.
|
|
15490
|
-
|
|
15491
|
-
style: vue.normalizeStyle(_ctx.
|
|
15492
|
-
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
|
|
15498
|
-
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15503
|
-
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15507
|
-
|
|
15508
|
-
|
|
15509
|
-
|
|
15510
|
-
|
|
15511
|
-
|
|
15512
|
-
|
|
15513
|
-
|
|
15514
|
-
|
|
15515
|
-
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
|
|
15522
|
-
|
|
15523
|
-
|
|
15524
|
-
|
|
15525
|
-
|
|
15526
|
-
|
|
15527
|
-
|
|
15528
|
-
|
|
15529
|
-
|
|
15516
|
+
], 512)) : vue.createCommentVNode("", true),
|
|
15517
|
+
vue.createElementVNode("view", {
|
|
15518
|
+
class: vue.normalizeClass(["nut-popover", `nut-popover--${_ctx.theme}`, `${_ctx.customClass}`]),
|
|
15519
|
+
style: vue.normalizeStyle(_ctx.getRootPosition)
|
|
15520
|
+
}, [
|
|
15521
|
+
vue.createVNode(_component_nut_popup, {
|
|
15522
|
+
popClass: `nut-popover-content nut-popover-content--${_ctx.location}`,
|
|
15523
|
+
style: vue.normalizeStyle(_ctx.customStyle),
|
|
15524
|
+
visible: _ctx.showPopup,
|
|
15525
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.showPopup = $event),
|
|
15526
|
+
position: "",
|
|
15527
|
+
transition: "nut-popover",
|
|
15528
|
+
overlay: _ctx.overlay,
|
|
15529
|
+
duration: _ctx.duration,
|
|
15530
|
+
overlayStyle: _ctx.overlayStyle,
|
|
15531
|
+
overlayClass: _ctx.overlayClass,
|
|
15532
|
+
closeOnClickOverlay: _ctx.closeOnClickOverlay
|
|
15533
|
+
}, {
|
|
15534
|
+
default: vue.withCtx(() => [
|
|
15535
|
+
vue.createElementVNode("view", _hoisted_1$r, [
|
|
15536
|
+
_ctx.showArrow ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
15537
|
+
key: 0,
|
|
15538
|
+
class: vue.normalizeClass(_ctx.popoverArrow),
|
|
15539
|
+
style: vue.normalizeStyle(_ctx.popoverArrowStyle)
|
|
15540
|
+
}, null, 6)) : vue.createCommentVNode("", true),
|
|
15541
|
+
vue.renderSlot(_ctx.$slots, "content"),
|
|
15542
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item, index) => {
|
|
15543
|
+
return vue.openBlock(), vue.createElementBlock("view", {
|
|
15544
|
+
key: index,
|
|
15545
|
+
class: vue.normalizeClass([item.className, item.disabled && "nut-popover-menu-disabled", "nut-popover-menu-item"]),
|
|
15546
|
+
onClick: vue.withModifiers(($event) => _ctx.chooseItem(item, index), ["stop"])
|
|
15547
|
+
}, [
|
|
15548
|
+
item.icon ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
15549
|
+
vue.createVNode(_component_Icon, vue.mergeProps(_ctx.$attrs, {
|
|
15550
|
+
class: "nut-popover-item-img",
|
|
15551
|
+
classPrefix: _ctx.iconPrefix,
|
|
15552
|
+
name: item.icon
|
|
15553
|
+
}), null, 16, ["classPrefix", "name"])
|
|
15554
|
+
]) : vue.createCommentVNode("", true),
|
|
15555
|
+
vue.createElementVNode("view", _hoisted_3$m, vue.toDisplayString(item.name), 1)
|
|
15556
|
+
], 10, _hoisted_2$o);
|
|
15557
|
+
}), 128))
|
|
15558
|
+
], 512)
|
|
15559
|
+
]),
|
|
15560
|
+
_: 3
|
|
15561
|
+
}, 8, ["popClass", "style", "visible", "overlay", "duration", "overlayStyle", "overlayClass", "closeOnClickOverlay"])
|
|
15562
|
+
], 6)
|
|
15563
|
+
], 64);
|
|
15530
15564
|
}
|
|
15531
15565
|
var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$w]]);
|
|
15532
15566
|
const component$1 = {
|
|
@@ -19848,7 +19882,7 @@
|
|
|
19848
19882
|
}
|
|
19849
19883
|
});
|
|
19850
19884
|
}
|
|
19851
|
-
const version = "3.3.
|
|
19885
|
+
const version = "3.3.1-beta.1";
|
|
19852
19886
|
var nutui_vue_build = { install, version, Locale };
|
|
19853
19887
|
exports2.ActionSheet = ActionSheet;
|
|
19854
19888
|
exports2.Address = Address;
|