@nutui/nutui 3.3.0 → 3.3.1-beta.0
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 +324 -295
- package/dist/nutui.umd.js +320 -291
- 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 +1 -1
- 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 +55 -55
- package/dist/styles/themes/jdb.scss +55 -55
- package/dist/styles/themes/jddkh.scss +55 -55
- package/dist/styles/themes/jdt.scss +55 -55
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +1 -1
- package/dist/types/__VUE/address/index.vue.d.ts +2 -2
- 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/calendaritem/index.vue.d.ts +4 -4
- package/dist/types/__VUE/cell/index.vue.d.ts +5 -5
- 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 +1 -1
- package/dist/types/__VUE/dialog/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/index.vue.d.ts +2 -2
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/picker/Column.vue.d.ts +4 -4
- package/dist/types/__VUE/picker/index.vue.d.ts +23 -5
- package/dist/types/__VUE/popover/index.vue.d.ts +33 -4
- package/dist/types/__VUE/popover/type.d.ts +7 -0
- 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/rate/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- 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/switch/index.vue.d.ts +1 -1
- 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/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/__VUE/swiper/use-touch.d.ts +0 -20
package/dist/nutui.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.3.0 Fri Dec
|
|
2
|
+
* @nutui/nutui v3.3.1-beta.0 Fri Dec 16 2022 15:46:54 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, ref, defineComponent, createApp, h, toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, mergeProps, renderSlot, getCurrentInstance, Fragment, toDisplayString, createTextVNode, watchEffect, Transition, withCtx, withDirectives, withModifiers, vShow, watch, Teleport, createVNode, useSlots, inject, provide, unref, onMounted, onUnmounted, shallowReactive, markRaw, isVNode, nextTick, renderList, onActivated, createSlots, onBeforeUnmount, onBeforeMount, resolveDynamicComponent, readonly, vModelText, onDeactivated, render as render$
|
|
6
|
+
import { reactive, ref, defineComponent, createApp, h, toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, mergeProps, renderSlot, getCurrentInstance, Fragment, toDisplayString, createTextVNode, watchEffect, Transition, withCtx, withDirectives, withModifiers, vShow, watch, Teleport, createVNode, useSlots, inject, provide, unref, onMounted, onUnmounted, shallowReactive, markRaw, isVNode, nextTick, renderList, onActivated, createSlots, onBeforeUnmount, onBeforeMount, resolveDynamicComponent, readonly, vModelText, onDeactivated, render as render$3, normalizeProps, guardReactiveProps, useCssVars } from "vue";
|
|
7
7
|
class BaseLang {
|
|
8
8
|
}
|
|
9
9
|
class Lang$1 extends BaseLang {
|
|
@@ -350,6 +350,10 @@ const padZero = (num, length = 2) => {
|
|
|
350
350
|
}
|
|
351
351
|
return num.toString();
|
|
352
352
|
};
|
|
353
|
+
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
|
354
|
+
const getScrollTopRoot = () => {
|
|
355
|
+
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
356
|
+
};
|
|
353
357
|
const langs = reactive({
|
|
354
358
|
"zh-CN": new Lang$1(),
|
|
355
359
|
"en-US": new Lang()
|
|
@@ -576,7 +580,7 @@ const _sfc_main$1M = create$1M({
|
|
|
576
580
|
}
|
|
577
581
|
});
|
|
578
582
|
const _hoisted_1$1f = { class: "nut-button__warp" };
|
|
579
|
-
function _sfc_render$
|
|
583
|
+
function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
580
584
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
581
585
|
return openBlock(), createElementBlock("view", {
|
|
582
586
|
class: normalizeClass(_ctx.classes),
|
|
@@ -604,7 +608,7 @@ function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
604
608
|
])
|
|
605
609
|
], 6);
|
|
606
610
|
}
|
|
607
|
-
var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$
|
|
611
|
+
var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1A]]);
|
|
608
612
|
function useRouter() {
|
|
609
613
|
const proxy = getCurrentInstance().proxy;
|
|
610
614
|
return proxy.$router || null;
|
|
@@ -619,7 +623,7 @@ const _hoisted_2$11 = {
|
|
|
619
623
|
};
|
|
620
624
|
const _hoisted_3$N = { class: "title" };
|
|
621
625
|
const _hoisted_4$C = { class: "nut-cell__title-desc" };
|
|
622
|
-
function render$
|
|
626
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
623
627
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
624
628
|
return openBlock(), createElementBlock("view", {
|
|
625
629
|
class: normalizeClass(_ctx.classes),
|
|
@@ -708,7 +712,7 @@ const _sfc_main$1L = create$1L({
|
|
|
708
712
|
};
|
|
709
713
|
}
|
|
710
714
|
});
|
|
711
|
-
var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", render$
|
|
715
|
+
var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", render$2]]);
|
|
712
716
|
const { componentName: componentName$1g, create: create$1K } = createComponent("cell-group");
|
|
713
717
|
const _sfc_main$1K = create$1K({
|
|
714
718
|
props: {
|
|
@@ -736,7 +740,7 @@ const _hoisted_2$10 = {
|
|
|
736
740
|
class: "nut-cell-group__desc"
|
|
737
741
|
};
|
|
738
742
|
const _hoisted_3$M = { class: "nut-cell-group__warp" };
|
|
739
|
-
function _sfc_render$
|
|
743
|
+
function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
740
744
|
return openBlock(), createElementBlock("view", {
|
|
741
745
|
class: normalizeClass(_ctx.classes)
|
|
742
746
|
}, [
|
|
@@ -747,7 +751,7 @@ function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
747
751
|
])
|
|
748
752
|
], 2);
|
|
749
753
|
}
|
|
750
|
-
var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$
|
|
754
|
+
var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1z]]);
|
|
751
755
|
let count = 0;
|
|
752
756
|
const CLSNAME = "nut-overflow-hidden";
|
|
753
757
|
const useLockScroll = (isLock) => {
|
|
@@ -825,7 +829,7 @@ const _sfc_main$1J = create$1J({
|
|
|
825
829
|
return { classes, style, onClick };
|
|
826
830
|
}
|
|
827
831
|
});
|
|
828
|
-
function _sfc_render$
|
|
832
|
+
function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
829
833
|
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
830
834
|
default: withCtx(() => [
|
|
831
835
|
withDirectives(createElementVNode("view", {
|
|
@@ -841,7 +845,7 @@ function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
841
845
|
_: 3
|
|
842
846
|
});
|
|
843
847
|
}
|
|
844
|
-
var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$
|
|
848
|
+
var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1y]]);
|
|
845
849
|
const popupProps = {
|
|
846
850
|
visible: {
|
|
847
851
|
type: Boolean,
|
|
@@ -1016,7 +1020,7 @@ const component$9 = (componentName2) => {
|
|
|
1016
1020
|
};
|
|
1017
1021
|
const { componentName: componentName$1e, create: create$1I } = createComponent("popup");
|
|
1018
1022
|
const _sfc_main$1I = create$1I(component$9(componentName$1e));
|
|
1019
|
-
function _sfc_render$
|
|
1023
|
+
function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1020
1024
|
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
1021
1025
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
1022
1026
|
return openBlock(), createBlock(Teleport, {
|
|
@@ -1062,7 +1066,7 @@ function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1062
1066
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
1063
1067
|
], 8, ["to", "disabled"]);
|
|
1064
1068
|
}
|
|
1065
|
-
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$
|
|
1069
|
+
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1x]]);
|
|
1066
1070
|
const component$8 = {
|
|
1067
1071
|
props: {
|
|
1068
1072
|
theme: { type: String, default: "" },
|
|
@@ -1185,7 +1189,7 @@ const _hoisted_3$L = {
|
|
|
1185
1189
|
key: 1,
|
|
1186
1190
|
class: "nut-img-error"
|
|
1187
1191
|
};
|
|
1188
|
-
function _sfc_render$
|
|
1192
|
+
function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1189
1193
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
1190
1194
|
return openBlock(), createElementBlock("view", {
|
|
1191
1195
|
class: normalizeClass(_ctx.classes),
|
|
@@ -1216,7 +1220,7 @@ function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1216
1220
|
])) : createCommentVNode("", true)
|
|
1217
1221
|
], 6);
|
|
1218
1222
|
}
|
|
1219
|
-
var Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$
|
|
1223
|
+
var Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1w]]);
|
|
1220
1224
|
const { create: create$1F } = createComponent("layout");
|
|
1221
1225
|
const _sfc_main$1F = create$1F({});
|
|
1222
1226
|
const { componentName: componentName$1b, create: create$1E } = createComponent("col");
|
|
@@ -1255,7 +1259,7 @@ const _sfc_main$1E = create$1E({
|
|
|
1255
1259
|
};
|
|
1256
1260
|
}
|
|
1257
1261
|
});
|
|
1258
|
-
function _sfc_render$
|
|
1262
|
+
function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1259
1263
|
return openBlock(), createElementBlock("view", {
|
|
1260
1264
|
class: normalizeClass(_ctx.classes),
|
|
1261
1265
|
style: normalizeStyle(_ctx.style)
|
|
@@ -1263,7 +1267,7 @@ function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1263
1267
|
renderSlot(_ctx.$slots, "default")
|
|
1264
1268
|
], 6);
|
|
1265
1269
|
}
|
|
1266
|
-
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$
|
|
1270
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1v]]);
|
|
1267
1271
|
const { componentName: componentName$1a, create: create$1D } = createComponent("row");
|
|
1268
1272
|
const _sfc_main$1D = create$1D({
|
|
1269
1273
|
props: {
|
|
@@ -1309,14 +1313,14 @@ const _sfc_main$1D = create$1D({
|
|
|
1309
1313
|
};
|
|
1310
1314
|
}
|
|
1311
1315
|
});
|
|
1312
|
-
function _sfc_render$
|
|
1316
|
+
function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1313
1317
|
return openBlock(), createElementBlock("view", {
|
|
1314
1318
|
class: normalizeClass(_ctx.getClasses())
|
|
1315
1319
|
}, [
|
|
1316
1320
|
renderSlot(_ctx.$slots, "default")
|
|
1317
1321
|
], 2);
|
|
1318
1322
|
}
|
|
1319
|
-
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$
|
|
1323
|
+
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1u]]);
|
|
1320
1324
|
function isWindow(val) {
|
|
1321
1325
|
return val === window;
|
|
1322
1326
|
}
|
|
@@ -1539,7 +1543,7 @@ const _sfc_main$1B = create$1B({
|
|
|
1539
1543
|
return { classes };
|
|
1540
1544
|
}
|
|
1541
1545
|
});
|
|
1542
|
-
function _sfc_render$
|
|
1546
|
+
function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1543
1547
|
return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("view", {
|
|
1544
1548
|
key: 0,
|
|
1545
1549
|
class: normalizeClass(_ctx.classes)
|
|
@@ -1550,7 +1554,7 @@ function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1550
1554
|
class: normalizeClass(_ctx.classes)
|
|
1551
1555
|
}, null, 2));
|
|
1552
1556
|
}
|
|
1553
|
-
var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$
|
|
1557
|
+
var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1t]]);
|
|
1554
1558
|
function flattenVNodes(children, childName) {
|
|
1555
1559
|
const result = [];
|
|
1556
1560
|
const traverse = (children2) => {
|
|
@@ -1804,7 +1808,7 @@ const _hoisted_1$1b = {
|
|
|
1804
1808
|
key: 3,
|
|
1805
1809
|
class: "nut-grid-item__text"
|
|
1806
1810
|
};
|
|
1807
|
-
function _sfc_render$
|
|
1811
|
+
function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1808
1812
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
1809
1813
|
return openBlock(), createElementBlock("view", {
|
|
1810
1814
|
class: normalizeClass(_ctx.rootClass),
|
|
@@ -1827,7 +1831,7 @@ function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1827
1831
|
], 2)
|
|
1828
1832
|
], 6);
|
|
1829
1833
|
}
|
|
1830
|
-
var GridItem = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$
|
|
1834
|
+
var GridItem = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1s]]);
|
|
1831
1835
|
const { componentName: componentName$15, create: create$1y } = createComponent("navbar");
|
|
1832
1836
|
const _sfc_main$1y = create$1y({
|
|
1833
1837
|
props: {
|
|
@@ -1933,7 +1937,7 @@ const _hoisted_7$l = {
|
|
|
1933
1937
|
key: 0,
|
|
1934
1938
|
class: "nut-navbar__text"
|
|
1935
1939
|
};
|
|
1936
|
-
function _sfc_render$
|
|
1940
|
+
function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1937
1941
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
1938
1942
|
return _ctx.fixed && _ctx.placeholder ? (openBlock(), createElementBlock("view", _hoisted_1$1a, [
|
|
1939
1943
|
createElementVNode("view", {
|
|
@@ -2017,7 +2021,7 @@ function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2017
2021
|
])
|
|
2018
2022
|
], 6));
|
|
2019
2023
|
}
|
|
2020
|
-
var Navbar = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$
|
|
2024
|
+
var Navbar = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1r]]);
|
|
2021
2025
|
const { componentName: componentName$14, translate: translate$s } = createComponent("fixednav");
|
|
2022
2026
|
const component$6 = {
|
|
2023
2027
|
props: {
|
|
@@ -2092,7 +2096,7 @@ const _hoisted_5$r = {
|
|
|
2092
2096
|
class: "b"
|
|
2093
2097
|
};
|
|
2094
2098
|
const _hoisted_6$o = { class: "text" };
|
|
2095
|
-
function render$
|
|
2099
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2096
2100
|
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
2097
2101
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
2098
2102
|
return openBlock(), createElementBlock("view", {
|
|
@@ -2138,7 +2142,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2138
2142
|
}
|
|
2139
2143
|
const { create: create$1x } = createComponent("fixednav");
|
|
2140
2144
|
const _sfc_main$1x = create$1x(component$6);
|
|
2141
|
-
var FixedNav = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", render$
|
|
2145
|
+
var FixedNav = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", render$1]]);
|
|
2142
2146
|
const { componentName: componentName$13, create: create$1w } = createComponent("menu");
|
|
2143
2147
|
const _sfc_main$1w = create$1w({
|
|
2144
2148
|
props: {
|
|
@@ -2290,7 +2294,7 @@ const _sfc_main$1w = create$1w({
|
|
|
2290
2294
|
});
|
|
2291
2295
|
const _hoisted_1$18 = ["onClick"];
|
|
2292
2296
|
const _hoisted_2$Y = { class: "nut-menu__title-text" };
|
|
2293
|
-
function _sfc_render$
|
|
2297
|
+
function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2294
2298
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
2295
2299
|
return openBlock(), createElementBlock("view", {
|
|
2296
2300
|
class: normalizeClass(_ctx.classes)
|
|
@@ -2322,7 +2326,7 @@ function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2322
2326
|
renderSlot(_ctx.$slots, "default")
|
|
2323
2327
|
], 2);
|
|
2324
2328
|
}
|
|
2325
|
-
var Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$
|
|
2329
|
+
var Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1q]]);
|
|
2326
2330
|
const { componentName: componentName$12, create: create$1v } = createComponent("menu-item");
|
|
2327
2331
|
const _sfc_main$1v = create$1v({
|
|
2328
2332
|
props: {
|
|
@@ -2439,7 +2443,7 @@ const _sfc_main$1v = create$1v({
|
|
|
2439
2443
|
});
|
|
2440
2444
|
const _hoisted_1$17 = { class: "nut-menu-item__content nut-menu-item__overflow" };
|
|
2441
2445
|
const _hoisted_2$X = ["onClick"];
|
|
2442
|
-
function _sfc_render$
|
|
2446
|
+
function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2443
2447
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
2444
2448
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
2445
2449
|
return withDirectives((openBlock(), createElementBlock("view", {
|
|
@@ -2497,7 +2501,7 @@ function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2497
2501
|
[vShow, _ctx.state.showWrapper]
|
|
2498
2502
|
]);
|
|
2499
2503
|
}
|
|
2500
|
-
var MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$
|
|
2504
|
+
var MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1p]]);
|
|
2501
2505
|
const { create: create$1u } = createComponent("tabbar");
|
|
2502
2506
|
const _sfc_main$1u = create$1u({
|
|
2503
2507
|
props: {
|
|
@@ -2509,10 +2513,6 @@ const _sfc_main$1u = create$1u({
|
|
|
2509
2513
|
type: Boolean,
|
|
2510
2514
|
default: false
|
|
2511
2515
|
},
|
|
2512
|
-
type: {
|
|
2513
|
-
type: String,
|
|
2514
|
-
default: "base"
|
|
2515
|
-
},
|
|
2516
2516
|
size: {
|
|
2517
2517
|
type: String,
|
|
2518
2518
|
default: "20px"
|
|
@@ -2542,7 +2542,7 @@ const _sfc_main$1u = create$1u({
|
|
|
2542
2542
|
val: props.visible,
|
|
2543
2543
|
children: []
|
|
2544
2544
|
});
|
|
2545
|
-
const nutTabbar = ref(
|
|
2545
|
+
const nutTabbar = ref();
|
|
2546
2546
|
function changeIndex(index, active) {
|
|
2547
2547
|
emit("update:visible", active);
|
|
2548
2548
|
parentData.modelValue = active;
|
|
@@ -2566,8 +2566,7 @@ const _sfc_main$1u = create$1u({
|
|
|
2566
2566
|
onMounted(() => {
|
|
2567
2567
|
if (bottom.value && placeholder.value) {
|
|
2568
2568
|
nextTick(() => {
|
|
2569
|
-
|
|
2570
|
-
height.value = (_a = nutTabbar == null ? void 0 : nutTabbar.value) == null ? void 0 : _a.getBoundingClientRect().height;
|
|
2569
|
+
height.value = useRect(nutTabbar).height;
|
|
2571
2570
|
});
|
|
2572
2571
|
}
|
|
2573
2572
|
});
|
|
@@ -2578,7 +2577,7 @@ const _sfc_main$1u = create$1u({
|
|
|
2578
2577
|
};
|
|
2579
2578
|
}
|
|
2580
2579
|
});
|
|
2581
|
-
function _sfc_render$
|
|
2580
|
+
function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2582
2581
|
return _ctx.bottom && _ctx.placeholder ? (openBlock(), createElementBlock("div", {
|
|
2583
2582
|
key: 0,
|
|
2584
2583
|
class: "nut-tabbar__placeholder",
|
|
@@ -2597,7 +2596,7 @@ function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2597
2596
|
renderSlot(_ctx.$slots, "default")
|
|
2598
2597
|
], 2));
|
|
2599
2598
|
}
|
|
2600
|
-
var Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$
|
|
2599
|
+
var Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1o]]);
|
|
2601
2600
|
const { create: create$1t } = createComponent("tabbar-item");
|
|
2602
2601
|
const _sfc_main$1t = create$1t({
|
|
2603
2602
|
props: {
|
|
@@ -2617,7 +2616,7 @@ const _sfc_main$1t = create$1t({
|
|
|
2617
2616
|
default: ""
|
|
2618
2617
|
},
|
|
2619
2618
|
num: {
|
|
2620
|
-
type:
|
|
2619
|
+
type: Number,
|
|
2621
2620
|
default: ""
|
|
2622
2621
|
},
|
|
2623
2622
|
activeImg: {
|
|
@@ -2659,8 +2658,8 @@ const _sfc_main$1t = create$1t({
|
|
|
2659
2658
|
var _a;
|
|
2660
2659
|
if (child.proxy) {
|
|
2661
2660
|
parent.children.push(child.proxy);
|
|
2662
|
-
const index =
|
|
2663
|
-
state.index = (_a = props.name) != null ? _a : index
|
|
2661
|
+
const index = parent.children.indexOf(child.proxy);
|
|
2662
|
+
state.index = (_a = props.name) != null ? _a : index;
|
|
2664
2663
|
}
|
|
2665
2664
|
};
|
|
2666
2665
|
relation(getCurrentInstance());
|
|
@@ -2731,7 +2730,7 @@ const _hoisted_5$q = {
|
|
|
2731
2730
|
};
|
|
2732
2731
|
const _hoisted_6$n = { key: 3 };
|
|
2733
2732
|
const _hoisted_7$k = { key: 0 };
|
|
2734
|
-
function _sfc_render$
|
|
2733
|
+
function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2735
2734
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
2736
2735
|
return openBlock(), createElementBlock("div", {
|
|
2737
2736
|
class: normalizeClass(["nut-tabbar-item", { "nut-tabbar-item__icon--unactive": !_ctx.active }]),
|
|
@@ -2742,13 +2741,12 @@ function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2742
2741
|
}, [
|
|
2743
2742
|
createElementVNode("view", _hoisted_1$16, [
|
|
2744
2743
|
!_ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2745
|
-
_ctx.num && _ctx.num <= 99 ? (openBlock(), createElementBlock("view", _hoisted_2$W, toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num
|
|
2744
|
+
_ctx.num && _ctx.num <= 99 ? (openBlock(), createElementBlock("view", _hoisted_2$W, toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num >= 100 ? (openBlock(), createElementBlock("view", _hoisted_3$I, toDisplayString("99+"))) : createCommentVNode("", true)
|
|
2746
2745
|
], 64)) : createCommentVNode("", true),
|
|
2747
2746
|
_ctx.dot ? (openBlock(), createElementBlock("div", _hoisted_4$z)) : createCommentVNode("", true),
|
|
2748
|
-
_ctx.
|
|
2747
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_5$q, [
|
|
2749
2748
|
renderSlot(_ctx.$slots, "icon", { active: _ctx.active })
|
|
2750
|
-
])) :
|
|
2751
|
-
_ctx.icon && !_ctx.isHaveSlot("icon") ? (openBlock(), createElementBlock("view", _hoisted_6$n, [
|
|
2749
|
+
])) : _ctx.icon ? (openBlock(), createElementBlock("view", _hoisted_6$n, [
|
|
2752
2750
|
createVNode(_component_nut_icon, {
|
|
2753
2751
|
class: "nut-tabbar-item_icon-box_icon",
|
|
2754
2752
|
size: _ctx.state.size,
|
|
@@ -2756,8 +2754,7 @@ function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2756
2754
|
"font-class-name": _ctx.fontClassName,
|
|
2757
2755
|
"class-prefix": _ctx.classPrefix
|
|
2758
2756
|
}, null, 8, ["size", "name", "font-class-name", "class-prefix"])
|
|
2759
|
-
])) :
|
|
2760
|
-
!_ctx.icon && _ctx.activeImg && !_ctx.isHaveSlot("icon") ? (openBlock(), createElementBlock("div", {
|
|
2757
|
+
])) : _ctx.activeImg ? (openBlock(), createElementBlock("div", {
|
|
2761
2758
|
key: 4,
|
|
2762
2759
|
class: "nut-tabbar-item_icon-box_icon",
|
|
2763
2760
|
style: normalizeStyle({
|
|
@@ -2769,16 +2766,17 @@ function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2769
2766
|
createElementVNode("view", {
|
|
2770
2767
|
class: normalizeClass([
|
|
2771
2768
|
"nut-tabbar-item_icon-box_nav-word",
|
|
2772
|
-
{ "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg && !_ctx.
|
|
2769
|
+
{ "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg && !_ctx.$slots.icon }
|
|
2773
2770
|
])
|
|
2774
2771
|
}, [
|
|
2775
|
-
_ctx
|
|
2776
|
-
|
|
2772
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2773
|
+
_ctx.tabTitle ? (openBlock(), createElementBlock("view", _hoisted_7$k, toDisplayString(_ctx.tabTitle), 1)) : createCommentVNode("", true)
|
|
2774
|
+
])
|
|
2777
2775
|
], 2)
|
|
2778
2776
|
])
|
|
2779
2777
|
], 6);
|
|
2780
2778
|
}
|
|
2781
|
-
var TabbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$
|
|
2779
|
+
var TabbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1n]]);
|
|
2782
2780
|
function useExpose(apis) {
|
|
2783
2781
|
const instance = getCurrentInstance();
|
|
2784
2782
|
if (instance) {
|
|
@@ -2977,7 +2975,7 @@ const _hoisted_3$H = ["innerHTML"];
|
|
|
2977
2975
|
const _hoisted_4$y = { class: "fixed-title" };
|
|
2978
2976
|
const _hoisted_5$p = { class: "nut-elevator__bars__inner" };
|
|
2979
2977
|
const _hoisted_6$m = ["data-index", "onClick"];
|
|
2980
|
-
function _sfc_render$
|
|
2978
|
+
function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2981
2979
|
return openBlock(), createElementBlock("view", {
|
|
2982
2980
|
class: normalizeClass(_ctx.classes)
|
|
2983
2981
|
}, [
|
|
@@ -3048,7 +3046,7 @@ function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3048
3046
|
], 32)
|
|
3049
3047
|
], 2);
|
|
3050
3048
|
}
|
|
3051
|
-
var Elevator = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$
|
|
3049
|
+
var Elevator = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1m]]);
|
|
3052
3050
|
const { create: create$1r, translate: translate$r } = createComponent("pagination");
|
|
3053
3051
|
const _sfc_main$1r = create$1r({
|
|
3054
3052
|
props: {
|
|
@@ -3167,7 +3165,7 @@ const _hoisted_4$x = {
|
|
|
3167
3165
|
class: "nut-pagination-contain"
|
|
3168
3166
|
};
|
|
3169
3167
|
const _hoisted_5$o = { class: "nut-pagination-simple" };
|
|
3170
|
-
function _sfc_render$
|
|
3168
|
+
function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3171
3169
|
return openBlock(), createElementBlock("view", _hoisted_1$14, [
|
|
3172
3170
|
createElementVNode("view", {
|
|
3173
3171
|
class: normalizeClass(["nut-pagination-prev", _ctx.mode == "multi" ? "" : "simple-border", _ctx.modelValue == 1 ? "disabled" : ""]),
|
|
@@ -3203,7 +3201,7 @@ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3203
3201
|
], 2)
|
|
3204
3202
|
]);
|
|
3205
3203
|
}
|
|
3206
|
-
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$
|
|
3204
|
+
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1l]]);
|
|
3207
3205
|
class Title {
|
|
3208
3206
|
constructor() {
|
|
3209
3207
|
this.title = "";
|
|
@@ -3330,9 +3328,6 @@ const component$5 = {
|
|
|
3330
3328
|
init(vnodes);
|
|
3331
3329
|
}
|
|
3332
3330
|
);
|
|
3333
|
-
const getScrollTopRoot = () => {
|
|
3334
|
-
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
3335
|
-
};
|
|
3336
3331
|
watch(
|
|
3337
3332
|
() => props.modelValue,
|
|
3338
3333
|
(value) => {
|
|
@@ -3395,9 +3390,11 @@ const component$5 = {
|
|
|
3395
3390
|
};
|
|
3396
3391
|
}
|
|
3397
3392
|
};
|
|
3393
|
+
const { create: create$1q } = createComponent("tabs");
|
|
3394
|
+
const _sfc_main$1q = create$1q(component$5);
|
|
3398
3395
|
const _hoisted_1$13 = ["onClick"];
|
|
3399
3396
|
const _hoisted_2$T = ["onClick"];
|
|
3400
|
-
function
|
|
3397
|
+
function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3401
3398
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
3402
3399
|
const _component_nut_sticky = resolveComponent("nut-sticky");
|
|
3403
3400
|
return openBlock(), createElementBlock("view", {
|
|
@@ -3487,9 +3484,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3487
3484
|
], 4)
|
|
3488
3485
|
], 2);
|
|
3489
3486
|
}
|
|
3490
|
-
|
|
3491
|
-
const _sfc_main$1q = create$1q(component$5);
|
|
3492
|
-
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", render$1]]);
|
|
3487
|
+
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1k]]);
|
|
3493
3488
|
const { create: create$1p } = createComponent("tabpane");
|
|
3494
3489
|
const _sfc_main$1p = create$1p({
|
|
3495
3490
|
props: {
|
|
@@ -3786,7 +3781,7 @@ function getDirection(x, y) {
|
|
|
3786
3781
|
}
|
|
3787
3782
|
return "";
|
|
3788
3783
|
}
|
|
3789
|
-
function useTouch
|
|
3784
|
+
function useTouch() {
|
|
3790
3785
|
const startX = ref(0);
|
|
3791
3786
|
const startY = ref(0);
|
|
3792
3787
|
const moveX = ref(0);
|
|
@@ -3890,7 +3885,7 @@ const _sfc_main$1k = create$1k({
|
|
|
3890
3885
|
let currentValue;
|
|
3891
3886
|
const root = ref();
|
|
3892
3887
|
const dragStatus = ref();
|
|
3893
|
-
const touch = useTouch
|
|
3888
|
+
const touch = useTouch();
|
|
3894
3889
|
const marksList = computed(() => {
|
|
3895
3890
|
const { marks, max, min } = props;
|
|
3896
3891
|
const marksKeys = Object.keys(marks);
|
|
@@ -6368,7 +6363,7 @@ const _sfc_main$1c = create$1c({
|
|
|
6368
6363
|
},
|
|
6369
6364
|
emits: ["click", "change"],
|
|
6370
6365
|
setup(props, { emit }) {
|
|
6371
|
-
const touch = useTouch
|
|
6366
|
+
const touch = useTouch();
|
|
6372
6367
|
const wrapper = ref();
|
|
6373
6368
|
const state = reactive({
|
|
6374
6369
|
touchParams: {
|
|
@@ -6492,7 +6487,7 @@ const _sfc_main$1c = create$1c({
|
|
|
6492
6487
|
let currentDeg = (-updateMove / state.lineSpacing + 1) * state.rotation;
|
|
6493
6488
|
const maxDeg = (props.column.length + 1) * state.rotation;
|
|
6494
6489
|
const minDeg = 0;
|
|
6495
|
-
deg =
|
|
6490
|
+
deg = clamp(currentDeg, minDeg, maxDeg);
|
|
6496
6491
|
if (minDeg < deg && deg < maxDeg) {
|
|
6497
6492
|
setTransform(updateMove, null, void 0, deg + "deg");
|
|
6498
6493
|
state.currIndex = Math.abs(Math.round(updateMove / state.lineSpacing)) + 1;
|
|
@@ -6633,6 +6628,14 @@ const _sfc_main$1b = create$1b({
|
|
|
6633
6628
|
swipeDuration: {
|
|
6634
6629
|
type: [Number, String],
|
|
6635
6630
|
default: 1e3
|
|
6631
|
+
},
|
|
6632
|
+
showOkText: {
|
|
6633
|
+
type: Boolean,
|
|
6634
|
+
default: true
|
|
6635
|
+
},
|
|
6636
|
+
showCancelText: {
|
|
6637
|
+
type: Boolean,
|
|
6638
|
+
default: true
|
|
6636
6639
|
}
|
|
6637
6640
|
},
|
|
6638
6641
|
emits: ["close", "change", "confirm", "update:visible", "update:modelValue"],
|
|
@@ -6841,15 +6844,17 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6841
6844
|
}, {
|
|
6842
6845
|
default: withCtx(() => [
|
|
6843
6846
|
createElementVNode("view", _hoisted_1$V, [
|
|
6844
|
-
|
|
6847
|
+
_ctx.showCancelText ? (openBlock(), createElementBlock("view", {
|
|
6848
|
+
key: 0,
|
|
6845
6849
|
class: "nut-picker__left",
|
|
6846
6850
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
|
|
6847
|
-
}, toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1),
|
|
6851
|
+
}, toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1)) : createCommentVNode("", true),
|
|
6848
6852
|
createElementVNode("view", _hoisted_2$K, toDisplayString(_ctx.title), 1),
|
|
6849
|
-
|
|
6853
|
+
_ctx.showOkText ? (openBlock(), createElementBlock("view", {
|
|
6854
|
+
key: 1,
|
|
6850
6855
|
class: "nut-picker__right",
|
|
6851
6856
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirmHandler())
|
|
6852
|
-
}, toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)
|
|
6857
|
+
}, toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)) : createCommentVNode("", true)
|
|
6853
6858
|
]),
|
|
6854
6859
|
renderSlot(_ctx.$slots, "top"),
|
|
6855
6860
|
createElementVNode("view", _hoisted_3$A, [
|
|
@@ -8070,7 +8075,7 @@ const useComponent = (touchable = true) => {
|
|
|
8070
8075
|
}
|
|
8071
8076
|
return v;
|
|
8072
8077
|
};
|
|
8073
|
-
const touch = useTouch
|
|
8078
|
+
const touch = useTouch();
|
|
8074
8079
|
const touchMethods = {
|
|
8075
8080
|
onTouchStart(event) {
|
|
8076
8081
|
if (!props.touchable)
|
|
@@ -9603,7 +9608,7 @@ const _sfc_main$_ = create$_({
|
|
|
9603
9608
|
}
|
|
9604
9609
|
state.offset = offset;
|
|
9605
9610
|
};
|
|
9606
|
-
const touch = useTouch
|
|
9611
|
+
const touch = useTouch();
|
|
9607
9612
|
const touchMethods = {
|
|
9608
9613
|
onTouchStart(event) {
|
|
9609
9614
|
if (props.disabled)
|
|
@@ -10501,7 +10506,7 @@ const _sfc_main$V = create$V({
|
|
|
10501
10506
|
},
|
|
10502
10507
|
emits: ["scroll-change", "load-more", "refresh"],
|
|
10503
10508
|
setup(props, { emit, slots }) {
|
|
10504
|
-
const touch = useTouch
|
|
10509
|
+
const touch = useTouch();
|
|
10505
10510
|
const state = reactive({
|
|
10506
10511
|
scrollEl: window,
|
|
10507
10512
|
scroller: null,
|
|
@@ -10523,17 +10528,9 @@ const _sfc_main$V = create$V({
|
|
|
10523
10528
|
const getStyle = computed(() => {
|
|
10524
10529
|
return {
|
|
10525
10530
|
height: state.distance < 0 ? `0px` : `${state.distance}px`,
|
|
10526
|
-
|
|
10531
|
+
transitionDuration: state.isTouching ? 0 : `0.2s`
|
|
10527
10532
|
};
|
|
10528
10533
|
});
|
|
10529
|
-
const requestAniFrame2 = () => {
|
|
10530
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(callback) {
|
|
10531
|
-
window.setTimeout(callback, 1e3 / 60);
|
|
10532
|
-
};
|
|
10533
|
-
};
|
|
10534
|
-
const getWindowScrollTop = () => {
|
|
10535
|
-
return window.pageYOffset !== void 0 ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
|
|
10536
|
-
};
|
|
10537
10534
|
const calculateTopPosition = (el) => {
|
|
10538
10535
|
return !el ? 0 : el.offsetTop + calculateTopPosition(el.offsetParent);
|
|
10539
10536
|
};
|
|
@@ -10541,8 +10538,8 @@ const _sfc_main$V = create$V({
|
|
|
10541
10538
|
let offsetDistance = 0;
|
|
10542
10539
|
let resScrollTop = 0;
|
|
10543
10540
|
let direction = "down";
|
|
10544
|
-
const windowScrollTop = getWindowScrollTop();
|
|
10545
10541
|
if (props.useWindow) {
|
|
10542
|
+
const windowScrollTop = getScrollTopRoot();
|
|
10546
10543
|
if (state.scroller) {
|
|
10547
10544
|
offsetDistance = calculateTopPosition(state.scroller) + state.scroller.offsetHeight - windowScrollTop - window.innerHeight;
|
|
10548
10545
|
}
|
|
@@ -10565,7 +10562,7 @@ const _sfc_main$V = create$V({
|
|
|
10565
10562
|
state.isInfiniting = false;
|
|
10566
10563
|
};
|
|
10567
10564
|
const handleScroll = () => {
|
|
10568
|
-
|
|
10565
|
+
requestAniFrame$1(() => {
|
|
10569
10566
|
if (!isScrollAtBottom() || !props.hasMore || state.isInfiniting) {
|
|
10570
10567
|
return false;
|
|
10571
10568
|
} else {
|
|
@@ -10617,14 +10614,16 @@ const _sfc_main$V = create$V({
|
|
|
10617
10614
|
const getParentElement = (el) => {
|
|
10618
10615
|
return !!props.containerId ? document.querySelector(`#${props.containerId}`) : el && el.parentNode;
|
|
10619
10616
|
};
|
|
10617
|
+
const removeScrollListener = () => {
|
|
10618
|
+
state.scrollEl.removeEventListener("scroll", handleScroll, props.useCapture);
|
|
10619
|
+
};
|
|
10620
10620
|
onMounted(() => {
|
|
10621
10621
|
const parentElement = getParentElement(state.scroller);
|
|
10622
10622
|
state.scrollEl = props.useWindow ? window : parentElement;
|
|
10623
10623
|
scrollListener();
|
|
10624
|
-
console.log(slots);
|
|
10625
10624
|
});
|
|
10626
10625
|
onUnmounted(() => {
|
|
10627
|
-
|
|
10626
|
+
removeScrollListener();
|
|
10628
10627
|
});
|
|
10629
10628
|
const isKeepAlive = ref(false);
|
|
10630
10629
|
onActivated(() => {
|
|
@@ -10635,7 +10634,7 @@ const _sfc_main$V = create$V({
|
|
|
10635
10634
|
});
|
|
10636
10635
|
onDeactivated(() => {
|
|
10637
10636
|
isKeepAlive.value = true;
|
|
10638
|
-
|
|
10637
|
+
removeScrollListener();
|
|
10639
10638
|
});
|
|
10640
10639
|
return {
|
|
10641
10640
|
classes,
|
|
@@ -10658,10 +10657,7 @@ const _hoisted_5$f = {
|
|
|
10658
10657
|
class: "bottom-box"
|
|
10659
10658
|
};
|
|
10660
10659
|
const _hoisted_6$e = { class: "bottom-text" };
|
|
10661
|
-
const _hoisted_7$c = {
|
|
10662
|
-
key: 0,
|
|
10663
|
-
class: "tips"
|
|
10664
|
-
};
|
|
10660
|
+
const _hoisted_7$c = { class: "tips" };
|
|
10665
10661
|
function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10666
10662
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
10667
10663
|
return openBlock(), createElementBlock("view", {
|
|
@@ -10686,13 +10682,13 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10686
10682
|
]),
|
|
10687
10683
|
createElementVNode("view", _hoisted_4$n, [
|
|
10688
10684
|
_ctx.isInfiniting ? (openBlock(), createElementBlock("view", _hoisted_5$f, [
|
|
10689
|
-
|
|
10685
|
+
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
10690
10686
|
createVNode(_component_nut_icon, mergeProps({ class: "bottom-img" }, _ctx.$attrs, { name: _ctx.loadIcon }), null, 16, ["name"]),
|
|
10691
10687
|
createElementVNode("view", _hoisted_6$e, toDisplayString(_ctx.loadTxt || _ctx.translate("loading")), 1)
|
|
10692
|
-
]
|
|
10693
|
-
])) : !_ctx.hasMore ? (
|
|
10694
|
-
|
|
10695
|
-
]
|
|
10688
|
+
])
|
|
10689
|
+
])) : !_ctx.hasMore ? renderSlot(_ctx.$slots, "finished", { key: 1 }, () => [
|
|
10690
|
+
createElementVNode("view", _hoisted_7$c, toDisplayString(_ctx.loadMoreTxt || _ctx.translate("loadMoreTxt")), 1)
|
|
10691
|
+
]) : createCommentVNode("", true)
|
|
10696
10692
|
])
|
|
10697
10693
|
], 34);
|
|
10698
10694
|
}
|
|
@@ -10834,7 +10830,7 @@ const updateNotify = (opts) => {
|
|
|
10834
10830
|
opts = { ...defaultOptions$1, ...opts };
|
|
10835
10831
|
}
|
|
10836
10832
|
const instance = createVNode(Notify, opts);
|
|
10837
|
-
render$
|
|
10833
|
+
render$3(instance, container);
|
|
10838
10834
|
return instance.component.data;
|
|
10839
10835
|
}
|
|
10840
10836
|
};
|
|
@@ -10870,7 +10866,7 @@ const mountNotify = (opts) => {
|
|
|
10870
10866
|
};
|
|
10871
10867
|
const instance = createVNode(Wrapper);
|
|
10872
10868
|
document.body.appendChild(root);
|
|
10873
|
-
render$
|
|
10869
|
+
render$3(instance, root);
|
|
10874
10870
|
};
|
|
10875
10871
|
const errorMsg$1 = (msg) => {
|
|
10876
10872
|
if (!msg) {
|
|
@@ -11274,7 +11270,7 @@ const updateToast = (opts) => {
|
|
|
11274
11270
|
opts = { ...defaultOptions, ...opts };
|
|
11275
11271
|
}
|
|
11276
11272
|
const instance = createVNode(Toast, opts);
|
|
11277
|
-
render$
|
|
11273
|
+
render$3(instance, container);
|
|
11278
11274
|
return ToastFunction;
|
|
11279
11275
|
}
|
|
11280
11276
|
};
|
|
@@ -13287,54 +13283,6 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13287
13283
|
], 2);
|
|
13288
13284
|
}
|
|
13289
13285
|
var Step = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G]]);
|
|
13290
|
-
const DISTANCE = 5;
|
|
13291
|
-
function useTouch() {
|
|
13292
|
-
const state = reactive({
|
|
13293
|
-
startX: 0,
|
|
13294
|
-
startY: 0,
|
|
13295
|
-
deltaX: 0,
|
|
13296
|
-
deltaY: 0,
|
|
13297
|
-
offsetX: 0,
|
|
13298
|
-
offsetY: 0,
|
|
13299
|
-
direction: ""
|
|
13300
|
-
});
|
|
13301
|
-
const getDirection2 = (x, y) => {
|
|
13302
|
-
if (x > y && x > DISTANCE)
|
|
13303
|
-
return "horizontal";
|
|
13304
|
-
if (y > x && y > DISTANCE)
|
|
13305
|
-
return "vertical";
|
|
13306
|
-
return "";
|
|
13307
|
-
};
|
|
13308
|
-
const reset = () => {
|
|
13309
|
-
state.startX = 0;
|
|
13310
|
-
state.startY = 0;
|
|
13311
|
-
state.deltaX = 0;
|
|
13312
|
-
state.deltaY = 0;
|
|
13313
|
-
state.offsetX = 0;
|
|
13314
|
-
state.offsetY = 0;
|
|
13315
|
-
state.direction = "";
|
|
13316
|
-
};
|
|
13317
|
-
const start = (e) => {
|
|
13318
|
-
reset();
|
|
13319
|
-
state.startX = e.touches[0].clientX;
|
|
13320
|
-
state.startY = e.touches[0].clientY;
|
|
13321
|
-
};
|
|
13322
|
-
const move = (e) => {
|
|
13323
|
-
state.deltaX = e.touches[0].clientX - state.startX;
|
|
13324
|
-
state.deltaY = e.touches[0].clientY - state.startY;
|
|
13325
|
-
state.offsetX = Math.abs(state.deltaX);
|
|
13326
|
-
state.offsetY = Math.abs(state.deltaY);
|
|
13327
|
-
if (!state.direction) {
|
|
13328
|
-
state.direction = getDirection2(state.offsetX, state.offsetY);
|
|
13329
|
-
}
|
|
13330
|
-
};
|
|
13331
|
-
return {
|
|
13332
|
-
state,
|
|
13333
|
-
start,
|
|
13334
|
-
reset,
|
|
13335
|
-
move
|
|
13336
|
-
};
|
|
13337
|
-
}
|
|
13338
13286
|
const { create: create$F, componentName: componentName$u } = createComponent("swiper");
|
|
13339
13287
|
const _sfc_main$F = create$F({
|
|
13340
13288
|
props: {
|
|
@@ -13347,7 +13295,7 @@ const _sfc_main$F = create$F({
|
|
|
13347
13295
|
default: 0
|
|
13348
13296
|
},
|
|
13349
13297
|
direction: {
|
|
13350
|
-
type:
|
|
13298
|
+
type: String,
|
|
13351
13299
|
default: "horizontal"
|
|
13352
13300
|
},
|
|
13353
13301
|
paginationVisible: {
|
|
@@ -13416,11 +13364,25 @@ const _sfc_main$F = create$F({
|
|
|
13416
13364
|
};
|
|
13417
13365
|
});
|
|
13418
13366
|
const isVertical = computed(() => props.direction === "vertical");
|
|
13367
|
+
const classesInner = computed(() => {
|
|
13368
|
+
const prefixCls = componentName$u;
|
|
13369
|
+
return {
|
|
13370
|
+
[`${prefixCls}-inner`]: true,
|
|
13371
|
+
[`${prefixCls}-vertical`]: isVertical.value
|
|
13372
|
+
};
|
|
13373
|
+
});
|
|
13374
|
+
const classesPagination = computed(() => {
|
|
13375
|
+
const prefixCls = componentName$u;
|
|
13376
|
+
return {
|
|
13377
|
+
[`${prefixCls}-pagination`]: true,
|
|
13378
|
+
[`${prefixCls}-pagination-vertical`]: isVertical.value
|
|
13379
|
+
};
|
|
13380
|
+
});
|
|
13419
13381
|
const delTa = computed(() => {
|
|
13420
|
-
return isVertical.value ? touch.
|
|
13382
|
+
return isVertical.value ? touch.deltaY.value : touch.deltaX.value;
|
|
13421
13383
|
});
|
|
13422
13384
|
const isCorrectDirection = computed(() => {
|
|
13423
|
-
return touch.
|
|
13385
|
+
return touch.direction.value === props.direction;
|
|
13424
13386
|
});
|
|
13425
13387
|
const childCount = computed(() => state.children.length);
|
|
13426
13388
|
const size = computed(() => state[isVertical.value ? "height" : "width"]);
|
|
@@ -13435,12 +13397,7 @@ const _sfc_main$F = create$F({
|
|
|
13435
13397
|
const activePagination = computed(() => (state.active + childCount.value) % childCount.value);
|
|
13436
13398
|
const getStyle = () => {
|
|
13437
13399
|
let offset = 0;
|
|
13438
|
-
|
|
13439
|
-
offset = state.offset;
|
|
13440
|
-
} else {
|
|
13441
|
-
let val = isVertical.value ? state.rect.height - size.value : state.rect.width - size.value;
|
|
13442
|
-
offset = state.offset + (state.active === childCount.value - 1 ? -val / 2 : val / 2);
|
|
13443
|
-
}
|
|
13400
|
+
offset = state.offset;
|
|
13444
13401
|
state.style = {
|
|
13445
13402
|
transitionDuration: `${state.moving ? 0 : props.duration}ms`,
|
|
13446
13403
|
transform: `translate${isVertical.value ? "Y" : "X"}(${offset}px)`,
|
|
@@ -13451,26 +13408,27 @@ const _sfc_main$F = create$F({
|
|
|
13451
13408
|
const relation = (child) => {
|
|
13452
13409
|
var _a;
|
|
13453
13410
|
let children = [];
|
|
13411
|
+
const childrenVNodeLen = state.childrenVNode.length;
|
|
13454
13412
|
let slot = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots);
|
|
13455
13413
|
slot = slot.filter((item) => item.children && Array.isArray(item.children));
|
|
13456
13414
|
slot.forEach((item) => {
|
|
13457
13415
|
children = children.concat(item.children);
|
|
13458
13416
|
});
|
|
13459
|
-
if (!
|
|
13417
|
+
if (!childrenVNodeLen) {
|
|
13460
13418
|
state.childrenVNode = children.slice();
|
|
13461
13419
|
child.proxy && state.children.push(child.proxy);
|
|
13462
13420
|
} else {
|
|
13463
|
-
if (
|
|
13421
|
+
if (childrenVNodeLen > children.length) {
|
|
13464
13422
|
state.children = state.children.filter((item) => child.proxy !== item);
|
|
13465
|
-
} else if (
|
|
13466
|
-
for (let i = 0; i <
|
|
13423
|
+
} else if (childrenVNodeLen < children.length) {
|
|
13424
|
+
for (let i = 0; i < childrenVNodeLen; i++) {
|
|
13467
13425
|
if (children[i].key !== state.childrenVNode[i].key) {
|
|
13468
13426
|
child.proxy && state.children.splice(i, 0, child.proxy);
|
|
13469
13427
|
child.vnode && state.childrenVNode.splice(i, 0, child.vnode);
|
|
13470
13428
|
break;
|
|
13471
13429
|
}
|
|
13472
13430
|
}
|
|
13473
|
-
if (
|
|
13431
|
+
if (childrenVNodeLen !== children.length) {
|
|
13474
13432
|
child.proxy && state.children.push(child.proxy);
|
|
13475
13433
|
child.vnode && state.childrenVNode.push(child.vnode);
|
|
13476
13434
|
}
|
|
@@ -13480,12 +13438,6 @@ const _sfc_main$F = create$F({
|
|
|
13480
13438
|
}
|
|
13481
13439
|
}
|
|
13482
13440
|
};
|
|
13483
|
-
const range = (num, min, max) => {
|
|
13484
|
-
return Math.min(Math.max(num, min), max);
|
|
13485
|
-
};
|
|
13486
|
-
const requestFrame = (fn) => {
|
|
13487
|
-
window.requestAnimationFrame.call(window, fn);
|
|
13488
|
-
};
|
|
13489
13441
|
const getOffset = (active, offset = 0) => {
|
|
13490
13442
|
let currentPosition = active * size.value;
|
|
13491
13443
|
if (!props.loop) {
|
|
@@ -13493,7 +13445,7 @@ const _sfc_main$F = create$F({
|
|
|
13493
13445
|
}
|
|
13494
13446
|
let targetOffset = offset - currentPosition;
|
|
13495
13447
|
if (!props.loop) {
|
|
13496
|
-
targetOffset =
|
|
13448
|
+
targetOffset = clamp(targetOffset, minOffset.value, 0);
|
|
13497
13449
|
}
|
|
13498
13450
|
return targetOffset;
|
|
13499
13451
|
};
|
|
@@ -13501,9 +13453,9 @@ const _sfc_main$F = create$F({
|
|
|
13501
13453
|
const { active } = state;
|
|
13502
13454
|
if (pace) {
|
|
13503
13455
|
if (props.loop) {
|
|
13504
|
-
return
|
|
13456
|
+
return clamp(active + pace, -1, childCount.value);
|
|
13505
13457
|
}
|
|
13506
|
-
return
|
|
13458
|
+
return clamp(active + pace, 0, childCount.value - 1);
|
|
13507
13459
|
}
|
|
13508
13460
|
return active;
|
|
13509
13461
|
};
|
|
@@ -13542,48 +13494,39 @@ const _sfc_main$F = create$F({
|
|
|
13542
13494
|
const stopAutoPlay = () => {
|
|
13543
13495
|
clearTimeout(state.autoplayTimer);
|
|
13544
13496
|
};
|
|
13545
|
-
const
|
|
13497
|
+
const jump = (pace) => {
|
|
13546
13498
|
resettPosition();
|
|
13547
13499
|
touch.reset();
|
|
13548
|
-
|
|
13549
|
-
|
|
13500
|
+
requestAniFrame$1(() => {
|
|
13501
|
+
requestAniFrame$1(() => {
|
|
13550
13502
|
state.moving = false;
|
|
13551
13503
|
move({
|
|
13552
|
-
pace
|
|
13504
|
+
pace,
|
|
13553
13505
|
isEmit: true
|
|
13554
13506
|
});
|
|
13555
13507
|
});
|
|
13556
13508
|
});
|
|
13557
13509
|
};
|
|
13510
|
+
const prev = () => {
|
|
13511
|
+
jump(-1);
|
|
13512
|
+
};
|
|
13558
13513
|
const next = () => {
|
|
13559
|
-
|
|
13560
|
-
touch.reset();
|
|
13561
|
-
requestFrame(() => {
|
|
13562
|
-
requestFrame(() => {
|
|
13563
|
-
state.moving = false;
|
|
13564
|
-
move({
|
|
13565
|
-
pace: 1,
|
|
13566
|
-
isEmit: true
|
|
13567
|
-
});
|
|
13568
|
-
});
|
|
13569
|
-
});
|
|
13514
|
+
jump(1);
|
|
13570
13515
|
};
|
|
13571
13516
|
const to = (index) => {
|
|
13572
13517
|
resettPosition();
|
|
13573
13518
|
touch.reset();
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
isEmit: true
|
|
13586
|
-
});
|
|
13519
|
+
requestAniFrame$1(() => {
|
|
13520
|
+
state.moving = false;
|
|
13521
|
+
let targetIndex;
|
|
13522
|
+
if (props.loop && childCount.value === index) {
|
|
13523
|
+
targetIndex = state.active === 0 ? 0 : index;
|
|
13524
|
+
} else {
|
|
13525
|
+
targetIndex = index % childCount.value;
|
|
13526
|
+
}
|
|
13527
|
+
move({
|
|
13528
|
+
pace: targetIndex - state.active,
|
|
13529
|
+
isEmit: true
|
|
13587
13530
|
});
|
|
13588
13531
|
});
|
|
13589
13532
|
};
|
|
@@ -13637,7 +13580,7 @@ const _sfc_main$F = create$F({
|
|
|
13637
13580
|
const isShouldMove = Math.abs(speed) > 0.3 || Math.abs(delTa.value) > +(size.value / 2).toFixed(2);
|
|
13638
13581
|
if (isShouldMove && isCorrectDirection.value) {
|
|
13639
13582
|
let pace = 0;
|
|
13640
|
-
const offset = isVertical.value ? touch.
|
|
13583
|
+
const offset = isVertical.value ? touch.offsetY.value : touch.offsetX.value;
|
|
13641
13584
|
if (props.loop) {
|
|
13642
13585
|
pace = offset > 0 ? delTa.value > 0 ? -1 : 1 : 0;
|
|
13643
13586
|
} else {
|
|
@@ -13695,10 +13638,9 @@ const _sfc_main$F = create$F({
|
|
|
13695
13638
|
return {
|
|
13696
13639
|
state,
|
|
13697
13640
|
classes,
|
|
13641
|
+
classesInner,
|
|
13642
|
+
classesPagination,
|
|
13698
13643
|
container,
|
|
13699
|
-
componentName: componentName$u,
|
|
13700
|
-
isVertical,
|
|
13701
|
-
slots,
|
|
13702
13644
|
activePagination,
|
|
13703
13645
|
onTouchStart,
|
|
13704
13646
|
onTouchMove,
|
|
@@ -13716,21 +13658,15 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13716
13658
|
onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
|
|
13717
13659
|
}, [
|
|
13718
13660
|
createElementVNode("view", {
|
|
13719
|
-
class: normalizeClass(
|
|
13720
|
-
[`${_ctx.componentName}-inner`]: true,
|
|
13721
|
-
[`${_ctx.componentName}-vertical`]: _ctx.isVertical
|
|
13722
|
-
}),
|
|
13661
|
+
class: normalizeClass(_ctx.classesInner),
|
|
13723
13662
|
style: normalizeStyle(_ctx.state.style)
|
|
13724
13663
|
}, [
|
|
13725
13664
|
renderSlot(_ctx.$slots, "default")
|
|
13726
13665
|
], 6),
|
|
13727
13666
|
renderSlot(_ctx.$slots, "page"),
|
|
13728
|
-
_ctx.paginationVisible && !_ctx
|
|
13667
|
+
_ctx.paginationVisible && !_ctx.$slots.page ? (openBlock(), createElementBlock("view", {
|
|
13729
13668
|
key: 0,
|
|
13730
|
-
class: normalizeClass(
|
|
13731
|
-
[`${_ctx.componentName}-pagination`]: true,
|
|
13732
|
-
[`${_ctx.componentName}-pagination-vertical`]: _ctx.isVertical
|
|
13733
|
-
})
|
|
13669
|
+
class: normalizeClass(_ctx.classesPagination)
|
|
13734
13670
|
}, [
|
|
13735
13671
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.state.children.length, (item, index) => {
|
|
13736
13672
|
return openBlock(), createElementBlock("i", {
|
|
@@ -13822,12 +13758,17 @@ const _sfc_main$D = create$D({
|
|
|
13822
13758
|
size: {
|
|
13823
13759
|
type: String,
|
|
13824
13760
|
default: "large"
|
|
13761
|
+
},
|
|
13762
|
+
strikeThrough: {
|
|
13763
|
+
type: Boolean,
|
|
13764
|
+
default: false
|
|
13825
13765
|
}
|
|
13826
13766
|
},
|
|
13827
13767
|
setup(props) {
|
|
13828
13768
|
const classes = computed(() => {
|
|
13829
13769
|
return {
|
|
13830
|
-
[componentName$s]: true
|
|
13770
|
+
[componentName$s]: true,
|
|
13771
|
+
[`${componentName$s}--strike`]: props.strikeThrough
|
|
13831
13772
|
};
|
|
13832
13773
|
});
|
|
13833
13774
|
const showSymbol = computed(() => {
|
|
@@ -13946,7 +13887,7 @@ const _sfc_main$C = create$C({
|
|
|
13946
13887
|
displayWidth: 0,
|
|
13947
13888
|
displayHeight: 0
|
|
13948
13889
|
});
|
|
13949
|
-
const touch = useTouch
|
|
13890
|
+
const touch = useTouch();
|
|
13950
13891
|
const vertical = computed(() => {
|
|
13951
13892
|
const { rootWidth, rootHeight } = props;
|
|
13952
13893
|
const rootRatio = rootHeight / rootWidth;
|
|
@@ -14104,7 +14045,6 @@ const _sfc_main$C = create$C({
|
|
|
14104
14045
|
checkTap();
|
|
14105
14046
|
touch.reset();
|
|
14106
14047
|
};
|
|
14107
|
-
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
|
14108
14048
|
const closeSwiper = () => {
|
|
14109
14049
|
emit("close");
|
|
14110
14050
|
};
|
|
@@ -15359,6 +15299,7 @@ const _sfc_main$w = create$w({
|
|
|
15359
15299
|
theme: { type: String, default: "light" },
|
|
15360
15300
|
location: { type: String, default: "bottom" },
|
|
15361
15301
|
offset: { type: Array, default: [0, 12] },
|
|
15302
|
+
arrowOffset: { type: Number, default: 0 },
|
|
15362
15303
|
customClass: { type: String, default: "" },
|
|
15363
15304
|
showArrow: { type: Boolean, default: true },
|
|
15364
15305
|
iconPrefix: { type: String, default: "nut-icon" },
|
|
@@ -15368,52 +15309,128 @@ const _sfc_main$w = create$w({
|
|
|
15368
15309
|
overlayStyle: { type: Object },
|
|
15369
15310
|
closeOnClickOverlay: { type: Boolean, default: true },
|
|
15370
15311
|
closeOnClickAction: { type: Boolean, default: true },
|
|
15371
|
-
closeOnClickOutside: { type: Boolean, default: true }
|
|
15312
|
+
closeOnClickOutside: { type: Boolean, default: true },
|
|
15313
|
+
targetId: { type: String, default: "" },
|
|
15314
|
+
bgColor: { type: String, default: "" }
|
|
15372
15315
|
},
|
|
15373
15316
|
emits: ["update", "update:visible", "close", "choose", "open"],
|
|
15374
15317
|
setup(props, { emit }) {
|
|
15375
15318
|
const popoverRef = ref();
|
|
15376
15319
|
const popoverContentRef = ref();
|
|
15377
15320
|
const showPopup = ref(props.visible);
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
rootHeight: 0
|
|
15381
|
-
});
|
|
15321
|
+
let rootRect = ref();
|
|
15322
|
+
let conentRootRect = ref();
|
|
15382
15323
|
const popoverArrow = computed(() => {
|
|
15383
15324
|
const prefixCls = "nut-popover-arrow";
|
|
15384
15325
|
const loca = props.location;
|
|
15385
15326
|
const direction = loca.split("-")[0];
|
|
15386
15327
|
return `${prefixCls} ${prefixCls}-${direction} ${prefixCls}--${loca}`;
|
|
15387
15328
|
});
|
|
15388
|
-
const
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15329
|
+
const popoverArrowStyle = computed(() => {
|
|
15330
|
+
const styles = {};
|
|
15331
|
+
const { bgColor, arrowOffset, location: location2 } = props;
|
|
15332
|
+
const direction = location2.split("-")[0];
|
|
15333
|
+
const skew = location2.split("-")[1];
|
|
15334
|
+
const base = 16;
|
|
15335
|
+
if (bgColor) {
|
|
15336
|
+
styles[`border${upperCaseFirst(direction)}Color`] = bgColor;
|
|
15337
|
+
}
|
|
15338
|
+
if (props.arrowOffset != 0) {
|
|
15339
|
+
if (["bottom", "top"].includes(direction)) {
|
|
15340
|
+
if (!skew) {
|
|
15341
|
+
styles.left = `calc(50% + ${arrowOffset}px)`;
|
|
15342
|
+
}
|
|
15343
|
+
if (skew == "start") {
|
|
15344
|
+
styles.left = `${base + arrowOffset}px`;
|
|
15345
|
+
}
|
|
15346
|
+
if (skew == "end") {
|
|
15347
|
+
styles.right = `${base - arrowOffset}px`;
|
|
15348
|
+
}
|
|
15349
|
+
}
|
|
15350
|
+
if (["left", "right"].includes(direction)) {
|
|
15351
|
+
if (!skew) {
|
|
15352
|
+
styles.top = `calc(50% - ${arrowOffset}px)`;
|
|
15353
|
+
}
|
|
15354
|
+
if (skew == "start") {
|
|
15355
|
+
styles.top = `${base - arrowOffset}px`;
|
|
15356
|
+
}
|
|
15357
|
+
if (skew == "end") {
|
|
15358
|
+
styles.bottom = `${base + arrowOffset}px`;
|
|
15359
|
+
}
|
|
15360
|
+
}
|
|
15361
|
+
}
|
|
15362
|
+
return styles;
|
|
15363
|
+
});
|
|
15364
|
+
const upperCaseFirst = (str) => {
|
|
15365
|
+
var str = str.toLowerCase();
|
|
15366
|
+
str = str.replace(/\b\w+\b/g, (word) => word.substring(0, 1).toUpperCase() + word.substring(1));
|
|
15367
|
+
return str;
|
|
15368
|
+
};
|
|
15369
|
+
const getRootPosition = computed(() => {
|
|
15370
|
+
let styles = {};
|
|
15371
|
+
if (!rootRect.value || !conentRootRect.value)
|
|
15372
|
+
return {};
|
|
15373
|
+
const conentWidth = conentRootRect.value.width;
|
|
15374
|
+
const conentHeight = conentRootRect.value.height;
|
|
15375
|
+
const { width, height, left, top } = rootRect.value;
|
|
15376
|
+
const { location: location2, offset } = props;
|
|
15377
|
+
const direction = location2.split("-")[0];
|
|
15378
|
+
const skew = location2.split("-")[1];
|
|
15379
|
+
let cross = 0;
|
|
15380
|
+
let parallel = 0;
|
|
15392
15381
|
if (isArray(offset) && offset.length == 2) {
|
|
15393
15382
|
cross += +offset[1];
|
|
15394
|
-
|
|
15383
|
+
parallel += +offset[0];
|
|
15384
|
+
}
|
|
15385
|
+
if (width) {
|
|
15386
|
+
if (["bottom", "top"].includes(direction)) {
|
|
15387
|
+
const h2 = direction == "bottom" ? height + cross : -(conentHeight + cross);
|
|
15388
|
+
styles.top = `${top + h2}px`;
|
|
15389
|
+
if (!skew) {
|
|
15390
|
+
styles.left = `${-(conentWidth - width) / 2 + left + parallel}px`;
|
|
15391
|
+
}
|
|
15392
|
+
if (skew == "start") {
|
|
15393
|
+
styles.left = `${left + parallel}px`;
|
|
15394
|
+
}
|
|
15395
|
+
if (skew == "end") {
|
|
15396
|
+
styles.left = `${rootRect.value.right + parallel}px`;
|
|
15397
|
+
}
|
|
15398
|
+
}
|
|
15399
|
+
if (["left", "right"].includes(direction)) {
|
|
15400
|
+
const contentW = direction == "left" ? -(conentWidth + cross) : width + cross;
|
|
15401
|
+
styles.left = `${left + contentW}px`;
|
|
15402
|
+
if (!skew) {
|
|
15403
|
+
styles.top = `${top - conentHeight / 2 + height / 2 - 4 + parallel}px`;
|
|
15404
|
+
}
|
|
15405
|
+
if (skew == "start") {
|
|
15406
|
+
styles.top = `${top + parallel}px`;
|
|
15407
|
+
}
|
|
15408
|
+
if (skew == "end") {
|
|
15409
|
+
styles.top = `${top + height + parallel}px`;
|
|
15410
|
+
}
|
|
15411
|
+
}
|
|
15395
15412
|
}
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
right: "left"
|
|
15403
|
-
};
|
|
15404
|
-
if (["top", "bottom"].includes(direction)) {
|
|
15405
|
-
style[mapd[direction]] = `${cross}px`;
|
|
15406
|
-
style.marginLeft = `${offset[0]}px`;
|
|
15407
|
-
} else {
|
|
15408
|
-
style[mapd[direction]] = `${lengthways}px`;
|
|
15409
|
-
style.marginTop = `${offset[0]}px`;
|
|
15413
|
+
return styles;
|
|
15414
|
+
});
|
|
15415
|
+
const customStyle = computed(() => {
|
|
15416
|
+
const styles = {};
|
|
15417
|
+
if (props.bgColor) {
|
|
15418
|
+
styles.background = props.bgColor;
|
|
15410
15419
|
}
|
|
15411
|
-
return
|
|
15420
|
+
return styles;
|
|
15412
15421
|
});
|
|
15413
15422
|
const getContentWidth = () => {
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15423
|
+
let rect2 = useRect(popoverRef.value);
|
|
15424
|
+
if (props.targetId) {
|
|
15425
|
+
rect2 = useRect(document.querySelector(`#${props.targetId}`));
|
|
15426
|
+
}
|
|
15427
|
+
rootRect.value = rect2;
|
|
15428
|
+
setTimeout(() => {
|
|
15429
|
+
conentRootRect.value = {
|
|
15430
|
+
height: popoverContentRef.value.clientHeight,
|
|
15431
|
+
width: popoverContentRef.value.clientWidth
|
|
15432
|
+
};
|
|
15433
|
+
}, 0);
|
|
15417
15434
|
};
|
|
15418
15435
|
watch(
|
|
15419
15436
|
() => props.visible,
|
|
@@ -15448,7 +15465,12 @@ const _sfc_main$w = create$w({
|
|
|
15448
15465
|
const clickAway = (event) => {
|
|
15449
15466
|
const element = popoverRef.value;
|
|
15450
15467
|
const elContent = popoverContentRef.value;
|
|
15451
|
-
|
|
15468
|
+
let el = element && !element.contains(event.target);
|
|
15469
|
+
if (props.targetId) {
|
|
15470
|
+
const dom = document.querySelector(`#${props.targetId}`);
|
|
15471
|
+
el = dom && !dom.contains(event.target);
|
|
15472
|
+
}
|
|
15473
|
+
if (el && elContent && !elContent.contains(event.target) && props.closeOnClickOutside) {
|
|
15452
15474
|
closePopover();
|
|
15453
15475
|
}
|
|
15454
15476
|
};
|
|
@@ -15459,8 +15481,10 @@ const _sfc_main$w = create$w({
|
|
|
15459
15481
|
closePopover,
|
|
15460
15482
|
chooseItem,
|
|
15461
15483
|
popoverRef,
|
|
15462
|
-
|
|
15463
|
-
|
|
15484
|
+
popoverContentRef,
|
|
15485
|
+
getRootPosition,
|
|
15486
|
+
customStyle,
|
|
15487
|
+
popoverArrowStyle
|
|
15464
15488
|
};
|
|
15465
15489
|
}
|
|
15466
15490
|
});
|
|
@@ -15471,59 +15495,64 @@ const _hoisted_1$r = {
|
|
|
15471
15495
|
const _hoisted_2$o = ["onClick"];
|
|
15472
15496
|
const _hoisted_3$m = { class: "nut-popover-menu-item-name" };
|
|
15473
15497
|
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15474
|
-
const
|
|
15498
|
+
const _component_Icon = resolveComponent("Icon");
|
|
15475
15499
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
15476
|
-
return openBlock(), createElementBlock(
|
|
15477
|
-
|
|
15478
|
-
|
|
15479
|
-
createElementVNode("view", {
|
|
15500
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
15501
|
+
!_ctx.targetId ? (openBlock(), createElementBlock("div", {
|
|
15502
|
+
key: 0,
|
|
15480
15503
|
class: "nut-popover-wrapper",
|
|
15481
15504
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.openPopover && _ctx.openPopover(...args)),
|
|
15482
15505
|
ref: "popoverRef"
|
|
15483
15506
|
}, [
|
|
15484
15507
|
renderSlot(_ctx.$slots, "reference")
|
|
15485
|
-
], 512),
|
|
15486
|
-
|
|
15487
|
-
|
|
15488
|
-
style: normalizeStyle(_ctx.
|
|
15489
|
-
|
|
15490
|
-
|
|
15491
|
-
|
|
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
|
-
|
|
15508
|
+
], 512)) : createCommentVNode("", true),
|
|
15509
|
+
createElementVNode("view", {
|
|
15510
|
+
class: normalizeClass(["nut-popover", `nut-popover--${_ctx.theme}`, `${_ctx.customClass}`]),
|
|
15511
|
+
style: normalizeStyle(_ctx.getRootPosition)
|
|
15512
|
+
}, [
|
|
15513
|
+
createVNode(_component_nut_popup, {
|
|
15514
|
+
popClass: `nut-popover-content nut-popover-content--${_ctx.location}`,
|
|
15515
|
+
style: normalizeStyle(_ctx.customStyle),
|
|
15516
|
+
visible: _ctx.showPopup,
|
|
15517
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.showPopup = $event),
|
|
15518
|
+
position: "",
|
|
15519
|
+
transition: "nut-popover",
|
|
15520
|
+
overlay: _ctx.overlay,
|
|
15521
|
+
duration: _ctx.duration,
|
|
15522
|
+
overlayStyle: _ctx.overlayStyle,
|
|
15523
|
+
overlayClass: _ctx.overlayClass,
|
|
15524
|
+
closeOnClickOverlay: _ctx.closeOnClickOverlay
|
|
15525
|
+
}, {
|
|
15526
|
+
default: withCtx(() => [
|
|
15527
|
+
createElementVNode("view", _hoisted_1$r, [
|
|
15528
|
+
_ctx.showArrow ? (openBlock(), createElementBlock("view", {
|
|
15529
|
+
key: 0,
|
|
15530
|
+
class: normalizeClass(_ctx.popoverArrow),
|
|
15531
|
+
style: normalizeStyle(_ctx.popoverArrowStyle)
|
|
15532
|
+
}, null, 6)) : createCommentVNode("", true),
|
|
15533
|
+
renderSlot(_ctx.$slots, "content"),
|
|
15534
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index) => {
|
|
15535
|
+
return openBlock(), createElementBlock("view", {
|
|
15536
|
+
key: index,
|
|
15537
|
+
class: normalizeClass([item.className, item.disabled && "nut-popover-menu-disabled", "nut-popover-menu-item"]),
|
|
15538
|
+
onClick: withModifiers(($event) => _ctx.chooseItem(item, index), ["stop"])
|
|
15539
|
+
}, [
|
|
15540
|
+
item.icon ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
15541
|
+
createVNode(_component_Icon, mergeProps(_ctx.$attrs, {
|
|
15542
|
+
class: "nut-popover-item-img",
|
|
15543
|
+
classPrefix: _ctx.iconPrefix,
|
|
15544
|
+
name: item.icon
|
|
15545
|
+
}), null, 16, ["classPrefix", "name"])
|
|
15546
|
+
]) : createCommentVNode("", true),
|
|
15547
|
+
createElementVNode("view", _hoisted_3$m, toDisplayString(item.name), 1)
|
|
15548
|
+
], 10, _hoisted_2$o);
|
|
15549
|
+
}), 128))
|
|
15550
|
+
], 512)
|
|
15551
|
+
]),
|
|
15552
|
+
_: 3
|
|
15553
|
+
}, 8, ["popClass", "style", "visible", "overlay", "duration", "overlayStyle", "overlayClass", "closeOnClickOverlay"])
|
|
15554
|
+
], 6)
|
|
15555
|
+
], 64);
|
|
15527
15556
|
}
|
|
15528
15557
|
var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$w]]);
|
|
15529
15558
|
const component$1 = {
|
|
@@ -19845,6 +19874,6 @@ function install(app) {
|
|
|
19845
19874
|
}
|
|
19846
19875
|
});
|
|
19847
19876
|
}
|
|
19848
|
-
const version = "3.3.0";
|
|
19877
|
+
const version = "3.3.1-beta.0";
|
|
19849
19878
|
var nutui_vue_build = { install, version, Locale };
|
|
19850
19879
|
export { ActionSheet, Address, AddressList, Animate, Audio, AudioOperate, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Category, CategoryPane, Cell, CellGroup, _sfc_main$1e as Checkbox, _sfc_main$1d as CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, Comment, _sfc_main$1H as ConfigProvider, CountDown, CountUp, DatePicker, _Dialog as Dialog, Divider, Drag, Ecard, Elevator, Ellipsis, Empty, FixedNav, Form, FormItem, _sfc_main$1A as Grid, GridItem, _sfc_main$1N as Icon, Image$1 as Image, _ImagePreview as ImagePreview, Indicator, InfiniteLoading, Input, InputNumber, Invoice, _sfc_main$1F as Layout, List, Locale, Menu, MenuItem, Navbar, NoticeBar, NotifyFunction as Notify, NumberKeyboard, OverLay, Pagination, Picker, Popover, Popup, Price, Progress, _sfc_main$17 as Radio, _sfc_main$16 as RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Sku, Step, _sfc_main$H as Steps, _sfc_main$1C as Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, ToastFunction as Toast, TrendArrow, Uploader, Video, WaterMark, nutui_vue_build as default, install, version };
|