@nutui/nutui 4.0.10-beta.1 → 4.0.10
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 +17 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +6550 -8291
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +78 -111
- package/dist/packages/_es/Address.js +250 -375
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +41 -58
- package/dist/packages/_es/Audio.js +128 -197
- package/dist/packages/_es/AudioOperate.js +60 -71
- package/dist/packages/_es/Avatar.js +66 -89
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +36 -47
- package/dist/packages/_es/Barrage.js +68 -147
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -157
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +315 -474
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -156
- package/dist/packages/_es/CheckboxGroup.js +38 -59
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +33 -58
- package/dist/packages/_es/CollapseItem.js +78 -108
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +37 -55
- package/dist/packages/_es/Countdown.js +100 -212
- package/dist/packages/_es/Countup.js +232 -445
- package/dist/packages/_es/DatePicker.js +162 -265
- package/dist/packages/_es/Dialog.js +161 -213
- package/dist/packages/_es/Divider.js +42 -57
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +143 -219
- package/dist/packages/_es/Ellipsis.js +95 -178
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +107 -178
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +90 -129
- package/dist/packages/_es/ImagePreview.js +256 -412
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -136
- package/dist/packages/_es/Input.js +160 -264
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +104 -130
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +117 -215
- package/dist/packages/_es/Menu.js +95 -150
- package/dist/packages/_es/MenuItem.js +109 -154
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +197 -312
- package/dist/packages/_es/Notify.js +110 -166
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +52 -80
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +275 -437
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +44 -82
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +95 -173
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +204 -347
- package/dist/packages/_es/Rate.js +92 -141
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +123 -174
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -80
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -146
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +250 -343
- package/dist/packages/_es/Step.js +59 -86
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -74
- package/dist/packages/_es/Swipe.js +83 -155
- package/dist/packages/_es/Swiper.js +174 -311
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -68
- package/dist/packages/_es/TabPane.js +30 -41
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -82
- package/dist/packages/_es/Table.js +109 -165
- package/dist/packages/_es/Tabs.js +240 -388
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -76
- package/dist/packages/_es/TimePannel.js +34 -48
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +144 -218
- package/dist/packages/_es/Tour.js +138 -192
- package/dist/packages/_es/TrendArrow.js +57 -77
- package/dist/packages/_es/Uploader.js +234 -359
- package/dist/packages/_es/Video.js +191 -316
- package/dist/packages/_es/Watermark.js +84 -117
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +154 -51
- package/dist/styles/themes/jdb.scss +154 -51
- package/dist/styles/themes/jddkh.scss +154 -51
- package/dist/styles/themes/jdt.scss +154 -51
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
- package/dist/types/__VUE/image/index.vue.d.ts +2 -2
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-87422be8.js +0 -942
- package/dist/packages/_es/index-da0a7662.js +0 -259
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { r as
|
|
4
|
-
import { _ as
|
|
1
|
+
import { ref as h, reactive as x, computed as b, onMounted as v, onActivated as g, onDeactivated as P, openBlock as T, createElementBlock as W, normalizeClass as H, renderSlot as L } from "vue";
|
|
2
|
+
import { c as E } from "./component-234624bc.js";
|
|
3
|
+
import { r as u } from "./raf-a74f1a06.js";
|
|
4
|
+
import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
const { componentName, create } =
|
|
7
|
-
const _sfc_main = create({
|
|
6
|
+
const { componentName: A, create: $ } = E("drag"), X = $({
|
|
8
7
|
props: {
|
|
9
8
|
attract: {
|
|
10
9
|
type: Boolean,
|
|
11
|
-
default:
|
|
10
|
+
default: !1
|
|
12
11
|
},
|
|
13
12
|
direction: {
|
|
14
13
|
type: String,
|
|
@@ -16,20 +15,17 @@ const _sfc_main = create({
|
|
|
16
15
|
},
|
|
17
16
|
boundary: {
|
|
18
17
|
type: Object,
|
|
19
|
-
default: () => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
}
|
|
18
|
+
default: () => ({
|
|
19
|
+
top: 0,
|
|
20
|
+
left: 0,
|
|
21
|
+
right: 0,
|
|
22
|
+
bottom: 0
|
|
23
|
+
})
|
|
27
24
|
}
|
|
28
25
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
keepAlive: false,
|
|
26
|
+
setup(i) {
|
|
27
|
+
const o = h(), t = x({
|
|
28
|
+
keepAlive: !1,
|
|
33
29
|
elWidth: 0,
|
|
34
30
|
elHeight: 0,
|
|
35
31
|
screenWidth: 0,
|
|
@@ -47,155 +43,76 @@ const _sfc_main = create({
|
|
|
47
43
|
right: 0,
|
|
48
44
|
bottom: 0
|
|
49
45
|
}
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
function getInfo() {
|
|
58
|
-
const domElem = document.documentElement;
|
|
59
|
-
state.elWidth = myDrag.value.offsetWidth;
|
|
60
|
-
state.elHeight = myDrag.value.offsetHeight;
|
|
61
|
-
state.screenWidth = domElem.clientWidth || 375;
|
|
62
|
-
state.screenHeight = domElem.clientHeight || 667;
|
|
46
|
+
}), a = b(() => ({
|
|
47
|
+
[A]: !0
|
|
48
|
+
}));
|
|
49
|
+
function p() {
|
|
50
|
+
const e = document.documentElement;
|
|
51
|
+
t.elWidth = o.value.offsetWidth, t.elHeight = o.value.offsetHeight, t.screenWidth = e.clientWidth || 375, t.screenHeight = e.clientHeight || 667;
|
|
63
52
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
71
|
-
} else {
|
|
72
|
-
target.style.left = `${state.boundary.left}px`;
|
|
73
|
-
}
|
|
74
|
-
} else {
|
|
75
|
-
if (+target.style.left.split("px")[0] > 10) {
|
|
76
|
-
target.style.left = +target.style.left.split("px")[0] - 10 + "px";
|
|
77
|
-
requestAniFrame(() => {
|
|
78
|
-
goLeft(target);
|
|
79
|
-
});
|
|
80
|
-
} else {
|
|
81
|
-
target.style.left = "0px";
|
|
82
|
-
}
|
|
83
|
-
}
|
|
53
|
+
function c(e) {
|
|
54
|
+
t.boundary.left ? +e.style.left.split("px")[0] > t.boundary.left ? (e.style.left = +e.style.left.split("px")[0] - 10 + "px", u(() => {
|
|
55
|
+
c(e);
|
|
56
|
+
})) : e.style.left = `${t.boundary.left}px` : +e.style.left.split("px")[0] > 10 ? (e.style.left = +e.style.left.split("px")[0] - 10 + "px", u(() => {
|
|
57
|
+
c(e);
|
|
58
|
+
})) : e.style.left = "0px";
|
|
84
59
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
goRight(target, rightLocation);
|
|
90
|
-
});
|
|
91
|
-
} else {
|
|
92
|
-
target.style.left = rightLocation + "px";
|
|
93
|
-
}
|
|
60
|
+
function l(e, n) {
|
|
61
|
+
n - parseInt(e.style.left.split("px")[0]) > 10 ? (e.style.left = parseInt(e.style.left.split("px")[0]) + 10 + "px", u(() => {
|
|
62
|
+
l(e, n);
|
|
63
|
+
})) : e.style.left = n + "px";
|
|
94
64
|
}
|
|
95
|
-
function
|
|
65
|
+
function d(e) {
|
|
96
66
|
e.preventDefault();
|
|
97
|
-
const
|
|
67
|
+
const n = e.currentTarget;
|
|
98
68
|
if (e.targetTouches.length === 1) {
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
state.yPum = state.startTop + state.ny;
|
|
104
|
-
const rightLocation = state.screenWidth - state.elWidth - state.boundary.right;
|
|
105
|
-
if (Math.abs(state.xPum) > rightLocation) {
|
|
106
|
-
state.xPum = rightLocation;
|
|
107
|
-
} else if (state.xPum <= state.boundary.left) {
|
|
108
|
-
state.xPum = state.boundary.left;
|
|
109
|
-
}
|
|
110
|
-
if (state.yPum < state.boundary.top) {
|
|
111
|
-
state.yPum = state.boundary.top;
|
|
112
|
-
} else if (state.yPum > state.screenHeight - state.elHeight - state.boundary.bottom) {
|
|
113
|
-
state.yPum = state.screenHeight - state.elHeight - state.boundary.bottom;
|
|
114
|
-
}
|
|
115
|
-
if (props.direction != "y") {
|
|
116
|
-
target.style.left = state.xPum + "px";
|
|
117
|
-
}
|
|
118
|
-
if (props.direction != "x") {
|
|
119
|
-
target.style.top = state.yPum + "px";
|
|
120
|
-
}
|
|
69
|
+
const r = e.targetTouches[0];
|
|
70
|
+
t.nx = r.clientX - t.position.x, t.ny = r.clientY - t.position.y, t.xPum = t.startLeft + t.nx, t.yPum = t.startTop + t.ny;
|
|
71
|
+
const s = t.screenWidth - t.elWidth - t.boundary.right;
|
|
72
|
+
Math.abs(t.xPum) > s ? t.xPum = s : t.xPum <= t.boundary.left && (t.xPum = t.boundary.left), t.yPum < t.boundary.top ? t.yPum = t.boundary.top : t.yPum > t.screenHeight - t.elHeight - t.boundary.bottom && (t.yPum = t.screenHeight - t.elHeight - t.boundary.bottom), i.direction != "y" && (n.style.left = t.xPum + "px"), i.direction != "x" && (n.style.top = t.yPum + "px");
|
|
121
73
|
}
|
|
122
74
|
}
|
|
123
|
-
function
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
} else {
|
|
133
|
-
currX = currX < state.screenWidth / 2 ? state.boundary.left : rightLocation;
|
|
134
|
-
}
|
|
135
|
-
if (props.direction != "y" && props.attract) {
|
|
136
|
-
if (currX < state.screenWidth / 2) {
|
|
137
|
-
requestAniFrame(() => {
|
|
138
|
-
goLeft(target);
|
|
139
|
-
});
|
|
140
|
-
} else {
|
|
141
|
-
requestAniFrame(() => {
|
|
142
|
-
goRight(target, rightLocation);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
if (props.direction != "x") {
|
|
147
|
-
target.style.top = state.yPum + "px";
|
|
148
|
-
}
|
|
75
|
+
function y(e) {
|
|
76
|
+
const n = e.currentTarget;
|
|
77
|
+
let s = e.changedTouches[0].clientX;
|
|
78
|
+
const f = t.screenWidth - t.elWidth - t.boundary.right;
|
|
79
|
+
s > f ? s = f : s < t.boundary.left ? s = t.boundary.left : s = s < t.screenWidth / 2 ? t.boundary.left : f, i.direction != "y" && i.attract && (s < t.screenWidth / 2 ? u(() => {
|
|
80
|
+
c(n);
|
|
81
|
+
}) : u(() => {
|
|
82
|
+
l(n, f);
|
|
83
|
+
})), i.direction != "x" && (n.style.top = t.yPum + "px");
|
|
149
84
|
}
|
|
150
|
-
function
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const touch = e.targetTouches[0];
|
|
154
|
-
state.startTop = target.offsetTop;
|
|
155
|
-
state.startLeft = target.offsetLeft;
|
|
156
|
-
state.position.x = touches.clientX;
|
|
157
|
-
state.position.y = touches.clientY;
|
|
158
|
-
state.nx = touch.clientX - state.position.x;
|
|
159
|
-
state.ny = touch.clientY - state.position.y;
|
|
160
|
-
state.xPum = state.startLeft + state.nx;
|
|
161
|
-
state.yPum = state.startTop + state.ny;
|
|
85
|
+
function m(e) {
|
|
86
|
+
const n = e.currentTarget, r = e.touches[0], s = e.targetTouches[0];
|
|
87
|
+
t.startTop = n.offsetTop, t.startLeft = n.offsetLeft, t.position.x = r.clientX, t.position.y = r.clientY, t.nx = s.clientX - t.position.x, t.ny = s.clientY - t.position.y, t.xPum = t.startLeft + t.nx, t.yPum = t.startTop + t.ny;
|
|
162
88
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
myDrag.value.removeEventListener("touchmove", touchMove);
|
|
176
|
-
myDrag.value.removeEventListener("touchend", touchEnd);
|
|
177
|
-
});
|
|
178
|
-
return {
|
|
179
|
-
classes,
|
|
180
|
-
myDrag,
|
|
181
|
-
touchStart,
|
|
182
|
-
touchMove,
|
|
183
|
-
touchEnd
|
|
89
|
+
return v(() => {
|
|
90
|
+
p(), t.boundary = i.boundary;
|
|
91
|
+
}), g(() => {
|
|
92
|
+
t.keepAlive && (t.keepAlive = !1);
|
|
93
|
+
}), P(() => {
|
|
94
|
+
t.keepAlive = !0, o.value.removeEventListener("touchstart", m), o.value.removeEventListener("touchmove", d), o.value.removeEventListener("touchend", y);
|
|
95
|
+
}), {
|
|
96
|
+
classes: a,
|
|
97
|
+
myDrag: o,
|
|
98
|
+
touchStart: m,
|
|
99
|
+
touchMove: d,
|
|
100
|
+
touchEnd: y
|
|
184
101
|
};
|
|
185
102
|
}
|
|
186
103
|
});
|
|
187
|
-
function
|
|
188
|
-
return
|
|
189
|
-
class:
|
|
104
|
+
function C(i, o, t, a, p, c) {
|
|
105
|
+
return T(), W("view", {
|
|
106
|
+
class: H(i.classes),
|
|
190
107
|
ref: "myDrag",
|
|
191
|
-
onTouchstart:
|
|
192
|
-
onTouchmove:
|
|
193
|
-
onTouchend:
|
|
108
|
+
onTouchstart: o[0] || (o[0] = (l) => i.touchStart(l)),
|
|
109
|
+
onTouchmove: o[1] || (o[1] = (l) => i.touchMove(l)),
|
|
110
|
+
onTouchend: o[2] || (o[2] = (l) => i.touchEnd(l))
|
|
194
111
|
}, [
|
|
195
|
-
|
|
112
|
+
L(i.$slots, "default")
|
|
196
113
|
], 34);
|
|
197
114
|
}
|
|
198
|
-
const
|
|
115
|
+
const Y = /* @__PURE__ */ k(X, [["render", C]]);
|
|
199
116
|
export {
|
|
200
|
-
|
|
117
|
+
Y as default
|
|
201
118
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, normalizeClass, withDirectives, vModelText, createTextVNode, createVNode } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
1
|
+
import { ref as s, watch as C, resolveComponent as M, openBlock as v, createElementBlock as f, createElementVNode as l, toDisplayString as i, Fragment as k, renderList as N, normalizeClass as g, withDirectives as b, vModelText as A, createTextVNode as w, createVNode as S } from "vue";
|
|
2
|
+
import { c as T } from "./component-234624bc.js";
|
|
3
|
+
import y from "./InputNumber.js";
|
|
4
|
+
import { _ as B } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
import "./pxCheck-
|
|
6
|
+
import "./pxCheck-38173291.js";
|
|
7
7
|
import "@nutui/icons-vue";
|
|
8
|
-
const { create, translate } =
|
|
9
|
-
const _sfc_main = create({
|
|
8
|
+
const { create: I, translate: $ } = T("ecard"), L = I({
|
|
10
9
|
components: {
|
|
11
|
-
[
|
|
10
|
+
[y.name]: y
|
|
12
11
|
},
|
|
13
12
|
props: {
|
|
14
13
|
chooseText: {
|
|
@@ -53,116 +52,77 @@ const _sfc_main = create({
|
|
|
53
52
|
}
|
|
54
53
|
},
|
|
55
54
|
emits: ["inputChange", "changeStep", "inputClick", "change", "update:modelValue"],
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
emit("change", item);
|
|
67
|
-
emit("update:modelValue", item.price);
|
|
55
|
+
setup(e, { emit: t }) {
|
|
56
|
+
const c = s(null), o = s(null), a = s(""), r = s(e.cardAmountMin), p = s(e.modelValue), n = (u, V) => {
|
|
57
|
+
c.value = V, r.value = e.cardAmountMin, o.value = u.price, t("change", u), t("update:modelValue", u.price);
|
|
58
|
+
}, d = (u) => {
|
|
59
|
+
let m = u.target.value.replace(/[^\d]/g, "");
|
|
60
|
+
a.value = m, o.value = m, Number(m) > e.cardAmountMax && (a.value = e.cardAmountMax, o.value = e.cardAmountMax), Number(m) < e.cardAmountMin && (a.value = e.cardAmountMin, o.value = e.cardAmountMin), t("inputChange", Number(a.value)), t("update:modelValue", Number(a.value));
|
|
61
|
+
}, h = () => {
|
|
62
|
+
c.value = "input", r.value = e.cardAmountMin, o.value = a.value, t("update:modelValue", a.value), t("inputClick");
|
|
63
|
+
}, _ = (u) => {
|
|
64
|
+
r.value = u, t("changeStep", r.value, o.value);
|
|
68
65
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
currentValue.value = val;
|
|
74
|
-
if (Number(val) > props.cardAmountMax) {
|
|
75
|
-
inputValue.value = props.cardAmountMax;
|
|
76
|
-
currentValue.value = props.cardAmountMax;
|
|
66
|
+
return C(
|
|
67
|
+
() => e.modelValue,
|
|
68
|
+
(u) => {
|
|
69
|
+
p.value = u;
|
|
77
70
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
currentValue.value = inputValue.value;
|
|
89
|
-
emit("update:modelValue", inputValue.value);
|
|
90
|
-
emit("inputClick");
|
|
91
|
-
};
|
|
92
|
-
const changeStep = (value) => {
|
|
93
|
-
stepValue.value = value;
|
|
94
|
-
emit("changeStep", stepValue.value, currentValue.value);
|
|
95
|
-
};
|
|
96
|
-
watch(
|
|
97
|
-
() => props.modelValue,
|
|
98
|
-
(value) => {
|
|
99
|
-
money.value = value;
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
return {
|
|
103
|
-
handleClick,
|
|
104
|
-
changeStep,
|
|
105
|
-
change,
|
|
106
|
-
inputClick,
|
|
107
|
-
stepValue,
|
|
108
|
-
currentIndex,
|
|
109
|
-
inputValue,
|
|
110
|
-
money,
|
|
111
|
-
translate
|
|
71
|
+
), {
|
|
72
|
+
handleClick: n,
|
|
73
|
+
changeStep: _,
|
|
74
|
+
change: d,
|
|
75
|
+
inputClick: h,
|
|
76
|
+
stepValue: r,
|
|
77
|
+
currentIndex: c,
|
|
78
|
+
inputValue: a,
|
|
79
|
+
money: p,
|
|
80
|
+
translate: $
|
|
112
81
|
};
|
|
113
82
|
}
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return openBlock(), createElementBlock("view", {
|
|
129
|
-
key: index2,
|
|
130
|
-
class: normalizeClass(["nut-ecard__list__item", _ctx.currentIndex == index2 ? "active" : ""]),
|
|
131
|
-
onClick: ($event) => _ctx.handleClick(item, index2)
|
|
132
|
-
}, toDisplayString(item.price), 11, _hoisted_4);
|
|
133
|
-
}), 128)),
|
|
134
|
-
createElementVNode("view", {
|
|
135
|
-
class: normalizeClass(["nut-ecard__list__input", _ctx.currentIndex == "input" ? "active" : ""]),
|
|
136
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.inputClick && _ctx.inputClick(...args))
|
|
83
|
+
}), D = { class: "nut-ecard" }, E = { class: "nut-ecard__title" }, U = { class: "nut-ecard__list" }, x = ["onClick"], z = { class: "nut-ecard__list__input--con" }, F = ["placeholder"], j = { class: "nut-ecard__list__step" };
|
|
84
|
+
function q(e, t, c, o, a, r) {
|
|
85
|
+
const p = M("nut-input-number");
|
|
86
|
+
return v(), f("view", D, [
|
|
87
|
+
l("view", E, i(e.chooseText || e.translate("chooseText")), 1),
|
|
88
|
+
l("view", U, [
|
|
89
|
+
(v(!0), f(k, null, N(e.dataList, (n, d) => (v(), f("view", {
|
|
90
|
+
key: d,
|
|
91
|
+
class: g(["nut-ecard__list__item", e.currentIndex == d ? "active" : ""]),
|
|
92
|
+
onClick: (h) => e.handleClick(n, d)
|
|
93
|
+
}, i(n.price), 11, x))), 128)),
|
|
94
|
+
l("view", {
|
|
95
|
+
class: g(["nut-ecard__list__input", e.currentIndex == "input" ? "active" : ""]),
|
|
96
|
+
onClick: t[2] || (t[2] = (...n) => e.inputClick && e.inputClick(...n))
|
|
137
97
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
98
|
+
l("view", null, i(e.otherValueText || e.translate("otherValueText")), 1),
|
|
99
|
+
l("view", z, [
|
|
100
|
+
b(l("input", {
|
|
141
101
|
class: "nut-ecard__list__input--input",
|
|
142
102
|
type: "text",
|
|
143
|
-
"onUpdate:modelValue":
|
|
144
|
-
onInput:
|
|
145
|
-
placeholder:
|
|
146
|
-
}, null, 40,
|
|
147
|
-
[
|
|
103
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.inputValue = n),
|
|
104
|
+
onInput: t[1] || (t[1] = (...n) => e.change && e.change(...n)),
|
|
105
|
+
placeholder: e.placeholder || e.translate("placeholder")
|
|
106
|
+
}, null, 40, F), [
|
|
107
|
+
[A, e.inputValue]
|
|
148
108
|
]),
|
|
149
|
-
|
|
109
|
+
w(" " + i(e.suffix), 1)
|
|
150
110
|
])
|
|
151
111
|
], 2),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
modelValue:
|
|
156
|
-
"onUpdate:modelValue":
|
|
157
|
-
min:
|
|
158
|
-
max:
|
|
159
|
-
onChange:
|
|
112
|
+
l("view", j, [
|
|
113
|
+
l("view", null, i(e.suffix) + i(e.money), 1),
|
|
114
|
+
S(p, {
|
|
115
|
+
modelValue: e.stepValue,
|
|
116
|
+
"onUpdate:modelValue": t[3] || (t[3] = (n) => e.stepValue = n),
|
|
117
|
+
min: e.cardBuyMin,
|
|
118
|
+
max: e.cardBuyMax,
|
|
119
|
+
onChange: e.changeStep
|
|
160
120
|
}, null, 8, ["modelValue", "min", "max", "onChange"])
|
|
161
121
|
])
|
|
162
122
|
])
|
|
163
123
|
]);
|
|
164
124
|
}
|
|
165
|
-
const
|
|
125
|
+
const R = /* @__PURE__ */ B(L, [["render", q]]);
|
|
166
126
|
export {
|
|
167
|
-
|
|
127
|
+
R as default
|
|
168
128
|
};
|