@nutui/nutui 3.1.17 → 3.1.19-beta.0
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 +41 -0
- package/LICENSE +1 -1
- package/README.md +7 -1
- package/dist/nutui.d.ts +3 -1
- package/dist/nutui.es.js +2335 -1280
- package/dist/nutui.umd.js +2350 -1293
- package/dist/packages/_es/ActionSheet.js +8 -3
- package/dist/packages/_es/Address.js +17 -11
- package/dist/packages/_es/Audio.js +2 -2
- package/dist/packages/_es/AudioOperate.js +125 -0
- package/dist/packages/_es/Avatar.js +2 -2
- package/dist/packages/_es/BackTop.js +7 -4
- package/dist/packages/_es/Badge.js +2 -2
- package/dist/packages/_es/Barrage.js +2 -2
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +10 -687
- package/dist/packages/_es/CalendarItem.js +10 -0
- package/dist/packages/_es/Card.js +2 -2
- package/dist/packages/_es/Cascader.js +2 -2
- package/dist/packages/_es/Cell.js +25 -18
- package/dist/packages/_es/CellGroup.js +2 -2
- package/dist/packages/_es/Checkbox.js +4 -4
- package/dist/packages/_es/CheckboxGroup.js +4 -4
- package/dist/packages/_es/CircleProgress.js +2 -2
- package/dist/packages/_es/Col.js +2 -2
- package/dist/packages/_es/Collapse.js +2 -2
- package/dist/packages/_es/CollapseItem.js +31 -19
- package/dist/packages/_es/CountDown.js +4 -2
- package/dist/packages/_es/CountUp.js +25 -16
- package/dist/packages/_es/DatePicker.js +83 -47
- package/dist/packages/_es/Dialog.js +7 -5
- package/dist/packages/_es/Divider.js +2 -2
- package/dist/packages/_es/Drag.js +4 -4
- package/dist/packages/_es/Elevator.js +3 -3
- package/dist/packages/_es/Empty.js +2 -2
- package/dist/packages/_es/FixedNav.js +2 -2
- package/dist/packages/_es/Form.js +8 -6
- package/dist/packages/_es/FormItem.js +9 -6
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +3 -3
- package/dist/packages/_es/Icon.js +2 -2
- package/dist/packages/_es/ImagePreview.js +11 -6
- package/dist/packages/_es/Indicator.js +2 -2
- package/dist/packages/_es/InfiniteLoading.js +2 -2
- package/dist/packages/_es/Input.js +290 -66
- package/dist/packages/_es/InputNumber.js +2 -2
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/List.js +124 -0
- package/dist/packages/_es/Menu.js +3 -3
- package/dist/packages/_es/MenuItem.js +4 -4
- package/dist/packages/_es/Navbar.js +31 -66
- package/dist/packages/_es/NoticeBar.js +41 -22
- package/dist/packages/_es/Notify.js +9 -5
- package/dist/packages/_es/NumberKeyboard.js +9 -4
- package/dist/packages/_es/OldPicker.js +484 -0
- package/dist/packages/_es/OverLay.js +2 -2
- package/dist/packages/_es/Pagination.js +2 -2
- package/dist/packages/_es/Picker.js +164 -157
- package/dist/packages/_es/Popover.js +7 -4
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +2 -2
- package/dist/packages/_es/Progress.js +14 -22
- package/dist/packages/_es/PullRefresh.js +363 -0
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +131 -21
- package/dist/packages/_es/Rate.js +2 -2
- package/dist/packages/_es/Row.js +2 -2
- package/dist/packages/_es/SearchBar.js +2 -2
- package/dist/packages/_es/ShortPassword.js +9 -4
- package/dist/packages/_es/SideNavBar.js +2 -2
- package/dist/packages/_es/SideNavBarItem.js +2 -2
- package/dist/packages/_es/Signature.js +25 -6
- package/dist/packages/_es/Skeleton.js +2 -2
- package/dist/packages/_es/Sku.js +31 -13
- package/dist/packages/_es/Step.js +28 -12
- package/dist/packages/_es/Steps.js +8 -3
- package/dist/packages/_es/Sticky.js +3 -3
- package/dist/packages/_es/SubSideNavBar.js +2 -2
- package/dist/packages/_es/Swipe.js +3 -3
- package/dist/packages/_es/Swiper.js +3 -3
- package/dist/packages/_es/SwiperItem.js +3 -3
- package/dist/packages/_es/Switch.js +2 -2
- package/dist/packages/_es/TabPane.js +2 -2
- package/dist/packages/_es/Tabbar.js +2 -2
- package/dist/packages/_es/TabbarItem.js +23 -8
- package/dist/packages/_es/Table.js +2 -2
- package/dist/packages/_es/Tabs.js +8 -5
- package/dist/packages/_es/Tag.js +11 -5
- package/dist/packages/_es/TextArea.js +38 -6
- package/dist/packages/_es/TimeDetail.js +2 -2
- package/dist/packages/_es/TimePannel.js +2 -2
- package/dist/packages/_es/TimeSelect.js +8 -3
- package/dist/packages/_es/Toast.js +16 -9
- package/dist/packages/_es/Uploader.js +2 -4
- package/dist/packages/_es/Video.js +12 -8
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +2 -2
- package/dist/packages/_es/index.js +6 -8
- package/dist/packages/_es/index2.js +9 -32
- package/dist/packages/_es/index3.js +29 -57
- package/dist/packages/_es/index4.js +64 -0
- package/dist/packages/_es/index5.js +687 -0
- package/dist/packages/_es/plugin-vue_export-helper.js +2 -2
- package/dist/packages/_es/pxCheck.js +2 -2
- package/dist/packages/_es/raf.js +2 -2
- package/dist/packages/_es/util.js +2 -2
- package/dist/packages/actionsheet/index.scss +7 -6
- package/dist/packages/badge/index.scss +11 -13
- package/dist/packages/button/index.scss +6 -5
- package/dist/packages/calendar/index.scss +9 -4
- package/dist/packages/calendaritem/index.scss +0 -207
- package/dist/packages/cell/index.scss +9 -9
- package/dist/packages/cellgroup/index.scss +1 -1
- package/dist/packages/checkbox/index.scss +4 -3
- package/dist/packages/collapseitem/index.scss +21 -11
- package/dist/packages/countdown/index.scss +3 -1
- package/dist/packages/divider/index.scss +8 -8
- package/dist/packages/elevator/index.scss +36 -36
- package/dist/packages/formitem/index.scss +15 -8
- package/dist/packages/indicator/index.scss +1 -1
- package/dist/packages/input/index.scss +70 -24
- package/dist/packages/inputnumber/index.scss +4 -2
- package/dist/packages/list/index.scss +24 -0
- package/dist/packages/menu/index.scss +3 -3
- package/dist/packages/navbar/index.scss +30 -8
- package/dist/packages/noticebar/index.scss +10 -5
- package/dist/packages/notify/index.scss +10 -0
- package/dist/packages/numberkeyboard/index.scss +22 -21
- package/dist/packages/oldpicker/index.scss +131 -0
- package/dist/packages/picker/index.scss +38 -32
- package/dist/packages/progress/index.scss +24 -19
- package/dist/packages/radio/index.scss +7 -6
- package/dist/packages/range/index.scss +113 -6
- package/dist/packages/searchbar/index.scss +7 -7
- package/dist/packages/sidenavbaritem/index.scss +5 -5
- package/dist/packages/step/index.scss +29 -29
- package/dist/packages/subsidenavbar/index.scss +10 -8
- package/dist/packages/swiper/index.scss +4 -4
- package/dist/packages/switch/index.scss +8 -8
- package/dist/packages/tabbar/index.scss +3 -2
- package/dist/packages/tabbaritem/index.scss +19 -3
- package/dist/packages/tabs/index.scss +1 -0
- package/dist/packages/timedetail/index.scss +13 -13
- package/dist/packages/timepannel/index.scss +7 -7
- package/dist/packages/timeselect/index.scss +3 -3
- package/dist/packages/toast/index.scss +8 -7
- package/dist/packages/uploader/index.scss +4 -4
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +43 -41
- package/dist/styles/themes/jdt.scss +91 -0
- package/dist/styles/variables-jdt.scss +728 -0
- package/dist/styles/variables.scss +322 -38
- package/package.json +3 -2
- package/dist/styles/themes/jdd.scss +0 -2
|
@@ -18,18 +18,25 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { reactive, computed,
|
|
25
|
+
import { reactive, computed, onBeforeMount, watch, toRefs, resolveComponent, openBlock, createBlock } from "vue";
|
|
26
26
|
import picker from "./Picker.js";
|
|
27
|
+
import { popupProps } from "./Popup.js";
|
|
27
28
|
import { c as createComponent } from "./component.js";
|
|
28
29
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
|
-
import "./Popup.js";
|
|
30
30
|
import "./OverLay.js";
|
|
31
31
|
import "./Icon.js";
|
|
32
32
|
import "./pxCheck.js";
|
|
33
|
+
function padZero(num, targetLength = 2) {
|
|
34
|
+
let str = num + "";
|
|
35
|
+
while (str.length < targetLength) {
|
|
36
|
+
str = "0" + str;
|
|
37
|
+
}
|
|
38
|
+
return str;
|
|
39
|
+
}
|
|
33
40
|
const { componentName, create } = createComponent("datepicker");
|
|
34
41
|
const currentYear = new Date().getFullYear();
|
|
35
42
|
function isDate(val) {
|
|
@@ -47,23 +54,27 @@ const _sfc_main = create({
|
|
|
47
54
|
components: {
|
|
48
55
|
[picker.name]: picker
|
|
49
56
|
},
|
|
50
|
-
props: {
|
|
57
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
51
58
|
modelValue: null,
|
|
52
|
-
visible: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: false
|
|
55
|
-
},
|
|
56
59
|
title: {
|
|
57
60
|
type: String,
|
|
58
61
|
default: ""
|
|
59
62
|
},
|
|
63
|
+
okText: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: "\u786E\u5B9A"
|
|
66
|
+
},
|
|
67
|
+
cancelText: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: "\u53D6\u6D88"
|
|
70
|
+
},
|
|
60
71
|
type: {
|
|
61
72
|
type: String,
|
|
62
73
|
default: "date"
|
|
63
74
|
},
|
|
64
75
|
isShowChinese: {
|
|
65
76
|
type: Boolean,
|
|
66
|
-
default:
|
|
77
|
+
default: false
|
|
67
78
|
},
|
|
68
79
|
minuteStep: {
|
|
69
80
|
type: Number,
|
|
@@ -78,14 +89,20 @@ const _sfc_main = create({
|
|
|
78
89
|
type: Date,
|
|
79
90
|
default: () => new Date(currentYear + 10, 11, 31),
|
|
80
91
|
validator: isDate
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
},
|
|
93
|
+
formatter: {
|
|
94
|
+
type: Function,
|
|
95
|
+
default: null
|
|
96
|
+
},
|
|
97
|
+
filter: Function
|
|
98
|
+
}),
|
|
99
|
+
emits: ["click", "update:visible", "change", "confirm", "update:moduleValue"],
|
|
84
100
|
setup(props, { emit }) {
|
|
85
101
|
const state = reactive({
|
|
86
102
|
show: false,
|
|
87
103
|
currentDate: new Date(),
|
|
88
|
-
title: props.title
|
|
104
|
+
title: props.title,
|
|
105
|
+
selectedValue: []
|
|
89
106
|
});
|
|
90
107
|
const formatValue = (value) => {
|
|
91
108
|
if (!isDate(value)) {
|
|
@@ -102,12 +119,12 @@ const _sfc_main = create({
|
|
|
102
119
|
const boundary = props[`${type}Date`];
|
|
103
120
|
const year = boundary.getFullYear();
|
|
104
121
|
let month = 1;
|
|
105
|
-
let
|
|
122
|
+
let day = 1;
|
|
106
123
|
let hour = 0;
|
|
107
124
|
let minute = 0;
|
|
108
125
|
if (type === "max") {
|
|
109
126
|
month = 12;
|
|
110
|
-
|
|
127
|
+
day = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
|
|
111
128
|
hour = 23;
|
|
112
129
|
minute = 59;
|
|
113
130
|
}
|
|
@@ -115,8 +132,8 @@ const _sfc_main = create({
|
|
|
115
132
|
if (value.getFullYear() === year) {
|
|
116
133
|
month = boundary.getMonth() + 1;
|
|
117
134
|
if (value.getMonth() + 1 === month) {
|
|
118
|
-
|
|
119
|
-
if (value.getDate() ===
|
|
135
|
+
day = boundary.getDate();
|
|
136
|
+
if (value.getDate() === day) {
|
|
120
137
|
hour = boundary.getHours();
|
|
121
138
|
if (value.getHours() === hour) {
|
|
122
139
|
minute = boundary.getMinutes();
|
|
@@ -127,15 +144,15 @@ const _sfc_main = create({
|
|
|
127
144
|
return {
|
|
128
145
|
[`${type}Year`]: year,
|
|
129
146
|
[`${type}Month`]: month,
|
|
130
|
-
[`${type}
|
|
147
|
+
[`${type}Day`]: day,
|
|
131
148
|
[`${type}Hour`]: hour,
|
|
132
149
|
[`${type}Minute`]: minute,
|
|
133
150
|
[`${type}Seconds`]: seconds
|
|
134
151
|
};
|
|
135
152
|
};
|
|
136
153
|
const ranges = computed(() => {
|
|
137
|
-
const { maxYear,
|
|
138
|
-
const { minYear,
|
|
154
|
+
const { maxYear, maxDay, maxMonth, maxHour, maxMinute, maxSeconds } = getBoundary("max", state.currentDate);
|
|
155
|
+
const { minYear, minDay, minMonth, minHour, minMinute, minSeconds } = getBoundary("min", state.currentDate);
|
|
139
156
|
let result = [
|
|
140
157
|
{
|
|
141
158
|
type: "year",
|
|
@@ -147,7 +164,7 @@ const _sfc_main = create({
|
|
|
147
164
|
},
|
|
148
165
|
{
|
|
149
166
|
type: "day",
|
|
150
|
-
range: [
|
|
167
|
+
range: [minDay, maxDay]
|
|
151
168
|
},
|
|
152
169
|
{
|
|
153
170
|
type: "hour",
|
|
@@ -172,6 +189,9 @@ const _sfc_main = create({
|
|
|
172
189
|
case "time":
|
|
173
190
|
result = result.slice(3, 6);
|
|
174
191
|
break;
|
|
192
|
+
case "year-month":
|
|
193
|
+
result = result.slice(0, 2);
|
|
194
|
+
break;
|
|
175
195
|
case "month-day":
|
|
176
196
|
result = result.slice(1, 3);
|
|
177
197
|
break;
|
|
@@ -181,32 +201,45 @@ const _sfc_main = create({
|
|
|
181
201
|
}
|
|
182
202
|
return result;
|
|
183
203
|
});
|
|
184
|
-
const
|
|
204
|
+
const columns = computed(() => {
|
|
205
|
+
const val = ranges.value.map((res, columnIndex) => {
|
|
206
|
+
return generateValue(res.range[0], res.range[1], getDateIndex(res.type), res.type, columnIndex);
|
|
207
|
+
});
|
|
208
|
+
return val;
|
|
209
|
+
});
|
|
210
|
+
const changeHandler = ({
|
|
211
|
+
columnIndex,
|
|
212
|
+
selectedValue,
|
|
213
|
+
selectedOptions
|
|
214
|
+
}) => {
|
|
185
215
|
if (["date", "datetime"].includes(props.type)) {
|
|
186
216
|
let formatDate = [];
|
|
187
|
-
|
|
188
|
-
formatDate = val.map((res) => {
|
|
189
|
-
return Number(res.slice(0, res.length - 1));
|
|
190
|
-
});
|
|
191
|
-
} else {
|
|
192
|
-
formatDate = val;
|
|
193
|
-
}
|
|
217
|
+
formatDate = selectedValue;
|
|
194
218
|
if (props.type === "date") {
|
|
195
219
|
state.currentDate = formatValue(new Date(formatDate[0], formatDate[1] - 1, Math.min(formatDate[2], getMonthEndDay(formatDate[0], formatDate[1]))));
|
|
196
220
|
} else if (props.type === "datetime") {
|
|
197
221
|
state.currentDate = formatValue(new Date(formatDate[0], formatDate[1] - 1, Math.min(formatDate[2], getMonthEndDay(formatDate[0], formatDate[1])), formatDate[3], formatDate[4]));
|
|
198
222
|
}
|
|
199
223
|
}
|
|
224
|
+
emit("change", { columnIndex, selectedValue, selectedOptions });
|
|
225
|
+
};
|
|
226
|
+
const formatterOption = (type, value) => {
|
|
227
|
+
const { filter, formatter, isShowChinese } = props;
|
|
228
|
+
let fOption = null;
|
|
229
|
+
if (formatter) {
|
|
230
|
+
fOption = formatter(type, { text: padZero(value, 2), value: padZero(value, 2) });
|
|
231
|
+
} else {
|
|
232
|
+
const padMin = padZero(value, 2);
|
|
233
|
+
const fatter = isShowChinese ? zhCNType[type] : "";
|
|
234
|
+
fOption = { text: padMin + fatter, value: padMin };
|
|
235
|
+
}
|
|
236
|
+
return fOption;
|
|
200
237
|
};
|
|
201
|
-
const generateValue = (min, max, val, type) => {
|
|
238
|
+
const generateValue = (min, max, val, type, columnIndex) => {
|
|
202
239
|
const arr = [];
|
|
203
240
|
let index2 = 0;
|
|
204
241
|
while (min <= max) {
|
|
205
|
-
|
|
206
|
-
arr.push(min + zhCNType[type]);
|
|
207
|
-
} else {
|
|
208
|
-
arr.push(min);
|
|
209
|
-
}
|
|
242
|
+
arr.push(formatterOption(type, min));
|
|
210
243
|
if (type === "minute") {
|
|
211
244
|
min += props.minuteStep;
|
|
212
245
|
} else {
|
|
@@ -216,7 +249,8 @@ const _sfc_main = create({
|
|
|
216
249
|
index2++;
|
|
217
250
|
}
|
|
218
251
|
}
|
|
219
|
-
|
|
252
|
+
state.selectedValue[columnIndex] = arr[index2].value;
|
|
253
|
+
return props.filter ? props.filter(type, arr) : arr;
|
|
220
254
|
};
|
|
221
255
|
const getDateIndex = (type) => {
|
|
222
256
|
if (type === "year") {
|
|
@@ -234,12 +268,6 @@ const _sfc_main = create({
|
|
|
234
268
|
}
|
|
235
269
|
return 0;
|
|
236
270
|
};
|
|
237
|
-
const columns = computed(() => {
|
|
238
|
-
const val = ranges.value.map((res) => {
|
|
239
|
-
return generateValue(res.range[0], res.range[1], getDateIndex(res.type), res.type);
|
|
240
|
-
});
|
|
241
|
-
return val;
|
|
242
|
-
});
|
|
243
271
|
const closeHandler = () => {
|
|
244
272
|
emit("update:visible", false);
|
|
245
273
|
};
|
|
@@ -247,9 +275,12 @@ const _sfc_main = create({
|
|
|
247
275
|
emit("update:visible", false);
|
|
248
276
|
emit("confirm", val);
|
|
249
277
|
};
|
|
250
|
-
|
|
278
|
+
onBeforeMount(() => {
|
|
251
279
|
state.currentDate = formatValue(props.modelValue);
|
|
252
280
|
});
|
|
281
|
+
watch(() => props.modelValue, (value) => {
|
|
282
|
+
state.currentDate = formatValue(value);
|
|
283
|
+
});
|
|
253
284
|
watch(() => props.title, (val) => {
|
|
254
285
|
state.title = val;
|
|
255
286
|
});
|
|
@@ -267,13 +298,18 @@ const _sfc_main = create({
|
|
|
267
298
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
268
299
|
const _component_nut_picker = resolveComponent("nut-picker");
|
|
269
300
|
return openBlock(), createBlock(_component_nut_picker, {
|
|
301
|
+
modelValue: _ctx.selectedValue,
|
|
302
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.selectedValue = $event),
|
|
270
303
|
visible: _ctx.show,
|
|
304
|
+
okText: _ctx.okText,
|
|
305
|
+
cancelText: _ctx.cancelText,
|
|
271
306
|
onClose: _ctx.closeHandler,
|
|
272
|
-
|
|
307
|
+
columns: _ctx.columns,
|
|
273
308
|
onChange: _ctx.changeHandler,
|
|
274
309
|
title: _ctx.title,
|
|
275
|
-
onConfirm: _ctx.confirm
|
|
276
|
-
|
|
310
|
+
onConfirm: _ctx.confirm,
|
|
311
|
+
isWrapTeleport: _ctx.isWrapTeleport
|
|
312
|
+
}, null, 8, ["modelValue", "visible", "okText", "cancelText", "onClose", "columns", "onChange", "title", "onConfirm", "isWrapTeleport"]);
|
|
277
313
|
}
|
|
278
314
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
279
315
|
export { index as default };
|
|
@@ -22,13 +22,13 @@ var __publicField = (obj, key, value) => {
|
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
24
|
/*!
|
|
25
|
-
* @nutui/nutui v3.1.
|
|
26
|
-
* (c)
|
|
25
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
26
|
+
* (c) 2022 @jdf2e.
|
|
27
27
|
* Released under the MIT License.
|
|
28
28
|
*/
|
|
29
29
|
import { ref, onMounted, watch, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, createElementBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle, createVNode, render, h } from "vue";
|
|
30
30
|
import { c as createComponent } from "./component.js";
|
|
31
|
-
import
|
|
31
|
+
import popup, { popupProps } from "./Popup.js";
|
|
32
32
|
import Button from "./Button.js";
|
|
33
33
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
34
34
|
import "./OverLay.js";
|
|
@@ -38,7 +38,7 @@ const { componentName, create } = createComponent("dialog");
|
|
|
38
38
|
const _sfc_main = create({
|
|
39
39
|
inheritAttrs: false,
|
|
40
40
|
components: {
|
|
41
|
-
[
|
|
41
|
+
[popup.name]: popup,
|
|
42
42
|
[Button.name]: Button
|
|
43
43
|
},
|
|
44
44
|
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
@@ -223,6 +223,8 @@ class DialogOptions {
|
|
|
223
223
|
__publicField(this, "okText", "\u786E\u5B9A");
|
|
224
224
|
__publicField(this, "textAlign", "center");
|
|
225
225
|
__publicField(this, "teleport", "body");
|
|
226
|
+
__publicField(this, "id", new Date().getTime());
|
|
227
|
+
__publicField(this, "footerDirection", "horizontal");
|
|
226
228
|
__publicField(this, "onUpdate", (value) => {
|
|
227
229
|
});
|
|
228
230
|
__publicField(this, "onOk", () => {
|
|
@@ -262,7 +264,7 @@ class DialogFunction {
|
|
|
262
264
|
}
|
|
263
265
|
}
|
|
264
266
|
const root = document.createElement("view");
|
|
265
|
-
root.id = "dialog-" +
|
|
267
|
+
root.id = "dialog-" + options.id;
|
|
266
268
|
const Wrapper = {
|
|
267
269
|
setup() {
|
|
268
270
|
options.onUpdate = (val) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
@@ -62,8 +62,8 @@ const _sfc_main = create({
|
|
|
62
62
|
const domElem = document.documentElement;
|
|
63
63
|
state.elWidth = myDrag.value.offsetWidth;
|
|
64
64
|
state.elHeight = myDrag.value.offsetHeight;
|
|
65
|
-
state.screenWidth = domElem.clientWidth;
|
|
66
|
-
state.screenHeight = domElem.clientHeight;
|
|
65
|
+
state.screenWidth = domElem.clientWidth || 375;
|
|
66
|
+
state.screenHeight = domElem.clientHeight || 667;
|
|
67
67
|
}
|
|
68
68
|
function goLeft(target) {
|
|
69
69
|
if (state.boundary.left) {
|
|
@@ -18,13 +18,13 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { ref, reactive, computed, toRefs, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { u as useExpose } from "./
|
|
27
|
+
import { u as useExpose } from "./index2.js";
|
|
28
28
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
29
|
const { componentName, create } = createComponent("elevator");
|
|
30
30
|
const _sfc_main = create({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { toRefs, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, Fragment, createCommentVNode, toDisplayString } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode, renderSlot, createElementVNode, Fragment, renderList, toDisplayString, createVNode } from "vue";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
7
|
import { i as isPromise } from "./util.js";
|
|
8
|
-
import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot } from "vue";
|
|
8
|
+
import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const component = {
|
|
11
11
|
props: {
|
|
@@ -69,8 +69,9 @@ const component = {
|
|
|
69
69
|
}
|
|
70
70
|
let value = getPropByPath(props.modelValue, prop || "");
|
|
71
71
|
tipMessage({ prop, message: "" });
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
let _rules = [...rules];
|
|
73
|
+
while (_rules.length) {
|
|
74
|
+
const { required, validator, regex, message } = _rules.shift();
|
|
74
75
|
const errorMsg = { prop, message };
|
|
75
76
|
if (required) {
|
|
76
77
|
if (!value) {
|
|
@@ -140,7 +141,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
140
141
|
const _component_nut_cell_group = resolveComponent("nut-cell-group");
|
|
141
142
|
return openBlock(), createElementBlock("form", {
|
|
142
143
|
class: "nut-form",
|
|
143
|
-
|
|
144
|
+
action: "#",
|
|
145
|
+
onSubmit: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onSubmit && _ctx.onSubmit(...args), ["prevent"]))
|
|
144
146
|
}, [
|
|
145
147
|
createVNode(_component_nut_cell_group, null, {
|
|
146
148
|
default: withCtx(() => [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { p as pxCheck } from "./pxCheck.js";
|
|
7
|
-
import { inject, computed, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, createElementVNode, renderSlot } from "vue";
|
|
7
|
+
import { inject, provide, computed, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, createElementVNode, renderSlot } from "vue";
|
|
8
8
|
import { c as createComponent } from "./component.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const { componentName, create } = createComponent("form-item");
|
|
@@ -43,21 +43,24 @@ const _sfc_main = create({
|
|
|
43
43
|
},
|
|
44
44
|
labelAlign: {
|
|
45
45
|
type: String,
|
|
46
|
-
default: "
|
|
46
|
+
default: ""
|
|
47
47
|
},
|
|
48
48
|
errorMessageAlign: {
|
|
49
49
|
type: String,
|
|
50
|
-
default: "
|
|
50
|
+
default: ""
|
|
51
51
|
},
|
|
52
52
|
bodyAlign: {
|
|
53
53
|
type: String,
|
|
54
|
-
default: "
|
|
54
|
+
default: ""
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
components: {},
|
|
58
58
|
emits: [""],
|
|
59
59
|
setup(props, { emit }) {
|
|
60
60
|
const parent = inject("formErrorTip");
|
|
61
|
+
provide("form", {
|
|
62
|
+
props
|
|
63
|
+
});
|
|
61
64
|
const labelStyle = computed(() => {
|
|
62
65
|
return {
|
|
63
66
|
width: pxCheck(props.labelWidth),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, getCurrentInstance, onUnmounted, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createBlock, toDisplayString } from "vue";
|
|
7
|
-
import { useRouter } from "
|
|
7
|
+
import { u as useRouter } from "./index.js";
|
|
8
8
|
import { c as createComponent } from "./component.js";
|
|
9
9
|
import { p as pxCheck } from "./pxCheck.js";
|
|
10
10
|
import { G as GRID_KEY } from "./common.js";
|
|
@@ -22,13 +22,13 @@ var __publicField = (obj, key, value) => {
|
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
24
|
/*!
|
|
25
|
-
* @nutui/nutui v3.1.
|
|
26
|
-
* (c)
|
|
25
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
26
|
+
* (c) 2022 @jdf2e.
|
|
27
27
|
* Released under the MIT License.
|
|
28
28
|
*/
|
|
29
29
|
import { toRefs, reactive, watch, onMounted, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withModifiers, createElementBlock, Fragment, renderList, createVNode, createCommentVNode, toDisplayString, render, h } from "vue";
|
|
30
30
|
import { c as createComponent } from "./component.js";
|
|
31
|
-
import
|
|
31
|
+
import popup from "./Popup.js";
|
|
32
32
|
import Video from "./Video.js";
|
|
33
33
|
import Swiper from "./Swiper.js";
|
|
34
34
|
import SwiperItem from "./SwiperItem.js";
|
|
@@ -36,7 +36,7 @@ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
|
36
36
|
import "./OverLay.js";
|
|
37
37
|
import "./Icon.js";
|
|
38
38
|
import "./pxCheck.js";
|
|
39
|
-
import "./
|
|
39
|
+
import "./index2.js";
|
|
40
40
|
const { componentName, create } = createComponent("imagepreview");
|
|
41
41
|
const _sfc_main = create({
|
|
42
42
|
props: {
|
|
@@ -71,11 +71,15 @@ const _sfc_main = create({
|
|
|
71
71
|
autoplay: {
|
|
72
72
|
type: [Number, String],
|
|
73
73
|
default: 3e3
|
|
74
|
+
},
|
|
75
|
+
isWrapTeleport: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
74
78
|
}
|
|
75
79
|
},
|
|
76
80
|
emits: ["close"],
|
|
77
81
|
components: {
|
|
78
|
-
[
|
|
82
|
+
[popup.name]: popup,
|
|
79
83
|
[Video.name]: Video,
|
|
80
84
|
[Swiper.name]: Swiper,
|
|
81
85
|
[SwiperItem.name]: SwiperItem
|
|
@@ -220,6 +224,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
220
224
|
"pop-class": "custom-pop",
|
|
221
225
|
visible: _ctx.showPop,
|
|
222
226
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.showPop = $event),
|
|
227
|
+
isWrapTeleport: _ctx.isWrapTeleport,
|
|
223
228
|
onClick: _ctx.onClose,
|
|
224
229
|
style: { "width": "100%" }
|
|
225
230
|
}, {
|
|
@@ -271,7 +276,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
271
276
|
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.active) + " / " + toDisplayString(_ctx.images.length + _ctx.videos.length), 1)
|
|
272
277
|
]),
|
|
273
278
|
_: 1
|
|
274
|
-
}, 8, ["visible", "onClick"]);
|
|
279
|
+
}, 8, ["visible", "isWrapTeleport", "onClick"]);
|
|
275
280
|
}
|
|
276
281
|
var ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
277
282
|
class ImagePreviewOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { toRefs, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, toDisplayString } from "vue";
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { reactive, computed, onMounted, onUnmounted, ref, onActivated, onDeactivated, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, toDisplayString, renderSlot, createCommentVNode } from "vue";
|