@nutui/nutui 3.2.6-beta.1 → 3.2.6
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 +31 -0
- 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 +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jddkh.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- 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} +32 -72
- 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} +6 -13
- 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} +0 -0
- 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} +0 -0
- 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} +1 -1
- 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} +8 -15
- 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} +2 -1
- 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} +12 -14
- 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} +6 -7
- 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} +11 -20
- 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,37 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString,
|
|
6
|
+
import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, onBeforeUnmount, toRaw, resolveComponent, createVNode, withCtx } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useTaroRect } from "./index.js";
|
|
9
|
-
import Taro from "@tarojs/taro";
|
|
10
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
|
-
import {
|
|
9
|
+
import Popup, { popupProps } from "./Popup.js";
|
|
12
10
|
import "../locale/lang";
|
|
13
|
-
import "./
|
|
11
|
+
import "./OverLay.js";
|
|
12
|
+
import "./Icon.js";
|
|
14
13
|
import "./pxCheck.js";
|
|
15
|
-
const commonProps = {
|
|
16
|
-
listData: {
|
|
17
|
-
type: Array,
|
|
18
|
-
default: () => {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
readonly: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
defaultIndex: {
|
|
27
|
-
type: [Number, String],
|
|
28
|
-
default: 0
|
|
29
|
-
},
|
|
30
|
-
itemHeight: {
|
|
31
|
-
type: [Number, String],
|
|
32
|
-
default: 35
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
14
|
const { create: create$1 } = createComponent("oldpicker-column");
|
|
36
15
|
const _sfc_main$1 = create$1({
|
|
37
16
|
props: {
|
|
@@ -40,7 +19,20 @@ const _sfc_main$1 = create$1({
|
|
|
40
19
|
type: Boolean,
|
|
41
20
|
default: false
|
|
42
21
|
},
|
|
43
|
-
|
|
22
|
+
listData: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
readonly: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
defaultIndex: {
|
|
33
|
+
type: [Number, String],
|
|
34
|
+
default: 0
|
|
35
|
+
}
|
|
44
36
|
},
|
|
45
37
|
emits: ["click", "change"],
|
|
46
38
|
setup(props, { emit }) {
|
|
@@ -51,8 +43,7 @@ const _sfc_main$1 = create$1({
|
|
|
51
43
|
endY: 0,
|
|
52
44
|
startTime: 0,
|
|
53
45
|
endTime: 0,
|
|
54
|
-
lastY: 0
|
|
55
|
-
lastTime: 0
|
|
46
|
+
lastY: 0
|
|
56
47
|
},
|
|
57
48
|
currIndex: 1,
|
|
58
49
|
transformY: 0,
|
|
@@ -80,7 +71,6 @@ const _sfc_main$1 = create$1({
|
|
|
80
71
|
};
|
|
81
72
|
});
|
|
82
73
|
const onTouchStart = (event) => {
|
|
83
|
-
console.log(event);
|
|
84
74
|
event.preventDefault();
|
|
85
75
|
let changedTouches = event.changedTouches[0];
|
|
86
76
|
state.touchParams.startY = changedTouches.pageY;
|
|
@@ -99,7 +89,7 @@ const _sfc_main$1 = create$1({
|
|
|
99
89
|
event.preventDefault();
|
|
100
90
|
let changedTouches = event.changedTouches[0];
|
|
101
91
|
state.touchParams.lastY = changedTouches.pageY;
|
|
102
|
-
state.touchParams.lastTime = event.
|
|
92
|
+
state.touchParams.lastTime = event.timestamp || Date.now();
|
|
103
93
|
let move = state.touchParams.lastY - state.touchParams.startY;
|
|
104
94
|
let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
|
|
105
95
|
if (moveTime <= 300) {
|
|
@@ -110,11 +100,11 @@ const _sfc_main$1 = create$1({
|
|
|
110
100
|
setMove(move, "end");
|
|
111
101
|
}
|
|
112
102
|
};
|
|
113
|
-
const setRollerStyle = (
|
|
114
|
-
return `transform: rotate3d(1, 0, 0, ${-state.rotation *
|
|
103
|
+
const setRollerStyle = (index2) => {
|
|
104
|
+
return `transform: rotate3d(1, 0, 0, ${-state.rotation * index2}deg) translate3d(0px, 0px, 104px)`;
|
|
115
105
|
};
|
|
116
|
-
const isHidden = (
|
|
117
|
-
if (
|
|
106
|
+
const isHidden = (index2) => {
|
|
107
|
+
if (index2 >= state.currIndex + 8 || index2 <= state.currIndex - 8) {
|
|
118
108
|
return true;
|
|
119
109
|
} else {
|
|
120
110
|
return false;
|
|
@@ -162,17 +152,12 @@ const _sfc_main$1 = create$1({
|
|
|
162
152
|
emit("change", state.currIndex - 1);
|
|
163
153
|
};
|
|
164
154
|
const modifyStatus = (type) => {
|
|
165
|
-
let
|
|
166
|
-
state.currIndex =
|
|
167
|
-
let move =
|
|
155
|
+
let index2 = props.defaultIndex;
|
|
156
|
+
state.currIndex = index2 === -1 ? 1 : index2 + 1;
|
|
157
|
+
let move = index2 === -1 ? 0 : index2 * state.lineSpacing;
|
|
168
158
|
type && setChooseValue();
|
|
169
159
|
setMove(-move);
|
|
170
160
|
};
|
|
171
|
-
const getReference = async () => {
|
|
172
|
-
const refe = await useTaroRect(list, Taro);
|
|
173
|
-
state.lineSpacing = refe.height / props.listData.values.length;
|
|
174
|
-
modifyStatus(true);
|
|
175
|
-
};
|
|
176
161
|
watch(
|
|
177
162
|
() => props.listData,
|
|
178
163
|
(val) => {
|
|
@@ -183,19 +168,6 @@ const _sfc_main$1 = create$1({
|
|
|
183
168
|
deep: true
|
|
184
169
|
}
|
|
185
170
|
);
|
|
186
|
-
watch(
|
|
187
|
-
() => props.itemShow,
|
|
188
|
-
(val) => {
|
|
189
|
-
if (val) {
|
|
190
|
-
setTimeout(() => {
|
|
191
|
-
getReference();
|
|
192
|
-
}, 200);
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
deep: true
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
171
|
watch(
|
|
200
172
|
() => props.defaultIndex,
|
|
201
173
|
(val) => {
|
|
@@ -204,11 +176,8 @@ const _sfc_main$1 = create$1({
|
|
|
204
176
|
}
|
|
205
177
|
);
|
|
206
178
|
onMounted(() => {
|
|
207
|
-
|
|
208
|
-
getReference();
|
|
209
|
-
}, 200);
|
|
179
|
+
modifyStatus(true);
|
|
210
180
|
});
|
|
211
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
212
181
|
return {
|
|
213
182
|
...toRefs(state),
|
|
214
183
|
...toRefs(props),
|
|
@@ -223,19 +192,17 @@ const _sfc_main$1 = create$1({
|
|
|
223
192
|
onTouchEnd,
|
|
224
193
|
touchRollerStyle,
|
|
225
194
|
touchListStyle,
|
|
226
|
-
|
|
195
|
+
setMove
|
|
227
196
|
};
|
|
228
197
|
}
|
|
229
198
|
});
|
|
230
199
|
const _hoisted_1$1 = { class: "nut-oldpicker-content" };
|
|
231
|
-
const _hoisted_2$1 =
|
|
232
|
-
const _hoisted_3$1 = {
|
|
200
|
+
const _hoisted_2$1 = {
|
|
233
201
|
key: 0,
|
|
234
202
|
class: "nut-oldpicker-placeholder"
|
|
235
203
|
};
|
|
236
204
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
237
|
-
return
|
|
238
|
-
key: 0,
|
|
205
|
+
return openBlock(), createElementBlock("view", {
|
|
239
206
|
class: "nut-oldpicker__list",
|
|
240
207
|
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
|
|
241
208
|
onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
|
|
@@ -246,39 +213,37 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
246
213
|
ref: "roller",
|
|
247
214
|
style: normalizeStyle(_ctx.touchRollerStyle)
|
|
248
215
|
}, [
|
|
249
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item,
|
|
216
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index2) => {
|
|
250
217
|
return openBlock(), createElementBlock("view", {
|
|
251
|
-
class: normalizeClass(["nut-oldpicker-roller-item", { "nut-oldpicker-roller-item-hidden": _ctx.isHidden(
|
|
252
|
-
style: normalizeStyle(_ctx.setRollerStyle(
|
|
253
|
-
key: item.label ? item.label :
|
|
218
|
+
class: normalizeClass(["nut-oldpicker-roller-item", { "nut-oldpicker-roller-item-hidden": _ctx.isHidden(index2 + 1) }]),
|
|
219
|
+
style: normalizeStyle(_ctx.setRollerStyle(index2 + 1)),
|
|
220
|
+
key: item.label ? item.label : index2
|
|
254
221
|
}, toDisplayString(_ctx.dataType === "cascade" ? item.text : item), 7);
|
|
255
222
|
}), 128))
|
|
256
223
|
], 4),
|
|
257
|
-
createTextVNode(),
|
|
258
224
|
createElementVNode("view", _hoisted_1$1, [
|
|
259
225
|
createElementVNode("view", {
|
|
260
226
|
class: "nut-oldpicker-list-panel",
|
|
261
227
|
ref: "list",
|
|
262
|
-
id: "list" + _ctx.refRandomId,
|
|
263
228
|
style: normalizeStyle(_ctx.touchListStyle)
|
|
264
229
|
}, [
|
|
265
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item,
|
|
230
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index2) => {
|
|
266
231
|
return openBlock(), createElementBlock("view", {
|
|
267
232
|
class: "nut-oldpicker-item nut-oldpicker-item-ref",
|
|
268
|
-
key: item.label ? item.label :
|
|
233
|
+
key: item.label ? item.label : index2
|
|
269
234
|
}, toDisplayString(_ctx.dataType === "cascade" ? item.text : item), 1);
|
|
270
235
|
}), 128)),
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
], 12, _hoisted_2$1)
|
|
236
|
+
_ctx.listData && _ctx.listData.length === 1 ? (openBlock(), createElementBlock("view", _hoisted_2$1)) : createCommentVNode("", true)
|
|
237
|
+
], 4)
|
|
274
238
|
])
|
|
275
|
-
], 32)
|
|
239
|
+
], 32);
|
|
276
240
|
}
|
|
277
241
|
var column = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
278
242
|
const { create, componentName } = createComponent("oldpicker");
|
|
279
243
|
const _sfc_main = create({
|
|
280
244
|
components: {
|
|
281
|
-
[column.name]: column
|
|
245
|
+
[column.name]: column,
|
|
246
|
+
[Popup.name]: Popup
|
|
282
247
|
},
|
|
283
248
|
props: {
|
|
284
249
|
...popupProps,
|
|
@@ -294,7 +259,20 @@ const _sfc_main = create({
|
|
|
294
259
|
type: String,
|
|
295
260
|
default: "\u786E\u5B9A"
|
|
296
261
|
},
|
|
297
|
-
|
|
262
|
+
listData: {
|
|
263
|
+
type: Array,
|
|
264
|
+
default: () => {
|
|
265
|
+
return [];
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
readonly: {
|
|
269
|
+
type: Boolean,
|
|
270
|
+
default: false
|
|
271
|
+
},
|
|
272
|
+
defaultIndex: {
|
|
273
|
+
type: [Number, String],
|
|
274
|
+
default: 0
|
|
275
|
+
}
|
|
298
276
|
},
|
|
299
277
|
emits: ["close", "change", "confirm", "update:visible"],
|
|
300
278
|
setup(props, { emit }) {
|
|
@@ -414,6 +392,14 @@ const _sfc_main = create({
|
|
|
414
392
|
}
|
|
415
393
|
emit("update:visible", false);
|
|
416
394
|
};
|
|
395
|
+
onMounted(() => {
|
|
396
|
+
if (props.visible)
|
|
397
|
+
state.show = props.visible;
|
|
398
|
+
});
|
|
399
|
+
onBeforeUnmount(() => {
|
|
400
|
+
if (props.visible)
|
|
401
|
+
state.show = false;
|
|
402
|
+
});
|
|
417
403
|
watch(
|
|
418
404
|
() => props.visible,
|
|
419
405
|
(val) => {
|
|
@@ -445,56 +431,56 @@ const _hoisted_4 = /* @__PURE__ */ createElementVNode("view", { class: "nut-oldp
|
|
|
445
431
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
446
432
|
const _component_nut_oldpicker_column = resolveComponent("nut-oldpicker-column");
|
|
447
433
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
448
|
-
return openBlock(),
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
434
|
+
return openBlock(), createElementBlock("view", {
|
|
435
|
+
class: normalizeClass(_ctx.classes)
|
|
436
|
+
}, [
|
|
437
|
+
createVNode(_component_nut_popup, {
|
|
438
|
+
position: "bottom",
|
|
439
|
+
visible: _ctx.show,
|
|
440
|
+
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.show = $event),
|
|
441
|
+
teleport: _ctx.teleport,
|
|
442
|
+
"lock-scroll": _ctx.lockScroll,
|
|
443
|
+
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
444
|
+
onClose: _ctx.close,
|
|
445
|
+
round: true,
|
|
446
|
+
isWrapTeleport: _ctx.isWrapTeleport
|
|
447
|
+
}, {
|
|
448
|
+
default: withCtx(() => [
|
|
449
|
+
createElementVNode("view", _hoisted_1, [
|
|
450
|
+
createElementVNode("view", {
|
|
451
|
+
class: "nut-oldpicker__cancel nut-oldpicker__left nut-oldpicker__button",
|
|
452
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
|
|
453
|
+
}, toDisplayString(_ctx.cancelText), 1),
|
|
454
|
+
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.title), 1),
|
|
455
|
+
createElementVNode("view", {
|
|
456
|
+
class: "nut-oldpicker__confirm nut-oldpicker__button nut-oldpicker__right",
|
|
457
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirm())
|
|
458
|
+
}, toDisplayString(_ctx.okText), 1)
|
|
459
|
+
]),
|
|
460
|
+
createElementVNode("view", _hoisted_3, [
|
|
461
|
+
_hoisted_4,
|
|
462
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columnList, (item, columnIndex) => {
|
|
463
|
+
return openBlock(), createElementBlock("view", {
|
|
464
|
+
class: "nut-oldpicker__columnitem",
|
|
465
|
+
key: columnIndex
|
|
466
|
+
}, [
|
|
467
|
+
createVNode(_component_nut_oldpicker_column, {
|
|
468
|
+
itemShow: _ctx.show,
|
|
469
|
+
"list-data": item,
|
|
470
|
+
readonly: _ctx.readonly,
|
|
471
|
+
"default-index": item.defaultIndex,
|
|
472
|
+
"data-type": _ctx.dataType,
|
|
473
|
+
onChange: (dataIndex) => {
|
|
474
|
+
_ctx.changeHandler(columnIndex, dataIndex);
|
|
475
|
+
}
|
|
476
|
+
}, null, 8, ["itemShow", "list-data", "readonly", "default-index", "data-type", "onChange"])
|
|
477
|
+
]);
|
|
478
|
+
}), 128))
|
|
479
|
+
])
|
|
471
480
|
]),
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
createTextVNode(),
|
|
476
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columnList, (item, columnIndex) => {
|
|
477
|
-
return openBlock(), createElementBlock("view", {
|
|
478
|
-
class: "nut-oldpicker__columnitem",
|
|
479
|
-
key: columnIndex
|
|
480
|
-
}, [
|
|
481
|
-
createVNode(_component_nut_oldpicker_column, {
|
|
482
|
-
itemShow: _ctx.show,
|
|
483
|
-
"list-data": item,
|
|
484
|
-
readonly: _ctx.readonly,
|
|
485
|
-
"default-index": item.defaultIndex,
|
|
486
|
-
"visible-item-count": _ctx.visibleItemCount,
|
|
487
|
-
"data-type": _ctx.dataType,
|
|
488
|
-
onChange: (dataIndex) => {
|
|
489
|
-
_ctx.changeHandler(columnIndex, dataIndex);
|
|
490
|
-
}
|
|
491
|
-
}, null, 8, ["itemShow", "list-data", "readonly", "default-index", "visible-item-count", "data-type", "onChange"])
|
|
492
|
-
]);
|
|
493
|
-
}), 128))
|
|
494
|
-
])
|
|
495
|
-
]),
|
|
496
|
-
_: 1
|
|
497
|
-
}, 8, ["visible", "teleport", "lock-scroll", "close-on-click-overlay", "onClose"]);
|
|
481
|
+
_: 1
|
|
482
|
+
}, 8, ["visible", "teleport", "lock-scroll", "close-on-click-overlay", "onClose", "isWrapTeleport"])
|
|
483
|
+
], 2);
|
|
498
484
|
}
|
|
499
|
-
var
|
|
500
|
-
export {
|
|
485
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
486
|
+
export { index as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, vShow } from "vue";
|
|
6
|
+
import { computed, watch, onDeactivated, onBeforeUnmount, onMounted, onActivated, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow } 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";
|
|
@@ -48,6 +48,24 @@ const _sfc_main = create({
|
|
|
48
48
|
[props.overlayClass]: true
|
|
49
49
|
};
|
|
50
50
|
});
|
|
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);
|
|
51
69
|
const style = computed(() => {
|
|
52
70
|
return {
|
|
53
71
|
animationDuration: `${props.duration}s`,
|
|
@@ -55,13 +73,17 @@ const _sfc_main = create({
|
|
|
55
73
|
...props.overlayStyle
|
|
56
74
|
};
|
|
57
75
|
});
|
|
76
|
+
const touchmove = (e) => {
|
|
77
|
+
if (props.lockScroll)
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
};
|
|
58
80
|
const onClick = (e) => {
|
|
59
81
|
emit("click", e);
|
|
60
82
|
if (props.closeOnClickOverlay) {
|
|
61
83
|
emit("update:visible", false);
|
|
62
84
|
}
|
|
63
85
|
};
|
|
64
|
-
return { classes, style, onClick };
|
|
86
|
+
return { classes, style, touchmove, onClick };
|
|
65
87
|
}
|
|
66
88
|
});
|
|
67
89
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -69,11 +91,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
69
91
|
default: withCtx(() => [
|
|
70
92
|
withDirectives(createElementVNode("view", {
|
|
71
93
|
class: normalizeClass(_ctx.classes),
|
|
72
|
-
|
|
94
|
+
onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.touchmove && _ctx.touchmove(...args), ["stop"])),
|
|
95
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
73
96
|
style: normalizeStyle(_ctx.style)
|
|
74
97
|
}, [
|
|
75
98
|
renderSlot(_ctx.$slots, "default")
|
|
76
|
-
],
|
|
99
|
+
], 38), [
|
|
77
100
|
[vShow, _ctx.visible]
|
|
78
101
|
])
|
|
79
102
|
]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6
|
|
2
|
+
* @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -135,11 +135,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
135
135
|
createTextVNode(toDisplayString(_ctx.prevText || _ctx.translate("prev")), 1)
|
|
136
136
|
])
|
|
137
137
|
], 2),
|
|
138
|
-
createTextVNode(),
|
|
139
138
|
_ctx.mode == "multi" ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
140
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item,
|
|
139
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item, index2) => {
|
|
141
140
|
return openBlock(), createElementBlock("view", {
|
|
142
|
-
key:
|
|
141
|
+
key: index2 + "pagination",
|
|
143
142
|
class: normalizeClass(["nut-pagination-item", item.active ? "active" : ""]),
|
|
144
143
|
onClick: ($event) => _ctx.select(item.number, true)
|
|
145
144
|
}, [
|
|
@@ -149,11 +148,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
149
148
|
], 10, _hoisted_3);
|
|
150
149
|
}), 128))
|
|
151
150
|
])) : createCommentVNode("", true),
|
|
152
|
-
createTextVNode(),
|
|
153
151
|
_ctx.mode == "simple" ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
154
152
|
createElementVNode("view", _hoisted_5, toDisplayString(_ctx.modelValue) + "/" + toDisplayString(_ctx.countRef), 1)
|
|
155
153
|
])) : createCommentVNode("", true),
|
|
156
|
-
createTextVNode(),
|
|
157
154
|
createElementVNode("view", {
|
|
158
155
|
class: normalizeClass(["nut-pagination-next", _ctx.modelValue >= _ctx.countRef ? "disabled" : ""]),
|
|
159
156
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.select(_ctx.modelValue + 1, true))
|
|
@@ -164,5 +161,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
164
161
|
], 2)
|
|
165
162
|
]);
|
|
166
163
|
}
|
|
167
|
-
var
|
|
168
|
-
export {
|
|
164
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
165
|
+
export { index as default };
|