@nutui/nutui 3.2.7 → 3.2.8-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 +1931 -3371
- package/dist/nutui.umd.js +1928 -3369
- package/dist/packages/_es/ActionSheet.js +2 -5
- package/dist/packages/_es/Address.js +162 -250
- package/dist/packages/_es/AddressList.js +229 -307
- 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 +2 -5
- 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 +4 -11
- package/dist/packages/_es/CollapseItem.js +8 -5
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +2 -10
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +8 -17
- package/dist/packages/_es/Dialog.js +38 -63
- 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 +2 -2
- 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 +39 -31
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +2 -2
- 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 +126 -220
- package/dist/packages/_es/Indicator.js +4 -4
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +107 -123
- 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 +14 -1
- package/dist/packages/_es/MenuItem.js +10 -7
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +5 -7
- package/dist/packages/_es/NumberKeyboard.js +4 -4
- package/dist/packages/_es/OverLay.js +60 -63
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +25 -50
- package/dist/packages/_es/Popover.js +111 -930
- package/dist/packages/_es/Popup.js +105 -217
- package/dist/packages/_es/Price.js +1 -1
- 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 +4 -4
- 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 +4 -7
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +2 -2
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +2 -2
- 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 +4 -4
- package/dist/packages/_es/Toast.js +5 -6
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +2 -2
- 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 +22 -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 +32 -0
- package/dist/packages/_es/mountComponent.js +42 -0
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/props.js +80 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +1 -1
- package/dist/packages/address/index.scss +7 -2
- package/dist/packages/addresslist/index.scss +61 -101
- package/dist/packages/imagepreview/index.scss +9 -1
- package/dist/packages/inputnumber/index.scss +5 -1
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/menuitem/index.scss +0 -15
- package/dist/packages/notify/index.scss +2 -2
- package/dist/packages/overlay/index.scss +2 -1
- package/dist/packages/picker/index.scss +20 -12
- package/dist/packages/popover/index.scss +191 -363
- package/dist/packages/popup/index.scss +3 -14
- package/dist/smartips/attributes.json +59 -55
- package/dist/smartips/tags.json +16 -19
- package/dist/smartips/web-types.json +114 -112
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +51 -52
- package/dist/styles/themes/jdb.scss +51 -52
- package/dist/styles/themes/jddkh.scss +51 -52
- package/dist/styles/themes/jdt.scss +51 -52
- package/dist/styles/variables.scss +9 -0
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +58 -54
- package/dist/types/__VUE/address/index.vue.d.ts +72 -92
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +29 -9
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +4 -13
- package/dist/types/__VUE/addresslist/components/SwipeShell.vue.d.ts +9 -9
- package/dist/types/__VUE/addresslist/index.vue.d.ts +23 -20
- 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/cascader/index.vue.d.ts +47 -52
- package/dist/types/__VUE/cell/index.vue.d.ts +3 -3
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countdown/index.vue.d.ts +0 -1
- package/dist/types/__VUE/countdown/util.d.ts +0 -1
- package/dist/types/__VUE/datepicker/index.vue.d.ts +55 -60
- package/dist/types/__VUE/dialog/index.d.ts +0 -3
- package/dist/types/__VUE/dialog/index.vue.d.ts +48 -57
- package/dist/types/__VUE/form/common.d.ts +4 -2
- package/dist/types/__VUE/form/index.vue.d.ts +4 -4
- 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 +27 -20
- package/dist/types/__VUE/imagepreview/index.d.ts +19 -5
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +56 -42
- package/dist/types/__VUE/imagepreview/types.d.ts +44 -0
- package/dist/types/__VUE/indicator/index.vue.d.ts +1 -0
- package/dist/types/__VUE/input/index.vue.d.ts +37 -25
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
- package/dist/types/__VUE/invoice/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/notify/index.vue.d.ts +3 -3
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +3 -3
- package/dist/types/__VUE/overlay/index.vue.d.ts +11 -12
- package/dist/types/__VUE/picker/Column.vue.d.ts +0 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +56 -63
- package/dist/types/__VUE/popover/index.vue.d.ts +37 -140
- package/dist/types/__VUE/popup/common.d.ts +103 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +55 -1591
- package/dist/types/__VUE/popup/props.d.ts +82 -0
- 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/shortpassword/index.vue.d.ts +4 -4
- package/dist/types/__VUE/sku/index.vue.d.ts +56 -61
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -3
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/__VUE/uploader/index.vue.d.ts +1 -1
- package/dist/types/__VUE/video/index.vue.d.ts +3 -3
- package/dist/types/nutui.d.ts +1 -2
- package/package.json +2 -3
- package/dist/packages/_es/PullRefresh.js +0 -349
- package/dist/packages/pullrefresh/index.scss +0 -71
- package/dist/types/__VUE/addresslist/components/LongPressShell.vue.d.ts +0 -47
- package/dist/types/__VUE/datepicker/utils.d.ts +0 -5
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +0 -5
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +0 -128
- package/dist/types/__VUE/pullrefresh/use-touch.d.ts +0 -20
- package/dist/types/__VUE/pullrefresh/util.d.ts +0 -6
|
@@ -1,46 +1,63 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.7 Fri
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed,
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
6
|
+
import { computed, watchEffect, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow } from "vue";
|
|
7
|
+
import { b as body, c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
default: ""
|
|
27
|
-
},
|
|
28
|
-
lockScroll: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
overlayStyle: {
|
|
33
|
-
type: Object
|
|
34
|
-
},
|
|
35
|
-
closeOnClickOverlay: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: true
|
|
38
|
-
}
|
|
10
|
+
let count = 0;
|
|
11
|
+
const CLSNAME = "nut-overflow-hidden";
|
|
12
|
+
const useLockScroll = (isLock) => {
|
|
13
|
+
const lock = () => {
|
|
14
|
+
if (isLock()) {
|
|
15
|
+
!count && body.classList.add(CLSNAME);
|
|
16
|
+
count++;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const unlock = () => {
|
|
20
|
+
if (isLock() && count) {
|
|
21
|
+
count--;
|
|
22
|
+
!count && body.classList.remove(CLSNAME);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return [lock, unlock];
|
|
39
26
|
};
|
|
27
|
+
const { componentName, create } = createComponent("overlay");
|
|
40
28
|
const _sfc_main = create({
|
|
41
|
-
props:
|
|
29
|
+
props: {
|
|
30
|
+
visible: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false
|
|
33
|
+
},
|
|
34
|
+
zIndex: {
|
|
35
|
+
type: [Number, String],
|
|
36
|
+
default: 2e3
|
|
37
|
+
},
|
|
38
|
+
duration: {
|
|
39
|
+
type: [Number, String],
|
|
40
|
+
default: 0.3
|
|
41
|
+
},
|
|
42
|
+
lockScroll: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
overlayClass: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
overlayStyle: {
|
|
51
|
+
type: Object
|
|
52
|
+
},
|
|
53
|
+
closeOnClickOverlay: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
42
58
|
emits: ["click", "update:visible"],
|
|
43
59
|
setup(props, { emit }) {
|
|
60
|
+
const [lock, unlock] = useLockScroll(() => props.lockScroll);
|
|
44
61
|
const classes = computed(() => {
|
|
45
62
|
const prefixCls = componentName;
|
|
46
63
|
return {
|
|
@@ -48,42 +65,23 @@ const _sfc_main = create({
|
|
|
48
65
|
[props.overlayClass]: true
|
|
49
66
|
};
|
|
50
67
|
});
|
|
51
|
-
watch(
|
|
52
|
-
() => props.visible,
|
|
53
|
-
(value) => {
|
|
54
|
-
value ? lock() : unlock();
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
const lock = () => {
|
|
58
|
-
if (props.lockScroll && props.visible) {
|
|
59
|
-
document.body.classList.add("nut-overflow-hidden");
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const unlock = () => {
|
|
63
|
-
document.body.classList.remove("nut-overflow-hidden");
|
|
64
|
-
};
|
|
65
|
-
onDeactivated(unlock);
|
|
66
|
-
onBeforeUnmount(unlock);
|
|
67
|
-
onMounted(lock);
|
|
68
|
-
onActivated(lock);
|
|
69
68
|
const style = computed(() => {
|
|
70
69
|
return {
|
|
71
|
-
|
|
70
|
+
transitionDuration: `${props.duration}s`,
|
|
72
71
|
zIndex: props.zIndex,
|
|
73
72
|
...props.overlayStyle
|
|
74
73
|
};
|
|
75
74
|
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
75
|
+
watchEffect(() => {
|
|
76
|
+
props.visible ? lock() : unlock();
|
|
77
|
+
});
|
|
80
78
|
const onClick = (e) => {
|
|
81
|
-
emit("click", e);
|
|
82
79
|
if (props.closeOnClickOverlay) {
|
|
83
80
|
emit("update:visible", false);
|
|
81
|
+
emit("click", e);
|
|
84
82
|
}
|
|
85
83
|
};
|
|
86
|
-
return { classes, style,
|
|
84
|
+
return { classes, style, onClick };
|
|
87
85
|
}
|
|
88
86
|
});
|
|
89
87
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -91,17 +89,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
91
89
|
default: withCtx(() => [
|
|
92
90
|
withDirectives(createElementVNode("view", {
|
|
93
91
|
class: normalizeClass(_ctx.classes),
|
|
94
|
-
|
|
95
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
92
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"])),
|
|
96
93
|
style: normalizeStyle(_ctx.style)
|
|
97
94
|
}, [
|
|
98
95
|
renderSlot(_ctx.$slots, "default")
|
|
99
|
-
],
|
|
96
|
+
], 6), [
|
|
100
97
|
[vShow, _ctx.visible]
|
|
101
98
|
])
|
|
102
99
|
]),
|
|
103
100
|
_: 3
|
|
104
101
|
});
|
|
105
102
|
}
|
|
106
|
-
var
|
|
107
|
-
export {
|
|
103
|
+
var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
104
|
+
export { OverLay as default };
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.7 Fri
|
|
2
|
+
* @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, onBeforeUnmount, resolveComponent, createVNode, withCtx, renderSlot } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
8
|
-
import Popup
|
|
7
|
+
import { c as createComponent, a as preventDefault } from "./component.js";
|
|
8
|
+
import Popup from "./Popup.js";
|
|
9
|
+
import { p as popupProps } from "./props.js";
|
|
9
10
|
import { u as useTouch } from "./index4.js";
|
|
10
11
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
12
|
import "../locale/lang";
|
|
12
|
-
import "./OverLay.js";
|
|
13
|
-
import "./Icon.js";
|
|
14
|
-
import "./pxCheck.js";
|
|
15
13
|
const { create: create$1 } = createComponent("picker-column");
|
|
16
14
|
const _sfc_main$1 = create$1({
|
|
17
15
|
props: {
|
|
@@ -55,11 +53,9 @@ const _sfc_main$1 = create$1({
|
|
|
55
53
|
transformY: 0,
|
|
56
54
|
scrollDistance: 0,
|
|
57
55
|
lineSpacing: 36,
|
|
58
|
-
rotation: 20
|
|
59
|
-
timer: null
|
|
56
|
+
rotation: 20
|
|
60
57
|
});
|
|
61
58
|
const roller = ref(null);
|
|
62
|
-
const list = ref(null);
|
|
63
59
|
const moving = ref(false);
|
|
64
60
|
const touchDeg = ref(0);
|
|
65
61
|
const touchTime = ref(0);
|
|
@@ -84,12 +80,17 @@ const _sfc_main$1 = create$1({
|
|
|
84
80
|
const onTouchStart = (event) => {
|
|
85
81
|
touch.start(event);
|
|
86
82
|
if (moving.value) {
|
|
87
|
-
let dom =
|
|
88
|
-
if (!props.threeDimensional) {
|
|
89
|
-
dom = roller.value;
|
|
90
|
-
}
|
|
83
|
+
let dom = roller.value;
|
|
91
84
|
const { transform } = window.getComputedStyle(dom);
|
|
92
|
-
|
|
85
|
+
if (props.threeDimensional) {
|
|
86
|
+
const circle = Math.floor(parseFloat(touchDeg.value) / 360);
|
|
87
|
+
const cos = +transform.split(", ")[5];
|
|
88
|
+
const sin = +transform.split(", ")[6] < 0 ? 180 : 0;
|
|
89
|
+
const endDeg = circle * 360 + Math.acos(cos) / Math.PI * 180 + sin;
|
|
90
|
+
state.scrollDistance = -Math.abs((endDeg / state.rotation - 1) * state.lineSpacing);
|
|
91
|
+
} else {
|
|
92
|
+
state.scrollDistance = +transform.slice(7, transform.length - 1).split(", ")[5];
|
|
93
|
+
}
|
|
93
94
|
}
|
|
94
95
|
state.touchParams.startY = touch.deltaY.value;
|
|
95
96
|
state.touchParams.startTime = Date.now();
|
|
@@ -179,14 +180,6 @@ const _sfc_main$1 = create$1({
|
|
|
179
180
|
type && setChooseValue();
|
|
180
181
|
setMove(-move);
|
|
181
182
|
};
|
|
182
|
-
const preventDefault = (event, isStopPropagation) => {
|
|
183
|
-
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
184
|
-
event.preventDefault();
|
|
185
|
-
}
|
|
186
|
-
if (isStopPropagation) {
|
|
187
|
-
event.stopPropagation();
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
183
|
const stopMomentum = () => {
|
|
191
184
|
moving.value = false;
|
|
192
185
|
touchTime.value = 0;
|
|
@@ -224,7 +217,6 @@ const _sfc_main$1 = create$1({
|
|
|
224
217
|
setRollerStyle,
|
|
225
218
|
isHidden,
|
|
226
219
|
roller,
|
|
227
|
-
list,
|
|
228
220
|
onTouchStart,
|
|
229
221
|
onTouchMove,
|
|
230
222
|
onTouchEnd,
|
|
@@ -240,10 +232,6 @@ const _hoisted_1$1 = {
|
|
|
240
232
|
class: "nut-picker-roller-item-tile"
|
|
241
233
|
};
|
|
242
234
|
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("view", { class: "nut-picker-roller-mask" }, null, -1);
|
|
243
|
-
const _hoisted_3$1 = {
|
|
244
|
-
key: 0,
|
|
245
|
-
class: "nut-picker-content"
|
|
246
|
-
};
|
|
247
235
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
248
236
|
return openBlock(), createElementBlock("view", {
|
|
249
237
|
class: "nut-picker__list",
|
|
@@ -270,14 +258,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
270
258
|
], 64);
|
|
271
259
|
}), 128))
|
|
272
260
|
], 36),
|
|
273
|
-
_hoisted_2$1
|
|
274
|
-
_ctx.threeDimensional ? (openBlock(), createElementBlock("view", _hoisted_3$1, [
|
|
275
|
-
createElementVNode("view", {
|
|
276
|
-
class: "nut-picker-list-panel",
|
|
277
|
-
ref: "list",
|
|
278
|
-
style: normalizeStyle(_ctx.touchTileStyle)
|
|
279
|
-
}, null, 4)
|
|
280
|
-
])) : createCommentVNode("", true)
|
|
261
|
+
_hoisted_2$1
|
|
281
262
|
], 32);
|
|
282
263
|
}
|
|
283
264
|
var column = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
@@ -447,6 +428,7 @@ const _sfc_main = create({
|
|
|
447
428
|
});
|
|
448
429
|
emit("update:visible", false);
|
|
449
430
|
};
|
|
431
|
+
const isSameValue = (valA, valB) => JSON.stringify(valA) === JSON.stringify(valB);
|
|
450
432
|
onMounted(() => {
|
|
451
433
|
if (props.visible)
|
|
452
434
|
state.show = props.visible;
|
|
@@ -458,8 +440,7 @@ const _sfc_main = create({
|
|
|
458
440
|
watch(
|
|
459
441
|
() => props.modelValue,
|
|
460
442
|
(newValues) => {
|
|
461
|
-
|
|
462
|
-
if (!isSameValue) {
|
|
443
|
+
if (!isSameValue(newValues, defaultValues.value)) {
|
|
463
444
|
defaultValues.value = newValues;
|
|
464
445
|
}
|
|
465
446
|
},
|
|
@@ -468,8 +449,7 @@ const _sfc_main = create({
|
|
|
468
449
|
watch(
|
|
469
450
|
defaultValues,
|
|
470
451
|
(newValues) => {
|
|
471
|
-
|
|
472
|
-
if (!isSameValue) {
|
|
452
|
+
if (!isSameValue(newValues, props.modelValue)) {
|
|
473
453
|
emit("update:modelValue", newValues);
|
|
474
454
|
}
|
|
475
455
|
},
|
|
@@ -509,11 +489,7 @@ const _sfc_main = create({
|
|
|
509
489
|
});
|
|
510
490
|
const _hoisted_1 = { class: "nut-picker__bar" };
|
|
511
491
|
const _hoisted_2 = { class: "nut-picker__title" };
|
|
512
|
-
const _hoisted_3 = {
|
|
513
|
-
class: "nut-picker__column",
|
|
514
|
-
ref: "wrapHeight"
|
|
515
|
-
};
|
|
516
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode("view", { class: "nut-picker__hairline" }, null, -1);
|
|
492
|
+
const _hoisted_3 = { class: "nut-picker__column" };
|
|
517
493
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
518
494
|
const _component_nut_picker_column = resolveComponent("nut-picker-column");
|
|
519
495
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
@@ -529,25 +505,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
529
505
|
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
530
506
|
onClose: _ctx.close,
|
|
531
507
|
round: true,
|
|
532
|
-
|
|
508
|
+
teleportDisable: _ctx.teleportDisable,
|
|
533
509
|
safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
|
|
534
510
|
destroyOnClose: _ctx.destroyOnClose
|
|
535
511
|
}, {
|
|
536
512
|
default: withCtx(() => [
|
|
537
513
|
createElementVNode("view", _hoisted_1, [
|
|
538
514
|
createElementVNode("view", {
|
|
539
|
-
class: "nut-
|
|
515
|
+
class: "nut-picker__left",
|
|
540
516
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
|
|
541
517
|
}, toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1),
|
|
542
518
|
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.title), 1),
|
|
543
519
|
createElementVNode("view", {
|
|
544
|
-
class: "nut-
|
|
520
|
+
class: "nut-picker__right",
|
|
545
521
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirmHandler())
|
|
546
522
|
}, toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)
|
|
547
523
|
]),
|
|
548
524
|
renderSlot(_ctx.$slots, "top"),
|
|
549
525
|
createElementVNode("view", _hoisted_3, [
|
|
550
|
-
_hoisted_4,
|
|
551
526
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columnsList, (column2, columnIndex) => {
|
|
552
527
|
return openBlock(), createElementBlock("view", {
|
|
553
528
|
class: "nut-picker__columnitem",
|
|
@@ -569,11 +544,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
569
544
|
}, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "swipeDuration", "onChange"])
|
|
570
545
|
]);
|
|
571
546
|
}), 128))
|
|
572
|
-
]
|
|
547
|
+
]),
|
|
573
548
|
renderSlot(_ctx.$slots, "default")
|
|
574
549
|
]),
|
|
575
550
|
_: 3
|
|
576
|
-
}, 8, ["visible", "teleport", "lock-scroll", "close-on-click-overlay", "onClose", "
|
|
551
|
+
}, 8, ["visible", "teleport", "lock-scroll", "close-on-click-overlay", "onClose", "teleportDisable", "safeAreaInsetBottom", "destroyOnClose"])
|
|
577
552
|
], 2);
|
|
578
553
|
}
|
|
579
554
|
var Picker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|