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