@nutui/nutui 3.2.5-beta.1 → 3.2.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/nutui.es.js +4214 -4444
- package/dist/nutui.umd.js +4213 -4543
- package/dist/packages/_es/ActionSheet.js +18 -19
- package/dist/packages/_es/Address.js +94 -85
- package/dist/packages/_es/AddressList.js +25 -12
- package/dist/packages/_es/Animate.js +3 -3
- package/dist/packages/_es/Audio.js +9 -2
- package/dist/packages/_es/AudioOperate.js +5 -1
- package/dist/packages/_es/Avatar.js +10 -10
- package/dist/packages/_es/AvatarGroup.js +5 -5
- package/dist/packages/_es/BackTop.js +55 -108
- package/dist/packages/_es/Badge.js +6 -4
- package/dist/packages/_es/Barrage.js +79 -103
- package/dist/packages/_es/Button.js +5 -3
- package/dist/packages/_es/Calendar.js +36 -23
- package/dist/packages/_es/CalendarItem.js +4 -3
- package/dist/packages/_es/Card.js +15 -5
- package/dist/packages/_es/Cascader.js +12 -11
- package/dist/packages/_es/Category.js +13 -12
- package/dist/packages/_es/CategoryPane.js +17 -13
- package/dist/packages/_es/Cell.js +9 -12
- package/dist/packages/_es/CellGroup.js +4 -2
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +98 -82
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +65 -34
- package/dist/packages/_es/CollapseItem.js +93 -60
- package/dist/packages/_es/Comment.js +43 -19
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -3
- package/dist/packages/_es/CountUp.js +47 -52
- package/dist/packages/_es/DatePicker.js +37 -54
- package/dist/packages/_es/Dialog.js +9 -88
- package/dist/packages/_es/Divider.js +3 -3
- package/dist/packages/_es/Drag.js +75 -49
- package/dist/packages/_es/Ecard.js +20 -18
- package/dist/packages/_es/Elevator.js +101 -76
- package/dist/packages/_es/Ellipsis.js +140 -100
- package/dist/packages/_es/Empty.js +6 -4
- package/dist/packages/_es/FixedNav.js +11 -6
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +3 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +10 -27
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +13 -114
- package/dist/packages/_es/ImagePreview.js +154 -400
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +103 -115
- package/dist/packages/_es/Input.js +54 -26
- package/dist/packages/_es/InputNumber.js +25 -16
- package/dist/packages/_es/Invoice.js +6 -5
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +47 -34
- package/dist/packages/_es/Menu.js +35 -35
- package/dist/packages/_es/MenuItem.js +56 -29
- package/dist/packages/_es/Navbar.js +49 -39
- package/dist/packages/_es/NoticeBar.js +52 -41
- package/dist/packages/_es/Notify.js +37 -166
- package/dist/packages/_es/NumberKeyboard.js +15 -20
- package/dist/packages/_es/OldPicker.js +130 -116
- package/dist/packages/_es/OverLay.js +5 -28
- package/dist/packages/_es/Pagination.js +8 -5
- package/dist/packages/_es/Picker.js +196 -65
- package/dist/packages/_es/Popover.js +201 -881
- package/dist/packages/_es/Popup.js +28 -84
- package/dist/packages/_es/Price.js +22 -6
- package/dist/packages/_es/Progress.js +18 -11
- package/dist/packages/_es/PullRefresh.js +4 -2
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +48 -34
- package/dist/packages/_es/Rate.js +15 -14
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +39 -36
- package/dist/packages/_es/ShortPassword.js +97 -66
- package/dist/packages/_es/SideNavBar.js +7 -18
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +113 -80
- package/dist/packages/_es/Skeleton.js +12 -11
- package/dist/packages/_es/Sku.js +63 -38
- package/dist/packages/_es/Step.js +7 -2
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +33 -23
- package/dist/packages/_es/SubSideNavBar.js +4 -2
- package/dist/packages/_es/Swipe.js +41 -26
- package/dist/packages/_es/Swiper.js +38 -21
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +8 -8
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +40 -9
- package/dist/packages/_es/TabbarItem.js +24 -30
- package/dist/packages/_es/Table.js +22 -17
- package/dist/packages/_es/Tabs.js +49 -16
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +114 -49
- package/dist/packages/_es/TimeDetail.js +4 -3
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +12 -10
- package/dist/packages/_es/Toast.js +53 -164
- package/dist/packages/_es/TrendArrow.js +6 -4
- package/dist/packages/_es/Uploader.js +141 -140
- package/dist/packages/_es/Video.js +72 -5
- package/dist/packages/_es/WaterMark.js +22 -14
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +44 -6
- package/dist/packages/_es/{index5.js → index.taro.js} +167 -154
- package/dist/packages/_es/index2.js +8 -31
- package/dist/packages/_es/index3.js +64 -7
- package/dist/packages/_es/index4.js +424 -62
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +21 -3
- package/dist/packages/_es/use-lock-scroll.js +23 -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/signature/index.scss +4 -1
- package/dist/packages/swiperitem/index.scss +1 -1
- package/dist/smartips/attributes.json +4 -0
- package/dist/smartips/tags.json +2 -1
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +44 -44
- package/dist/styles/themes/jdb.scss +44 -44
- package/dist/styles/themes/jddkh.scss +44 -44
- package/dist/styles/themes/jdt.scss +44 -44
- package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
- package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +73 -33
- package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/animate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +6 -6
- package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/backtop/{index.vue.d.ts → index.taro.vue.d.ts} +15 -37
- package/dist/types/__VUE/badge/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/button/index.taro.vue.d.ts +116 -0
- package/dist/types/__VUE/button/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +13 -1
- package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +17 -17
- package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cell/{index.vue.d.ts → index.taro.vue.d.ts} +13 -6
- package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/circleprogress/{index.vue.d.ts → index.taro.vue.d.ts} +14 -15
- package/dist/types/__VUE/collapse/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/collapseitem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -10
- package/dist/types/__VUE/comment/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
- package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +5 -5
- package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +9 -12
- package/dist/types/__VUE/divider/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +3 -3
- package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +11 -2
- package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +4 -0
- package/dist/types/__VUE/empty/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/form/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/griditem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -27
- package/dist/types/__VUE/icon/index.taro.vue.d.ts +74 -0
- package/dist/types/__VUE/image/index.taro.vue.d.ts +33 -0
- package/dist/types/__VUE/imagepreview/{index.vue.d.ts → index.taro.vue.d.ts} +40 -42
- package/dist/types/__VUE/indicator/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/infiniteloading/{index.vue.d.ts → index.taro.vue.d.ts} +15 -8
- package/dist/types/__VUE/input/{index.vue.d.ts → index.taro.vue.d.ts} +34 -16
- package/dist/types/__VUE/inputnumber/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/menu/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +4 -3
- package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +10 -25
- package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +5 -29
- package/dist/types/__VUE/oldpicker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +28 -17
- package/dist/types/__VUE/oldpicker/{index.vue.d.ts → index.taro.vue.d.ts} +64 -44
- package/dist/types/__VUE/overlay/index.taro.vue.d.ts +85 -0
- package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/picker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +16 -4
- package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +53 -28
- package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +15 -13
- package/dist/types/__VUE/popup/index.taro.vue.d.ts +1728 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/price/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/progress/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/radio/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +8 -7
- package/dist/types/__VUE/rate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +19 -19
- package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +6 -21
- package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -5
- package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +8 -5
- package/dist/types/__VUE/skeleton/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +54 -182
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{index.vue.d.ts → index.taro.vue.d.ts} +10 -0
- package/dist/types/__VUE/tabbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
- package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{index.vue.d.ts → index.taro.vue.d.ts} +4 -4
- package/dist/types/__VUE/textarea/{index.vue.d.ts → index.taro.vue.d.ts} +5 -3
- package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +7 -8
- package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +44 -22
- package/dist/types/__VUE/trendarrow/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +22 -13
- package/dist/types/__VUE/video/index.vue.d.ts +3 -1
- package/dist/types/__VUE/watermark/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +89 -89
- package/package.json +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +0 -48
- package/dist/types/__VUE/image/index.vue.d.ts +0 -117
- package/dist/types/__VUE/image/type.d.ts +0 -6
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -108
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -25
- package/dist/types/__VUE/notify/index.d.ts +0 -26
- package/dist/types/__VUE/tag/type.d.ts +0 -5
- package/dist/types/__VUE/toast/index.d.ts +0 -16
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { reactive, computed, onMounted, onBeforeUnmount, onBeforeMount, onActivated, onDeactivated, watch, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, normalizeClass, normalizeStyle, createCommentVNode, createTextVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, renderSlot, vShow, mergeProps } from "vue";
|
|
7
|
+
import { u as useLockScroll } from "./use-lock-scroll.js";
|
|
7
8
|
import overlay, { overlayProps } from "./OverLay.js";
|
|
8
9
|
import _sfc_main$1 from "./Icon.js";
|
|
9
10
|
import { c as createComponent } from "./component.js";
|
|
10
11
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
12
|
import "../locale/lang";
|
|
12
13
|
import "./pxCheck.js";
|
|
13
|
-
let count = 0;
|
|
14
|
-
const CLSNAME = "nut-overflow-hidden";
|
|
15
|
-
const useLockScroll = (isLock) => {
|
|
16
|
-
const lock = () => {
|
|
17
|
-
if (isLock()) {
|
|
18
|
-
!count && document.body.classList.add(CLSNAME);
|
|
19
|
-
count++;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const unlock = () => {
|
|
23
|
-
if (isLock() && count) {
|
|
24
|
-
count--;
|
|
25
|
-
!count && document.body.classList.remove(CLSNAME);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return [lock, unlock];
|
|
29
|
-
};
|
|
30
14
|
const { componentName, create } = createComponent("popup");
|
|
31
15
|
let _zIndex = 2e3;
|
|
32
16
|
const popupProps = {
|
|
@@ -71,16 +55,13 @@ const popupProps = {
|
|
|
71
55
|
type: Boolean,
|
|
72
56
|
default: false
|
|
73
57
|
},
|
|
74
|
-
isWrapTeleport: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: true
|
|
77
|
-
},
|
|
78
58
|
safeAreaInsetBottom: {
|
|
79
59
|
type: Boolean,
|
|
80
60
|
default: false
|
|
81
61
|
}
|
|
82
62
|
};
|
|
83
63
|
const _sfc_main = create({
|
|
64
|
+
children: [overlay],
|
|
84
65
|
components: {
|
|
85
66
|
[overlay.name]: overlay,
|
|
86
67
|
[_sfc_main$1.name]: _sfc_main$1
|
|
@@ -90,9 +71,8 @@ const _sfc_main = create({
|
|
|
90
71
|
},
|
|
91
72
|
emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
|
|
92
73
|
setup(props, { emit }) {
|
|
93
|
-
const popupRef = ref();
|
|
94
74
|
const state = reactive({
|
|
95
|
-
zIndex: props.zIndex,
|
|
75
|
+
zIndex: props.zIndex ? props.zIndex : _zIndex,
|
|
96
76
|
showSlot: true,
|
|
97
77
|
transitionName: `popup-fade-${props.position}`,
|
|
98
78
|
overLayCount: 1,
|
|
@@ -130,13 +110,15 @@ const _sfc_main = create({
|
|
|
130
110
|
emit("open");
|
|
131
111
|
};
|
|
132
112
|
const close = () => {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
113
|
+
if (props.visible) {
|
|
114
|
+
unlockScroll();
|
|
115
|
+
emit("update:visible", false);
|
|
116
|
+
emit("close");
|
|
117
|
+
if (props.destroyOnClose) {
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
state.showSlot = false;
|
|
120
|
+
}, +props.duration * 1e3);
|
|
121
|
+
}
|
|
140
122
|
}
|
|
141
123
|
};
|
|
142
124
|
const onClick = (e) => {
|
|
@@ -212,19 +194,16 @@ const _sfc_main = create({
|
|
|
212
194
|
onClickCloseIcon,
|
|
213
195
|
onClickOverlay,
|
|
214
196
|
onOpened,
|
|
215
|
-
onClosed
|
|
216
|
-
popupRef
|
|
197
|
+
onClosed
|
|
217
198
|
};
|
|
218
199
|
}
|
|
219
200
|
});
|
|
220
|
-
const _hoisted_1 =
|
|
201
|
+
const _hoisted_1 = ["catch-move"];
|
|
202
|
+
const _hoisted_2 = { class: "nutui-popup__content-wrapper" };
|
|
221
203
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
222
204
|
const _component_nut_overlay = resolveComponent("nut-overlay");
|
|
223
205
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
224
|
-
return
|
|
225
|
-
key: 0,
|
|
226
|
-
to: _ctx.teleport
|
|
227
|
-
}, [
|
|
206
|
+
return openBlock(), createElementBlock("view", { "catch-move": _ctx.lockScroll }, [
|
|
228
207
|
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
229
208
|
key: 0,
|
|
230
209
|
visible: _ctx.visible,
|
|
@@ -236,6 +215,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
236
215
|
duration: _ctx.duration,
|
|
237
216
|
onClick: _ctx.onClickOverlay
|
|
238
217
|
}, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
|
|
218
|
+
createTextVNode(),
|
|
239
219
|
createVNode(Transition, {
|
|
240
220
|
name: _ctx.transitionName,
|
|
241
221
|
onAfterEnter: _ctx.onOpened,
|
|
@@ -245,12 +225,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
245
225
|
withDirectives(createElementVNode("view", {
|
|
246
226
|
class: normalizeClass(_ctx.classes),
|
|
247
227
|
style: normalizeStyle(_ctx.popStyle),
|
|
248
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
249
|
-
ref: "popupRef"
|
|
228
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
250
229
|
}, [
|
|
251
|
-
|
|
230
|
+
withDirectives(createElementVNode("div", _hoisted_2, [
|
|
231
|
+
renderSlot(_ctx.$slots, "default")
|
|
232
|
+
], 512), [
|
|
233
|
+
[vShow, _ctx.showSlot]
|
|
234
|
+
]),
|
|
235
|
+
createTextVNode(),
|
|
252
236
|
_ctx.closed ? (openBlock(), createElementBlock("view", {
|
|
253
|
-
key:
|
|
237
|
+
key: 0,
|
|
254
238
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
|
|
255
239
|
class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
|
|
256
240
|
}, [
|
|
@@ -265,47 +249,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
265
249
|
]),
|
|
266
250
|
_: 3
|
|
267
251
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
268
|
-
], 8,
|
|
269
|
-
_ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
|
|
270
|
-
key: 0,
|
|
271
|
-
visible: _ctx.visible,
|
|
272
|
-
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
273
|
-
class: normalizeClass(_ctx.overlayClass),
|
|
274
|
-
style: normalizeStyle(_ctx.overlayStyle),
|
|
275
|
-
"z-index": _ctx.zIndex,
|
|
276
|
-
"lock-scroll": _ctx.lockScroll,
|
|
277
|
-
duration: _ctx.duration,
|
|
278
|
-
onClick: _ctx.onClickOverlay
|
|
279
|
-
}, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
|
|
280
|
-
createVNode(Transition, {
|
|
281
|
-
name: _ctx.transitionName,
|
|
282
|
-
onAfterEnter: _ctx.onOpened,
|
|
283
|
-
onAfterLeave: _ctx.onClosed
|
|
284
|
-
}, {
|
|
285
|
-
default: withCtx(() => [
|
|
286
|
-
withDirectives(createElementVNode("view", {
|
|
287
|
-
class: normalizeClass(_ctx.classes),
|
|
288
|
-
style: normalizeStyle(_ctx.popStyle),
|
|
289
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
290
|
-
}, [
|
|
291
|
-
_ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
|
|
292
|
-
_ctx.closed ? (openBlock(), createElementBlock("view", {
|
|
293
|
-
key: 1,
|
|
294
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
|
|
295
|
-
class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
|
|
296
|
-
}, [
|
|
297
|
-
createVNode(_component_nut_icon, {
|
|
298
|
-
name: _ctx.closeIcon,
|
|
299
|
-
size: "12px"
|
|
300
|
-
}, null, 8, ["name"])
|
|
301
|
-
], 2)) : createCommentVNode("", true)
|
|
302
|
-
], 6), [
|
|
303
|
-
[vShow, _ctx.visible]
|
|
304
|
-
])
|
|
305
|
-
]),
|
|
306
|
-
_: 3
|
|
307
|
-
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
308
|
-
]));
|
|
252
|
+
], 8, _hoisted_1);
|
|
309
253
|
}
|
|
310
254
|
var Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
311
255
|
export { Popup as default, popupProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from "vue";
|
|
6
|
+
import { computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createTextVNode, createElementVNode, toDisplayString } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -45,8 +45,17 @@ const _sfc_main = create({
|
|
|
45
45
|
[componentName]: true
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
|
+
const replaceSpecialChar = (url) => {
|
|
49
|
+
url = url.replace(/"/g, '"');
|
|
50
|
+
url = url.replace(/&/g, "&");
|
|
51
|
+
url = url.replace(/</g, "<");
|
|
52
|
+
url = url.replace(/>/g, ">");
|
|
53
|
+
url = url.replace(/ /g, " ");
|
|
54
|
+
url = url.replace(/¥/g, "\uFFE5");
|
|
55
|
+
return url;
|
|
56
|
+
};
|
|
48
57
|
const showSymbol = computed(() => {
|
|
49
|
-
const symbol = props.needSymbol ? props.symbol : "";
|
|
58
|
+
const symbol = props.needSymbol ? replaceSpecialChar(props.symbol) : "";
|
|
50
59
|
return symbol;
|
|
51
60
|
});
|
|
52
61
|
const checkPoint = (price) => {
|
|
@@ -87,7 +96,8 @@ const _sfc_main = create({
|
|
|
87
96
|
showSymbol,
|
|
88
97
|
checkPoint,
|
|
89
98
|
formatThousands,
|
|
90
|
-
formatDecimal
|
|
99
|
+
formatDecimal,
|
|
100
|
+
replaceSpecialChar
|
|
91
101
|
};
|
|
92
102
|
}
|
|
93
103
|
});
|
|
@@ -100,24 +110,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
110
|
_ctx.needSymbol && _ctx.position == "before" ? (openBlock(), createElementBlock("view", {
|
|
101
111
|
key: 0,
|
|
102
112
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
113
|
+
decode: "true",
|
|
103
114
|
innerHTML: _ctx.showSymbol
|
|
104
115
|
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
116
|
+
createTextVNode(),
|
|
105
117
|
createElementVNode("view", {
|
|
106
118
|
class: normalizeClass(`nut-price--${_ctx.size}`)
|
|
107
119
|
}, toDisplayString(_ctx.formatThousands(_ctx.price)), 3),
|
|
120
|
+
createTextVNode(),
|
|
108
121
|
_ctx.decimalDigits != 0 ? (openBlock(), createElementBlock("view", {
|
|
109
122
|
key: 1,
|
|
110
123
|
class: normalizeClass(`nut-price--decimal-${_ctx.size}`)
|
|
111
124
|
}, ".", 2)) : createCommentVNode("", true),
|
|
125
|
+
createTextVNode(),
|
|
112
126
|
createElementVNode("view", {
|
|
113
127
|
class: normalizeClass(`nut-price--decimal-${_ctx.size}`)
|
|
114
128
|
}, toDisplayString(_ctx.formatDecimal(_ctx.price)), 3),
|
|
129
|
+
createTextVNode(),
|
|
115
130
|
_ctx.needSymbol && _ctx.position == "after" ? (openBlock(), createElementBlock("view", {
|
|
116
131
|
key: 2,
|
|
117
132
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
133
|
+
decode: "true",
|
|
118
134
|
innerHTML: _ctx.showSymbol
|
|
119
135
|
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
120
136
|
], 2);
|
|
121
137
|
}
|
|
122
|
-
var
|
|
123
|
-
export {
|
|
138
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
139
|
+
export { index_taro as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { useSlots, ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createBlock, mergeProps } from "vue";
|
|
6
|
+
import { useSlots, ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, createTextVNode, renderSlot, createBlock, mergeProps } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { eventCenter, getCurrentInstance } from "@tarojs/taro";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
import "../locale/lang";
|
|
10
11
|
const { create } = createComponent("progress");
|
|
@@ -21,7 +22,7 @@ const _sfc_main = create({
|
|
|
21
22
|
},
|
|
22
23
|
status: {
|
|
23
24
|
type: String,
|
|
24
|
-
default: ""
|
|
25
|
+
default: "text"
|
|
25
26
|
},
|
|
26
27
|
strokeWidth: {
|
|
27
28
|
type: [Number, String],
|
|
@@ -60,11 +61,12 @@ const _sfc_main = create({
|
|
|
60
61
|
default: true
|
|
61
62
|
}
|
|
62
63
|
},
|
|
63
|
-
setup(props) {
|
|
64
|
+
setup(props, { emit }) {
|
|
64
65
|
const slotDefault = !!useSlots().default;
|
|
65
66
|
const height = ref(props.strokeWidth + "px");
|
|
66
|
-
const progressOuter = ref();
|
|
67
67
|
const insideText = ref();
|
|
68
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
69
|
+
const randRef = ref(refRandomId);
|
|
68
70
|
const bgStyle = computed(() => {
|
|
69
71
|
return {
|
|
70
72
|
width: props.percentage + "%",
|
|
@@ -77,24 +79,27 @@ const _sfc_main = create({
|
|
|
77
79
|
};
|
|
78
80
|
});
|
|
79
81
|
onMounted(() => {
|
|
82
|
+
eventCenter.once(getCurrentInstance().router.onReady, () => {
|
|
83
|
+
});
|
|
80
84
|
});
|
|
81
85
|
return {
|
|
82
86
|
height,
|
|
83
87
|
bgStyle,
|
|
84
88
|
textStyle,
|
|
85
|
-
progressOuter,
|
|
86
89
|
insideText,
|
|
90
|
+
randRef,
|
|
87
91
|
slotDefault
|
|
88
92
|
};
|
|
89
93
|
}
|
|
90
94
|
});
|
|
91
95
|
const _hoisted_1 = { class: "nut-progress" };
|
|
96
|
+
const _hoisted_2 = ["id"];
|
|
92
97
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
93
98
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
94
99
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
95
100
|
createElementVNode("div", {
|
|
96
101
|
class: normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
|
|
97
|
-
|
|
102
|
+
id: "nut-progress-outer-taro-" + _ctx.randRef,
|
|
98
103
|
style: normalizeStyle({ height: _ctx.height })
|
|
99
104
|
}, [
|
|
100
105
|
createElementVNode("div", {
|
|
@@ -116,6 +121,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
116
121
|
style: normalizeStyle(_ctx.textStyle)
|
|
117
122
|
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
|
|
118
123
|
], 4)) : createCommentVNode("", true),
|
|
124
|
+
createTextVNode(),
|
|
119
125
|
_ctx.showText && _ctx.textInside && _ctx.slotDefault ? (openBlock(), createElementBlock("div", {
|
|
120
126
|
key: 1,
|
|
121
127
|
ref: "insideText",
|
|
@@ -129,13 +135,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
129
135
|
renderSlot(_ctx.$slots, "default")
|
|
130
136
|
], 4)) : createCommentVNode("", true)
|
|
131
137
|
], 6)
|
|
132
|
-
],
|
|
138
|
+
], 14, _hoisted_2),
|
|
139
|
+
createTextVNode(),
|
|
133
140
|
_ctx.showText && !_ctx.textInside ? (openBlock(), createElementBlock("div", {
|
|
134
141
|
key: 0,
|
|
135
142
|
class: "nut-progress-text",
|
|
136
143
|
style: normalizeStyle({ lineHeight: _ctx.height })
|
|
137
144
|
}, [
|
|
138
|
-
_ctx.status == "
|
|
145
|
+
_ctx.status == "text" || _ctx.status == "active" ? (openBlock(), createElementBlock("span", {
|
|
139
146
|
key: 0,
|
|
140
147
|
style: normalizeStyle(_ctx.textStyle)
|
|
141
148
|
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
@@ -146,5 +153,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
146
153
|
], 4)) : createCommentVNode("", true)
|
|
147
154
|
]);
|
|
148
155
|
}
|
|
149
|
-
var
|
|
150
|
-
export {
|
|
156
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
157
|
+
export { index_taro as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, toRefs, reactive, computed, onMounted, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, toDisplayString, renderSlot } from "vue";
|
|
6
|
+
import { ref, toRefs, reactive, computed, onMounted, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, toDisplayString, createTextVNode, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -336,9 +336,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
336
336
|
createElementVNode("view", {
|
|
337
337
|
class: normalizeClass(["pullrefresh-top", _ctx.direction == "horizontal" ? "pullrefresh-top-h" : "pullrefresh-top-v"])
|
|
338
338
|
}, toDisplayString(_ctx.refreshTopTem), 3),
|
|
339
|
+
createTextVNode(),
|
|
339
340
|
createElementVNode("view", _hoisted_1, [
|
|
340
341
|
renderSlot(_ctx.$slots, "default")
|
|
341
342
|
], 512),
|
|
343
|
+
createTextVNode(),
|
|
342
344
|
createElementVNode("view", {
|
|
343
345
|
class: normalizeClass(["pullrefresh-bottom", _ctx.direction == "horizontal" ? "pullrefresh-bottom-h" : "pullrefresh-bottom-v"]),
|
|
344
346
|
style: normalizeStyle(_ctx.getBottomStyle)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, computed, h } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
8
7
|
import _sfc_main$1 from "./Icon.js";
|
|
9
|
-
import "
|
|
8
|
+
import { c as createComponent } from "./component.js";
|
|
10
9
|
import "./pxCheck.js";
|
|
10
|
+
import "../locale/lang";
|
|
11
11
|
const { componentName, create } = createComponent("radio");
|
|
12
12
|
const _sfc_main = create({
|
|
13
13
|
props: {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import Taro from "@tarojs/taro";
|
|
7
|
+
import { ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createTextVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, renderSlot } from "vue";
|
|
7
8
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useTouch } from "./
|
|
9
|
-
import { u as
|
|
9
|
+
import { u as useTouch } from "./index3.js";
|
|
10
|
+
import { u as useTaroRect } from "./index.js";
|
|
10
11
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
12
|
import "../locale/lang";
|
|
12
13
|
const { componentName, create } = createComponent("range");
|
|
@@ -196,16 +197,16 @@ const _sfc_main = create({
|
|
|
196
197
|
emit("change", value);
|
|
197
198
|
}
|
|
198
199
|
};
|
|
199
|
-
const onClick = (event) => {
|
|
200
|
+
const onClick = async (event) => {
|
|
200
201
|
if (props.disabled) {
|
|
201
202
|
return;
|
|
202
203
|
}
|
|
203
204
|
const { min, modelValue } = props;
|
|
204
|
-
const rect =
|
|
205
|
-
let delta = event.clientX - rect.left;
|
|
205
|
+
const rect = await useTaroRect(root, Taro);
|
|
206
|
+
let delta = event.touches[0].clientX - rect.left;
|
|
206
207
|
let total = rect.width;
|
|
207
208
|
if (props.vertical) {
|
|
208
|
-
delta = event.clientY - rect.top;
|
|
209
|
+
delta = event.touches[0].clientY - rect.top;
|
|
209
210
|
total = rect.height;
|
|
210
211
|
}
|
|
211
212
|
const value = Number(min) + delta / total * scope.value;
|
|
@@ -233,8 +234,10 @@ const _sfc_main = create({
|
|
|
233
234
|
startValue = format(currentValue);
|
|
234
235
|
}
|
|
235
236
|
dragStatus.value = "start";
|
|
237
|
+
event.stopPropagation();
|
|
238
|
+
event.preventDefault();
|
|
236
239
|
};
|
|
237
|
-
const onTouchMove = (event) => {
|
|
240
|
+
const onTouchMove = async (event) => {
|
|
238
241
|
if (props.disabled) {
|
|
239
242
|
return;
|
|
240
243
|
}
|
|
@@ -243,7 +246,7 @@ const _sfc_main = create({
|
|
|
243
246
|
}
|
|
244
247
|
touch.move(event);
|
|
245
248
|
dragStatus.value = "draging";
|
|
246
|
-
const rect =
|
|
249
|
+
const rect = await useTaroRect(root, Taro);
|
|
247
250
|
let delta = touch.deltaX.value;
|
|
248
251
|
let total = rect.width;
|
|
249
252
|
let diff = delta / total * scope.value;
|
|
@@ -261,7 +264,7 @@ const _sfc_main = create({
|
|
|
261
264
|
event.stopPropagation();
|
|
262
265
|
event.preventDefault();
|
|
263
266
|
};
|
|
264
|
-
const onTouchEnd = () => {
|
|
267
|
+
const onTouchEnd = (event) => {
|
|
265
268
|
if (props.disabled) {
|
|
266
269
|
return;
|
|
267
270
|
}
|
|
@@ -270,11 +273,14 @@ const _sfc_main = create({
|
|
|
270
273
|
emit("drag-end");
|
|
271
274
|
}
|
|
272
275
|
dragStatus.value = "";
|
|
276
|
+
event.stopPropagation();
|
|
277
|
+
event.preventDefault();
|
|
273
278
|
};
|
|
274
279
|
const curValue = (idx) => {
|
|
275
280
|
const value = typeof idx === "number" ? props.modelValue[idx] : props.modelValue;
|
|
276
281
|
return value;
|
|
277
282
|
};
|
|
283
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
278
284
|
return {
|
|
279
285
|
root,
|
|
280
286
|
classes,
|
|
@@ -292,7 +298,8 @@ const _sfc_main = create({
|
|
|
292
298
|
markClassName,
|
|
293
299
|
marksStyle,
|
|
294
300
|
marksList,
|
|
295
|
-
tickStyle
|
|
301
|
+
tickStyle,
|
|
302
|
+
refRandomId
|
|
296
303
|
};
|
|
297
304
|
}
|
|
298
305
|
});
|
|
@@ -300,21 +307,22 @@ const _hoisted_1 = {
|
|
|
300
307
|
key: 0,
|
|
301
308
|
class: "min"
|
|
302
309
|
};
|
|
303
|
-
const _hoisted_2 =
|
|
310
|
+
const _hoisted_2 = ["id"];
|
|
311
|
+
const _hoisted_3 = {
|
|
304
312
|
key: 0,
|
|
305
313
|
class: "nut-range-mark"
|
|
306
314
|
};
|
|
307
|
-
const
|
|
308
|
-
const
|
|
315
|
+
const _hoisted_4 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "onTouchstart"];
|
|
316
|
+
const _hoisted_5 = {
|
|
309
317
|
key: 0,
|
|
310
318
|
class: "number"
|
|
311
319
|
};
|
|
312
|
-
const
|
|
313
|
-
const
|
|
320
|
+
const _hoisted_6 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax"];
|
|
321
|
+
const _hoisted_7 = {
|
|
314
322
|
key: 0,
|
|
315
323
|
class: "number"
|
|
316
324
|
};
|
|
317
|
-
const
|
|
325
|
+
const _hoisted_8 = {
|
|
318
326
|
key: 1,
|
|
319
327
|
class: "max"
|
|
320
328
|
};
|
|
@@ -323,13 +331,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
323
331
|
class: normalizeClass(_ctx.containerClasses)
|
|
324
332
|
}, [
|
|
325
333
|
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(+_ctx.min), 1)) : createCommentVNode("", true),
|
|
334
|
+
createTextVNode(),
|
|
326
335
|
createElementVNode("view", {
|
|
327
336
|
ref: "root",
|
|
337
|
+
id: "root-" + _ctx.refRandomId,
|
|
328
338
|
style: normalizeStyle(_ctx.wrapperStyle),
|
|
329
339
|
class: normalizeClass(_ctx.classes),
|
|
330
340
|
onClick: _cache[9] || (_cache[9] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
331
341
|
}, [
|
|
332
|
-
_ctx.marksList.length > 0 ? (openBlock(), createElementBlock("view",
|
|
342
|
+
_ctx.marksList.length > 0 ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
333
343
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.marksList, (marks) => {
|
|
334
344
|
return openBlock(), createElementBlock("span", {
|
|
335
345
|
key: marks,
|
|
@@ -344,27 +354,29 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
344
354
|
], 6);
|
|
345
355
|
}), 128))
|
|
346
356
|
])) : createCommentVNode("", true),
|
|
357
|
+
createTextVNode(),
|
|
347
358
|
createElementVNode("view", {
|
|
348
359
|
class: "nut-range-bar",
|
|
349
360
|
style: normalizeStyle(_ctx.barStyle)
|
|
350
361
|
}, [
|
|
351
|
-
_ctx.range ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList([0, 1], (
|
|
362
|
+
_ctx.range ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList([0, 1], (index) => {
|
|
352
363
|
return createElementVNode("view", {
|
|
353
|
-
key:
|
|
364
|
+
key: index,
|
|
354
365
|
role: "slider",
|
|
355
366
|
class: normalizeClass({
|
|
356
|
-
"nut-range-button-wrapper-left":
|
|
357
|
-
"nut-range-button-wrapper-right":
|
|
367
|
+
"nut-range-button-wrapper-left": index == 0,
|
|
368
|
+
"nut-range-button-wrapper-right": index == 1
|
|
358
369
|
}),
|
|
370
|
+
"catch-move": true,
|
|
359
371
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
360
372
|
"aria-valuemin": +_ctx.min,
|
|
361
|
-
"aria-valuenow": _ctx.curValue(
|
|
373
|
+
"aria-valuenow": _ctx.curValue(index),
|
|
362
374
|
"aria-valuemax": +_ctx.max,
|
|
363
375
|
"aria-orientation": "horizontal",
|
|
364
376
|
onTouchstart: withModifiers(
|
|
365
377
|
(e) => {
|
|
366
|
-
if (typeof
|
|
367
|
-
_ctx.buttonIndex =
|
|
378
|
+
if (typeof index === "number") {
|
|
379
|
+
_ctx.buttonIndex = index;
|
|
368
380
|
}
|
|
369
381
|
_ctx.onTouchStart(e);
|
|
370
382
|
},
|
|
@@ -380,9 +392,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
380
392
|
class: "nut-range-button",
|
|
381
393
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
382
394
|
}, [
|
|
383
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view",
|
|
395
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(_ctx.curValue(index)), 1)) : createCommentVNode("", true)
|
|
384
396
|
], 4))
|
|
385
|
-
], 42,
|
|
397
|
+
], 42, _hoisted_4);
|
|
386
398
|
}), 64)) : (openBlock(), createElementBlock("view", {
|
|
387
399
|
key: 1,
|
|
388
400
|
role: "slider",
|
|
@@ -392,6 +404,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
392
404
|
"aria-valuenow": _ctx.curValue(),
|
|
393
405
|
"aria-valuemax": +_ctx.max,
|
|
394
406
|
"aria-orientation": "horizontal",
|
|
407
|
+
"catch-move": true,
|
|
395
408
|
onTouchstart: _cache[4] || (_cache[4] = withModifiers(
|
|
396
409
|
(e) => {
|
|
397
410
|
_ctx.onTouchStart(e);
|
|
@@ -408,13 +421,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
408
421
|
class: "nut-range-button",
|
|
409
422
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
410
423
|
}, [
|
|
411
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view",
|
|
424
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_7, toDisplayString(_ctx.curValue()), 1)) : createCommentVNode("", true)
|
|
412
425
|
], 4))
|
|
413
|
-
], 40,
|
|
426
|
+
], 40, _hoisted_6))
|
|
414
427
|
], 4)
|
|
415
|
-
],
|
|
416
|
-
|
|
428
|
+
], 14, _hoisted_2),
|
|
429
|
+
createTextVNode(),
|
|
430
|
+
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_8, toDisplayString(+_ctx.max), 1)) : createCommentVNode("", true)
|
|
417
431
|
], 2);
|
|
418
432
|
}
|
|
419
|
-
var
|
|
420
|
-
export {
|
|
433
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
434
|
+
export { index_taro as default };
|