@nutui/nutui 3.1.23-beta.1 → 3.1.23-beta.4
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 +7 -0
- package/dist/nutui.es.js +910 -622
- package/dist/nutui.umd.js +921 -632
- package/dist/packages/_es/ActionSheet.js +8 -3
- package/dist/packages/_es/Address.js +1 -1
- package/dist/packages/_es/AddressList.js +2 -2
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +7 -4
- package/dist/packages/_es/Cascader.js +1 -1
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +25 -23
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +11 -2
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/Comment.js +4 -3
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +1 -1
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +9 -3
- package/dist/packages/_es/Dialog.js +1 -1
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +1 -1
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +1 -1
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +2 -2
- package/dist/packages/_es/MenuItem.js +1 -1
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +1 -1
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/OldPicker.js +1 -1
- package/dist/packages/_es/OverLay.js +1 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +106 -62
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +14 -18
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +1 -1
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +13 -2
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +11 -3
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +3 -3
- package/dist/packages/_es/TabbarItem.js +33 -13
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +1 -1
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +1 -1
- package/dist/packages/_es/Uploader.js +10 -3
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/WaterMark.js +187 -0
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +5 -5
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +2 -1
- 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/cascader/index.scss +13 -0
- package/dist/packages/cell/index.scss +2 -1
- package/dist/packages/imagepreview/index.scss +0 -1
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/picker/index.scss +10 -0
- package/dist/packages/table/index.scss +33 -0
- package/dist/packages/timedetail/index.scss +16 -0
- package/dist/packages/timepannel/index.scss +10 -0
- package/dist/packages/timeselect/index.scss +19 -1
- package/dist/packages/uploader/index.scss +10 -0
- package/dist/packages/watermark/index.scss +13 -0
- package/dist/smartips/attributes.json +68 -0
- package/dist/smartips/tags.json +24 -3
- package/dist/smartips/web-types.json +161 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +51 -50
- package/dist/styles/themes/jdb.scss +51 -50
- package/dist/styles/themes/jdt.scss +51 -50
- package/dist/styles/variables-jdb.scss +5 -3
- package/dist/styles/variables-jdt.scss +5 -3
- package/dist/styles/variables.scss +6 -3
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +7 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
- package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
- package/dist/types/__VUE/categorypane/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +6 -6
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +7 -0
- package/dist/types/__VUE/divider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/Column.vue.d.ts +10 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +17 -2
- package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +7 -0
- package/dist/types/__VUE/tabbar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +9 -3
- package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +143 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +2 -1
- package/package.json +8 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.23-beta.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.4 Mon Jul 25 2022 22:41:41 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, computed, onMounted, onUnmounted, reactive,
|
|
6
|
+
import { ref, computed, onMounted, onUnmounted, reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, createVNode, renderSlot, provide } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { u as useRect } from "./index2.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.23-beta.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.4 Mon Jul 25 2022 22:41:41 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, onBeforeUnmount, resolveComponent, createVNode, withCtx, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import Popup, { popupProps } from "./Popup.js";
|
|
9
|
+
import { u as useTouch } from "./index4.js";
|
|
9
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
11
|
import "../locale/lang";
|
|
11
12
|
import "./OverLay.js";
|
|
@@ -27,10 +28,15 @@ const _sfc_main$1 = create$1({
|
|
|
27
28
|
readonly: {
|
|
28
29
|
type: Boolean,
|
|
29
30
|
default: false
|
|
31
|
+
},
|
|
32
|
+
threeDimensional: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
30
35
|
}
|
|
31
36
|
},
|
|
32
37
|
emits: ["click", "change"],
|
|
33
38
|
setup(props, { emit }) {
|
|
39
|
+
const touch = useTouch();
|
|
34
40
|
const wrapper = ref();
|
|
35
41
|
const state = reactive({
|
|
36
42
|
touchParams: {
|
|
@@ -50,55 +56,71 @@ const _sfc_main$1 = create$1({
|
|
|
50
56
|
});
|
|
51
57
|
const roller = ref(null);
|
|
52
58
|
const list = ref(null);
|
|
53
|
-
const
|
|
59
|
+
const moving = ref(false);
|
|
54
60
|
const touchDeg = ref(0);
|
|
55
61
|
const touchTime = ref(0);
|
|
56
|
-
const
|
|
57
|
-
const
|
|
62
|
+
const INERTIA_TIME = 300;
|
|
63
|
+
const INERTIA_DISTANCE = 15;
|
|
64
|
+
const touchRollerStyle = computed(() => {
|
|
58
65
|
return {
|
|
59
|
-
transition: `transform ${touchTime.value}ms cubic-bezier(0.
|
|
60
|
-
transform: `
|
|
66
|
+
transition: `transform ${touchTime.value}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,
|
|
67
|
+
transform: `rotate3d(1, 0, 0, ${touchDeg.value})`
|
|
61
68
|
};
|
|
62
69
|
});
|
|
63
|
-
const
|
|
70
|
+
const touchTileStyle = computed(() => {
|
|
64
71
|
return {
|
|
65
|
-
transition: `transform ${touchTime.value}ms cubic-bezier(0.
|
|
66
|
-
transform: `
|
|
72
|
+
transition: `transform ${touchTime.value}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,
|
|
73
|
+
transform: `translate3d(0, ${state.scrollDistance}px, 0)`
|
|
67
74
|
};
|
|
68
75
|
});
|
|
76
|
+
const setRollerStyle = (index) => {
|
|
77
|
+
return `transform: rotate3d(1, 0, 0, ${-state.rotation * index}deg) translate3d(0px, 0px, 104px)`;
|
|
78
|
+
};
|
|
69
79
|
const onTouchStart = (event) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
touch.start(event);
|
|
81
|
+
if (moving.value) {
|
|
82
|
+
let dom = list.value;
|
|
83
|
+
if (!props.threeDimensional) {
|
|
84
|
+
dom = roller.value;
|
|
85
|
+
}
|
|
86
|
+
const { transform } = window.getComputedStyle(dom);
|
|
87
|
+
state.scrollDistance = +transform.slice(7, transform.length - 1).split(", ")[5];
|
|
88
|
+
}
|
|
89
|
+
state.touchParams.startY = touch.deltaY.value;
|
|
90
|
+
state.touchParams.startTime = Date.now();
|
|
74
91
|
state.transformY = state.scrollDistance;
|
|
75
92
|
};
|
|
76
93
|
const onTouchMove = (event) => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
94
|
+
touch.move(event);
|
|
95
|
+
if (touch.isVertical) {
|
|
96
|
+
moving.value = true;
|
|
97
|
+
preventDefault(event, true);
|
|
98
|
+
}
|
|
99
|
+
state.touchParams.lastY = touch.deltaY.value;
|
|
81
100
|
let move = state.touchParams.lastY - state.touchParams.startY;
|
|
82
101
|
setMove(move);
|
|
83
102
|
};
|
|
84
103
|
const onTouchEnd = (event) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
state.touchParams.lastY = changedTouches.pageY;
|
|
88
|
-
state.touchParams.lastTime = event.timeStamp || Date.now();
|
|
104
|
+
state.touchParams.lastY = touch.deltaY.value;
|
|
105
|
+
state.touchParams.lastTime = Date.now();
|
|
89
106
|
let move = state.touchParams.lastY - state.touchParams.startY;
|
|
90
107
|
let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
setMove(move, "end", moveTime);
|
|
108
|
+
if (moveTime <= INERTIA_TIME && Math.abs(move) > INERTIA_DISTANCE) {
|
|
109
|
+
const distance = momentum(move, moveTime);
|
|
110
|
+
setMove(distance, "end", moveTime + 1e3);
|
|
111
|
+
return;
|
|
96
112
|
} else {
|
|
97
113
|
setMove(move, "end");
|
|
98
114
|
}
|
|
115
|
+
setTimeout(() => {
|
|
116
|
+
touch.reset();
|
|
117
|
+
moving.value = false;
|
|
118
|
+
}, 0);
|
|
99
119
|
};
|
|
100
|
-
const
|
|
101
|
-
|
|
120
|
+
const momentum = (distance, duration) => {
|
|
121
|
+
const speed = Math.abs(distance / duration);
|
|
122
|
+
distance = speed / 3e-3 * (distance < 0 ? -1 : 1);
|
|
123
|
+
return distance;
|
|
102
124
|
};
|
|
103
125
|
const isHidden = (index) => {
|
|
104
126
|
if (index >= state.currIndex + 8 || index <= state.currIndex - 8) {
|
|
@@ -114,11 +136,9 @@ const _sfc_main$1 = create$1({
|
|
|
114
136
|
touchTime.value = 0;
|
|
115
137
|
}
|
|
116
138
|
touchDeg.value = deg;
|
|
117
|
-
touchTranslateY.value = translateY;
|
|
118
139
|
state.scrollDistance = translateY;
|
|
119
140
|
};
|
|
120
141
|
const setMove = (move, type, time) => {
|
|
121
|
-
console.log("setMove");
|
|
122
142
|
let updateMove = move + state.transformY;
|
|
123
143
|
if (type === "end") {
|
|
124
144
|
if (updateMove > 0) {
|
|
@@ -130,28 +150,15 @@ const _sfc_main$1 = create$1({
|
|
|
130
150
|
let endMove = Math.round(updateMove / state.lineSpacing) * state.lineSpacing;
|
|
131
151
|
let deg = `${(Math.abs(Math.round(endMove / state.lineSpacing)) + 1) * state.rotation}deg`;
|
|
132
152
|
setTransform(endMove, type, time, deg);
|
|
133
|
-
let t = time ? time / 2 : 0;
|
|
134
|
-
state.timer = setTimeout(() => {
|
|
135
|
-
setChooseValue();
|
|
136
|
-
}, t);
|
|
137
153
|
state.currIndex = Math.abs(Math.round(endMove / state.lineSpacing)) + 1;
|
|
138
154
|
} else {
|
|
139
|
-
let deg =
|
|
140
|
-
let
|
|
141
|
-
if (updateMove < 0) {
|
|
142
|
-
degNum = (Math.abs(updateMove / state.lineSpacing) + 1) * state.rotation;
|
|
143
|
-
} else {
|
|
144
|
-
degNum = (-updateMove / state.lineSpacing + 1) * state.rotation;
|
|
145
|
-
}
|
|
155
|
+
let deg = 0;
|
|
156
|
+
let currentDeg = (-updateMove / state.lineSpacing + 1) * state.rotation;
|
|
146
157
|
const maxDeg = (props.column.length + 1) * state.rotation;
|
|
147
158
|
const minDeg = 0;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
deg = `${minDeg}deg`;
|
|
152
|
-
} else {
|
|
153
|
-
deg = `${degNum}deg`;
|
|
154
|
-
setTransform(updateMove, null, void 0, deg);
|
|
159
|
+
deg = Math.min(Math.max(currentDeg, minDeg), maxDeg);
|
|
160
|
+
if (minDeg < deg && deg < maxDeg) {
|
|
161
|
+
setTransform(updateMove, null, void 0, deg + "deg");
|
|
155
162
|
state.currIndex = Math.abs(Math.round(updateMove / state.lineSpacing)) + 1;
|
|
156
163
|
}
|
|
157
164
|
}
|
|
@@ -167,6 +174,18 @@ const _sfc_main$1 = create$1({
|
|
|
167
174
|
type && setChooseValue();
|
|
168
175
|
setMove(-move);
|
|
169
176
|
};
|
|
177
|
+
const preventDefault = (event, isStopPropagation) => {
|
|
178
|
+
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
}
|
|
181
|
+
if (isStopPropagation) {
|
|
182
|
+
event.stopPropagation();
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const stopMomentum = () => {
|
|
186
|
+
moving.value = false;
|
|
187
|
+
setChooseValue();
|
|
188
|
+
};
|
|
170
189
|
watch(() => props.column, (val) => {
|
|
171
190
|
console.log("props.column\u53D8\u5316", props.column);
|
|
172
191
|
state.transformY = 0;
|
|
@@ -185,42 +204,59 @@ const _sfc_main$1 = create$1({
|
|
|
185
204
|
isHidden,
|
|
186
205
|
roller,
|
|
187
206
|
list,
|
|
188
|
-
listItem,
|
|
189
207
|
onTouchStart,
|
|
190
208
|
onTouchMove,
|
|
191
209
|
onTouchEnd,
|
|
192
210
|
touchRollerStyle,
|
|
193
|
-
|
|
194
|
-
setMove
|
|
211
|
+
touchTileStyle,
|
|
212
|
+
setMove,
|
|
213
|
+
stopMomentum
|
|
195
214
|
};
|
|
196
215
|
}
|
|
197
216
|
});
|
|
198
|
-
const _hoisted_1$1 =
|
|
217
|
+
const _hoisted_1$1 = {
|
|
218
|
+
key: 1,
|
|
219
|
+
class: "nut-picker-roller-item-tile"
|
|
220
|
+
};
|
|
221
|
+
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("view", { class: "nut-picker-roller-mask" }, null, -1);
|
|
222
|
+
const _hoisted_3$1 = {
|
|
223
|
+
key: 0,
|
|
224
|
+
class: "nut-picker-content"
|
|
225
|
+
};
|
|
199
226
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
200
227
|
return openBlock(), createElementBlock("view", {
|
|
201
228
|
class: "nut-picker__list",
|
|
202
|
-
onTouchstart: _cache[
|
|
203
|
-
onTouchmove: _cache[
|
|
204
|
-
onTouchend: _cache[
|
|
229
|
+
onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
|
|
230
|
+
onTouchmove: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
|
|
231
|
+
onTouchend: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
|
|
205
232
|
}, [
|
|
206
233
|
createElementVNode("view", {
|
|
207
234
|
class: "nut-picker-roller",
|
|
208
235
|
ref: "roller",
|
|
209
|
-
style: normalizeStyle(_ctx.touchRollerStyle)
|
|
236
|
+
style: normalizeStyle(_ctx.threeDimensional ? _ctx.touchRollerStyle : _ctx.touchTileStyle),
|
|
237
|
+
onTransitionend: _cache[0] || (_cache[0] = (...args) => _ctx.stopMomentum && _ctx.stopMomentum(...args))
|
|
210
238
|
}, [
|
|
211
239
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.column, (item, index) => {
|
|
212
240
|
return openBlock(), createElementBlock(Fragment, {
|
|
213
241
|
key: item.value ? item.value : index
|
|
214
242
|
}, [
|
|
215
|
-
item && item.text ? (openBlock(), createElementBlock("view", {
|
|
243
|
+
item && item.text && _ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
216
244
|
key: 0,
|
|
217
245
|
class: normalizeClass(["nut-picker-roller-item", { "nut-picker-roller-item-hidden": _ctx.isHidden(index + 1) }]),
|
|
218
246
|
style: normalizeStyle(_ctx.setRollerStyle(index + 1))
|
|
219
|
-
}, toDisplayString(item.text), 7)) : createCommentVNode("", true)
|
|
247
|
+
}, toDisplayString(item.text), 7)) : createCommentVNode("", true),
|
|
248
|
+
item && item.text && !_ctx.threeDimensional ? (openBlock(), createElementBlock("view", _hoisted_1$1, toDisplayString(item.text), 1)) : createCommentVNode("", true)
|
|
220
249
|
], 64);
|
|
221
250
|
}), 128))
|
|
222
|
-
],
|
|
223
|
-
|
|
251
|
+
], 36),
|
|
252
|
+
_hoisted_2$1,
|
|
253
|
+
_ctx.threeDimensional ? (openBlock(), createElementBlock("view", _hoisted_3$1, [
|
|
254
|
+
createElementVNode("view", {
|
|
255
|
+
class: "nut-picker-list-panel",
|
|
256
|
+
ref: "list",
|
|
257
|
+
style: normalizeStyle(_ctx.touchTileStyle)
|
|
258
|
+
}, null, 4)
|
|
259
|
+
])) : createCommentVNode("", true)
|
|
224
260
|
], 32);
|
|
225
261
|
}
|
|
226
262
|
var column = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
@@ -257,6 +293,10 @@ const _sfc_main = create({
|
|
|
257
293
|
readonly: {
|
|
258
294
|
type: Boolean,
|
|
259
295
|
default: false
|
|
296
|
+
},
|
|
297
|
+
threeDimensional: {
|
|
298
|
+
type: Boolean,
|
|
299
|
+
default: true
|
|
260
300
|
}
|
|
261
301
|
},
|
|
262
302
|
emits: ["close", "change", "confirm", "update:visible", "update:modelValue"],
|
|
@@ -325,7 +365,10 @@ const _sfc_main = create({
|
|
|
325
365
|
return formatted;
|
|
326
366
|
};
|
|
327
367
|
const close = () => {
|
|
328
|
-
emit("close"
|
|
368
|
+
emit("close", {
|
|
369
|
+
selectedValue: defaultValues.value,
|
|
370
|
+
selectedOptions: selectedOptions.value
|
|
371
|
+
});
|
|
329
372
|
emit("update:visible", false);
|
|
330
373
|
};
|
|
331
374
|
const changeHandler = (columnIndex, option) => {
|
|
@@ -447,10 +490,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
447
490
|
readonly: _ctx.readonly,
|
|
448
491
|
columnsType: _ctx.columnsType,
|
|
449
492
|
value: _ctx.defaultValues[columnIndex],
|
|
493
|
+
threeDimensional: _ctx.threeDimensional,
|
|
450
494
|
onChange: (option) => {
|
|
451
495
|
_ctx.changeHandler(columnIndex, option);
|
|
452
496
|
}
|
|
453
|
-
}, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "onChange"])
|
|
497
|
+
}, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "onChange"])
|
|
454
498
|
]);
|
|
455
499
|
}), 128))
|
|
456
500
|
], 512),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.23-beta.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.4 Mon Jul 25 2022 22:41:41 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -92,7 +92,7 @@ const _sfc_main = create({
|
|
|
92
92
|
setup(props, { emit }) {
|
|
93
93
|
const popupRef = ref();
|
|
94
94
|
const state = reactive({
|
|
95
|
-
zIndex: props.zIndex
|
|
95
|
+
zIndex: props.zIndex,
|
|
96
96
|
showSlot: true,
|
|
97
97
|
transitionName: `popup-fade-${props.position}`,
|
|
98
98
|
overLayCount: 1,
|
|
@@ -118,29 +118,25 @@ const _sfc_main = create({
|
|
|
118
118
|
};
|
|
119
119
|
});
|
|
120
120
|
const open = () => {
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
-
_zIndex = Number(props.zIndex);
|
|
124
|
-
}
|
|
125
|
-
emit("update:visible", true);
|
|
126
|
-
lockScroll();
|
|
127
|
-
state.zIndex = ++_zIndex;
|
|
121
|
+
if (props.zIndex != 2e3) {
|
|
122
|
+
_zIndex = Number(props.zIndex);
|
|
128
123
|
}
|
|
124
|
+
emit("update:visible", true);
|
|
125
|
+
lockScroll();
|
|
126
|
+
state.zIndex = ++_zIndex;
|
|
129
127
|
if (props.destroyOnClose) {
|
|
130
128
|
state.showSlot = true;
|
|
131
129
|
}
|
|
132
130
|
emit("open");
|
|
133
131
|
};
|
|
134
132
|
const close = () => {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}, +props.duration * 1e3);
|
|
143
|
-
}
|
|
133
|
+
unlockScroll();
|
|
134
|
+
emit("update:visible", false);
|
|
135
|
+
if (props.destroyOnClose) {
|
|
136
|
+
setTimeout(() => {
|
|
137
|
+
state.showSlot = false;
|
|
138
|
+
emit("close");
|
|
139
|
+
}, +props.duration * 1e3);
|
|
144
140
|
}
|
|
145
141
|
};
|
|
146
142
|
const onClick = (e) => {
|
package/dist/packages/_es/Row.js
CHANGED
package/dist/packages/_es/Sku.js
CHANGED