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