vary-ui 3.22.46 → 3.22.50
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/dist/{Loading-BKbyQIb2.js → Loading-D2Ra4DKv.js} +2 -2
- package/dist/{Wrap-DzLByCXj.js → Wrap-D0FSa0EY.js} +1 -1
- package/dist/lib/Button/Button.js +13 -13
- package/dist/lib/Card/Card.js +2 -2
- package/dist/lib/Checkbox/Checkbox.js +7 -6
- package/dist/lib/CheckboxGroup/CheckboxGroup.js +2 -2
- package/dist/lib/Confirm/Confirm.js +5 -10
- package/dist/lib/Date/Date.js +135 -121
- package/dist/lib/Dialog/Dialog.js +5 -4
- package/dist/lib/Divider/Divider.js +1 -1
- package/dist/lib/Form/Form.js +2 -3
- package/dist/lib/FormItem/FormItem.js +3 -3
- package/dist/lib/Input/Input.js +14 -13
- package/dist/lib/Link/Link.js +10 -10
- package/dist/lib/Loading/Loading.js +3 -3
- package/dist/lib/Menu/Menu.js +124 -97
- package/dist/lib/Message/Message.js +2 -2
- package/dist/lib/Pagination/Pagination.js +11 -12
- package/dist/lib/Popover/Popover.js +22 -9
- package/dist/lib/Radio/Radio.js +2 -2
- package/dist/lib/RadioButton/RadioButton.js +2 -2
- package/dist/lib/RadioGroup/RadioGroup.js +1 -1
- package/dist/lib/Scene/Scene.js +2 -2
- package/dist/lib/Scroll/Scroll.js +2 -2
- package/dist/lib/Select/Select.js +236 -117
- package/dist/lib/Skeleton/Skeleton.js +1 -1
- package/dist/lib/Tab/Tab.js +1 -1
- package/dist/lib/Table/Table.js +264 -229
- package/dist/lib/TableColumn/TableColumn.js +1 -1
- package/dist/lib/Tabs/Tabs.js +2 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/types/lib/Button/Button.vue.d.ts +24 -22
- package/dist/types/lib/Date/Date.vue.d.ts +8 -8
- package/dist/types/lib/Input/Input.vue.d.ts +2 -2
- package/dist/types/lib/InputNumber/InputNumber.vue.d.ts +92 -0
- package/dist/types/lib/Link/Link.vue.d.ts +18 -16
- package/dist/types/lib/Menu/Menu.vue.d.ts +2 -2
- package/dist/types/lib/Scene/Scene.vue.d.ts +2 -2
- package/dist/types/lib/Select/Select.vue.d.ts +6 -6
- package/dist/vary-ui.css +1 -1
- package/dist/vary-ui.js +231 -19
- package/package.json +1 -1
- package/dist/types/src/main.d.ts +0 -3
- /package/dist/{_plugin-vue_export-helper-D7Ud-N38.js → _plugin-vue_export-helper-BXzNjKnu.js} +0 -0
- /package/dist/{_tslib-DdKtBmML.js → _tslib-DlAW9n5F.js} +0 -0
- /package/dist/{config-CzBnUX60.js → config-B07fLkJm.js} +0 -0
- /package/dist/{utils-BBP7kr-V.js → utils-CKmXyjAy.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from './config-
|
|
3
|
-
import { _ as _export_sfc } from './_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from './config-B07fLkJm.js';
|
|
3
|
+
import { _ as _export_sfc } from './_plugin-vue_export-helper-BXzNjKnu.js';
|
|
4
4
|
|
|
5
5
|
var _a;
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from './_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from './_plugin-vue_export-helper-BXzNjKnu.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
2
|
+
import { c as config } from '../../config-B07fLkJm.js';
|
|
3
3
|
import { Icon } from '@iconify/vue';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
|
@@ -12,47 +12,47 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
// primary, success, danger, warning, info
|
|
13
13
|
primary: {
|
|
14
14
|
type: Boolean,
|
|
15
|
-
|
|
15
|
+
default: false
|
|
16
16
|
},
|
|
17
17
|
success: {
|
|
18
18
|
type: Boolean,
|
|
19
|
-
|
|
19
|
+
default: false
|
|
20
20
|
},
|
|
21
21
|
danger: {
|
|
22
22
|
type: Boolean,
|
|
23
|
-
|
|
23
|
+
default: false
|
|
24
24
|
},
|
|
25
25
|
warning: {
|
|
26
26
|
type: Boolean,
|
|
27
|
-
|
|
27
|
+
default: false
|
|
28
28
|
},
|
|
29
29
|
info: {
|
|
30
30
|
type: Boolean,
|
|
31
|
-
|
|
31
|
+
default: false
|
|
32
32
|
},
|
|
33
33
|
disabled: {
|
|
34
34
|
type: Boolean,
|
|
35
|
-
|
|
35
|
+
default: false
|
|
36
36
|
},
|
|
37
37
|
border: {
|
|
38
38
|
type: Boolean,
|
|
39
|
-
|
|
39
|
+
default: false
|
|
40
40
|
},
|
|
41
41
|
plain: {
|
|
42
42
|
type: Boolean,
|
|
43
|
-
|
|
43
|
+
default: false
|
|
44
44
|
},
|
|
45
45
|
round: {
|
|
46
46
|
type: Boolean,
|
|
47
|
-
|
|
47
|
+
default: false
|
|
48
48
|
},
|
|
49
49
|
size: {
|
|
50
50
|
type: String,
|
|
51
|
-
|
|
51
|
+
default: ""
|
|
52
52
|
},
|
|
53
53
|
icon: {
|
|
54
54
|
type: String,
|
|
55
|
-
|
|
55
|
+
default: ""
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
emits: ["click"],
|
package/dist/lib/Card/Card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-B07fLkJm.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import {
|
|
2
|
+
import { c as config } from '../../config-B07fLkJm.js';
|
|
3
|
+
import { Icon } from '@iconify/vue';
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
4
5
|
|
|
5
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
props: {
|
|
@@ -80,10 +81,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
81
|
}
|
|
81
82
|
}, [createVNode("div", {
|
|
82
83
|
"class": "v_checkbox_field"
|
|
83
|
-
}, [_props.partial ? createVNode(
|
|
84
|
-
"
|
|
85
|
-
}, null) : finalCheckStatus.value ? createVNode(
|
|
86
|
-
"
|
|
84
|
+
}, [_props.partial ? createVNode(Icon, {
|
|
85
|
+
"icon": "mdi:minus"
|
|
86
|
+
}, null) : finalCheckStatus.value ? createVNode(Icon, {
|
|
87
|
+
"icon": "mdi:check"
|
|
87
88
|
}, null) : null]), createVNode("div", {
|
|
88
89
|
"class": "v_checkbox_label"
|
|
89
90
|
}, [_slots.default ? _slots.default({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, provide, computed, createVNode } from 'vue';
|
|
2
|
-
import { i as isArray } from '../../utils-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { i as isArray } from '../../utils-CKmXyjAy.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, createVNode, createApp, h, isVNode } from 'vue';
|
|
2
2
|
import Button from '../Button/Button.js';
|
|
3
|
-
import {
|
|
4
|
-
import '../../
|
|
5
|
-
import '
|
|
3
|
+
import { Icon } from '@iconify/vue';
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
5
|
+
import '../../config-B07fLkJm.js';
|
|
6
6
|
|
|
7
7
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
props: {
|
|
@@ -67,13 +67,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
"class": "v_confirm_content_wrapper"
|
|
68
68
|
}, [_props.icon ? createVNode("div", {
|
|
69
69
|
"class": ["v_confirm_icon", `v_confirm_icon--${_props.icon}`]
|
|
70
|
-
}, [typeof _props.icon === "string" ? createVNode(
|
|
71
|
-
"
|
|
72
|
-
"icon-check-round-fill": _props.icon == "success",
|
|
73
|
-
"icon-close-round-fill": _props.icon == "danger",
|
|
74
|
-
"icon-danger-fill": _props.icon == "warning",
|
|
75
|
-
"icon-info-fill": _props.icon == "info"
|
|
76
|
-
}]
|
|
70
|
+
}, [typeof _props.icon === "string" ? createVNode(Icon, {
|
|
71
|
+
"icon": _props.icon == "success" ? "mdi:check-circle" : _props.icon == "danger" ? "mdi:close-circle" : _props.icon == "warning" ? "mdi:alert-circle" : _props.icon == "info" ? "mdi:information" : "mdi:check-circle"
|
|
77
72
|
}, null) : _props.icon]) : null, _props.content && createVNode("div", {
|
|
78
73
|
"class": "v_confirm_content"
|
|
79
74
|
}, [_props.content])]), createVNode("div", {
|
package/dist/lib/Date/Date.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, ref, reactive, watch, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import { n as now, e as isTime, g as isYear, h as isMonth, d as isDate, f as isDateTime } from '../../utils-
|
|
2
|
+
import { n as now, e as isTime, g as isYear, h as isMonth, d as isDate, f as isDateTime } from '../../utils-CKmXyjAy.js';
|
|
3
3
|
import Popover from '../Popover/Popover.js';
|
|
4
|
-
import Scroll from '../Scroll/Scroll.js';
|
|
5
4
|
import Link from '../Link/Link.js';
|
|
6
|
-
import { W as Wrap } from '../../Wrap-
|
|
7
|
-
import { c as config } from '../../config-
|
|
8
|
-
import {
|
|
9
|
-
import '
|
|
5
|
+
import { W as Wrap } from '../../Wrap-D0FSa0EY.js';
|
|
6
|
+
import { c as config } from '../../config-B07fLkJm.js';
|
|
7
|
+
import { Icon } from '@iconify/vue';
|
|
8
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
10
9
|
|
|
11
10
|
const weeks = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
|
|
12
11
|
const months = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"].map((r, i) => {
|
|
@@ -37,11 +36,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
36
|
// 决定是否只展示时间模块
|
|
38
37
|
disabled: {
|
|
39
38
|
type: Boolean,
|
|
40
|
-
|
|
39
|
+
default: false
|
|
41
40
|
},
|
|
42
41
|
readonly: {
|
|
43
42
|
type: Boolean,
|
|
44
|
-
|
|
43
|
+
default: false
|
|
45
44
|
},
|
|
46
45
|
placeholder: {
|
|
47
46
|
type: String,
|
|
@@ -49,11 +48,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
48
|
},
|
|
50
49
|
clearable: {
|
|
51
50
|
type: Boolean,
|
|
52
|
-
|
|
51
|
+
default: false
|
|
53
52
|
},
|
|
54
53
|
editable: {
|
|
55
54
|
type: Boolean,
|
|
56
|
-
|
|
55
|
+
default: false
|
|
57
56
|
},
|
|
58
57
|
align: {
|
|
59
58
|
type: String,
|
|
@@ -120,7 +119,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
119
|
}
|
|
121
120
|
// 本月数据
|
|
122
121
|
for (let i = 1; i <= daysInMonth; i++) {
|
|
123
|
-
const date = new Date(year, month, i
|
|
122
|
+
const date = new Date(year, month, i);
|
|
124
123
|
const value = date.toISOString().slice(0, 10);
|
|
125
124
|
const row = {
|
|
126
125
|
value: value,
|
|
@@ -288,7 +287,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
288
287
|
panel.second = second;
|
|
289
288
|
} else {
|
|
290
289
|
// year模式
|
|
291
|
-
console.log("modeType:", modeType);
|
|
292
290
|
if (modeType === "year") {
|
|
293
291
|
year = (isYear(v) ? v : nowTime).slice(0, 4);
|
|
294
292
|
panel.year = year;
|
|
@@ -330,15 +328,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
330
328
|
panel.second = second;
|
|
331
329
|
}
|
|
332
330
|
}
|
|
333
|
-
console.log("panel:", panel);
|
|
334
331
|
if (autoUpdateTime && ["hour", "minute", "second"].includes(modeType)) {
|
|
335
332
|
hourValue = Number(panel.hour);
|
|
336
333
|
minuteValue = Number(panel.minute);
|
|
337
334
|
secondValue = Number(panel.second);
|
|
338
335
|
setTimeout(() => {
|
|
339
|
-
hourScrollRef.value
|
|
340
|
-
|
|
341
|
-
|
|
336
|
+
if (hourScrollRef.value) {
|
|
337
|
+
hourScrollRef.value.scrollTo(0, hourValue * timeFontSize);
|
|
338
|
+
}
|
|
339
|
+
if (["minute", "second"].includes(modeType) && minuteScrollRef.value) {
|
|
340
|
+
minuteScrollRef.value.scrollTo(0, minuteValue * timeFontSize);
|
|
341
|
+
}
|
|
342
|
+
if (["second"].includes(modeType) && secondScrollRef.value) {
|
|
343
|
+
secondScrollRef.value.scrollTo(0, secondValue * timeFontSize);
|
|
344
|
+
}
|
|
342
345
|
}, 100);
|
|
343
346
|
}
|
|
344
347
|
}
|
|
@@ -364,8 +367,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
364
367
|
panel.date = d.slice(8, 10); // 由于2月的特殊性, 以及31和30号的特殊性, 一定要更新date
|
|
365
368
|
displayYearsMiddle.value = d.slice(0, 4);
|
|
366
369
|
}
|
|
367
|
-
}, [createVNode(
|
|
368
|
-
"
|
|
370
|
+
}, [direction === "prev" ? createVNode(Icon, {
|
|
371
|
+
"icon": "mdi:chevron-left"
|
|
372
|
+
}, null) : createVNode(Icon, {
|
|
373
|
+
"icon": "mdi:chevron-right"
|
|
369
374
|
}, null)]);
|
|
370
375
|
}
|
|
371
376
|
function controlYearBatch(direction) {
|
|
@@ -379,8 +384,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
379
384
|
displayYearsMiddle.value = Number(displayYearsMiddle.value) - 15 + "";
|
|
380
385
|
}
|
|
381
386
|
}
|
|
382
|
-
}, [createVNode(
|
|
383
|
-
"
|
|
387
|
+
}, [direction === "prev" ? createVNode(Icon, {
|
|
388
|
+
"icon": "mdi:chevron-double-left"
|
|
389
|
+
}, null) : createVNode(Icon, {
|
|
390
|
+
"icon": "mdi:chevron-double-right"
|
|
384
391
|
}, null)]);
|
|
385
392
|
}
|
|
386
393
|
function controlMonth(direction) {
|
|
@@ -398,8 +405,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
398
405
|
panel.date = d.slice(8, 10); // 由于2月的特殊性, 以及31和30号的特殊性, 一定要更新date
|
|
399
406
|
displayYearsMiddle.value = d.slice(0, 4);
|
|
400
407
|
}
|
|
401
|
-
}, [createVNode(
|
|
402
|
-
"
|
|
408
|
+
}, [direction === "prev" ? createVNode(Icon, {
|
|
409
|
+
"icon": "mdi:chevron-double-left"
|
|
410
|
+
}, null) : createVNode(Icon, {
|
|
411
|
+
"icon": "mdi:chevron-double-right"
|
|
403
412
|
}, null)]);
|
|
404
413
|
}
|
|
405
414
|
function datePanel() {
|
|
@@ -533,7 +542,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
533
542
|
}
|
|
534
543
|
// 更新panel
|
|
535
544
|
panel.year = y.value;
|
|
536
|
-
displayYearsMiddle.value =
|
|
545
|
+
displayYearsMiddle.value = y.value;
|
|
537
546
|
panel.value = 2;
|
|
538
547
|
}
|
|
539
548
|
}, [createVNode("span", {
|
|
@@ -555,128 +564,134 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
555
564
|
"class": `v_date_time_col`
|
|
556
565
|
}, [createVNode("div", {
|
|
557
566
|
"class": `v_date_time_type`
|
|
558
|
-
}, [createTextVNode("hour")]), createVNode(
|
|
567
|
+
}, [createTextVNode("hour")]), createVNode("div", {
|
|
559
568
|
"ref": hourScrollRef,
|
|
560
|
-
"class": `v_date_time_scroll`,
|
|
561
|
-
"
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
if (hourValue === 23) return;
|
|
571
|
-
hourValue++;
|
|
569
|
+
"class": `v_date_time_scroll v_date_scroll_container`,
|
|
570
|
+
"onWheel": e => {
|
|
571
|
+
// 滚轮事件, 支持快速切换小时
|
|
572
|
+
e.stopPropagation();
|
|
573
|
+
e.preventDefault();
|
|
574
|
+
if (e.deltaY > 0) {
|
|
575
|
+
// 向下滚动
|
|
576
|
+
if (hourValue === 23) return;
|
|
577
|
+
hourValue++;
|
|
578
|
+
if (hourScrollRef.value) {
|
|
572
579
|
hourScrollRef.value.scrollTo(0, hourValue * timeFontSize);
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
580
|
+
}
|
|
581
|
+
} else {
|
|
582
|
+
// 向上滚动
|
|
583
|
+
if (hourValue === 0) return;
|
|
584
|
+
hourValue--;
|
|
585
|
+
if (hourScrollRef.value) {
|
|
577
586
|
hourScrollRef.value.scrollTo(0, hourValue * timeFontSize);
|
|
578
587
|
}
|
|
579
|
-
panel.hour = hourValue < 10 ? "0" + hourValue : hourValue + "";
|
|
580
588
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
"
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
589
|
+
panel.hour = hourValue < 10 ? "0" + hourValue : hourValue + "";
|
|
590
|
+
}
|
|
591
|
+
}, [generateTime(24).map(hour => {
|
|
592
|
+
return createVNode("div", {
|
|
593
|
+
"class": ["v_date_time_text", {
|
|
594
|
+
"v_date_time_text--active": panel.hour === hour.text
|
|
595
|
+
}],
|
|
596
|
+
"onClick": () => {
|
|
597
|
+
// 点击单项, 让scroll直接移动到指定位置
|
|
598
|
+
if (!hour.value) return; // 点击空白处时, 直接return
|
|
599
|
+
hourValue = hour.value;
|
|
600
|
+
if (hourScrollRef.value) {
|
|
590
601
|
hourScrollRef.value.scrollTo(0, hourValue * timeFontSize);
|
|
591
|
-
panel.hour = hourValue < 10 ? "0" + hourValue : hourValue + "";
|
|
592
602
|
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
603
|
+
panel.hour = hourValue < 10 ? "0" + hourValue : hourValue + "";
|
|
604
|
+
}
|
|
605
|
+
}, [hour.text]);
|
|
606
|
+
})])]), createVNode("div", {
|
|
596
607
|
"class": `v_date_time_col`
|
|
597
608
|
}, [createVNode("div", {
|
|
598
609
|
"class": `v_date_time_type`
|
|
599
|
-
}, [createTextVNode("min")]), createVNode(
|
|
610
|
+
}, [createTextVNode("min")]), createVNode("div", {
|
|
600
611
|
"ref": minuteScrollRef,
|
|
601
|
-
"class": `v_date_time_scroll`,
|
|
602
|
-
"
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
if (
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
if (minuteValue === 59) return;
|
|
613
|
-
minuteValue++;
|
|
612
|
+
"class": `v_date_time_scroll v_date_scroll_container`,
|
|
613
|
+
"onWheel": e => {
|
|
614
|
+
// 滚轮事件, 支持快速切换分钟
|
|
615
|
+
e.stopPropagation();
|
|
616
|
+
e.preventDefault();
|
|
617
|
+
if (["hour"].includes(modeType)) return; // 如果模式是hour, 不需要滚动
|
|
618
|
+
if (e.deltaY > 0) {
|
|
619
|
+
// 向下滚动
|
|
620
|
+
if (minuteValue === 59) return;
|
|
621
|
+
minuteValue++;
|
|
622
|
+
if (minuteScrollRef.value) {
|
|
614
623
|
minuteScrollRef.value.scrollTo(0, minuteValue * timeFontSize);
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
624
|
+
}
|
|
625
|
+
} else {
|
|
626
|
+
// 向上滚动
|
|
627
|
+
if (minuteValue === 0) return;
|
|
628
|
+
minuteValue--;
|
|
629
|
+
if (minuteScrollRef.value) {
|
|
619
630
|
minuteScrollRef.value.scrollTo(0, minuteValue * timeFontSize);
|
|
620
631
|
}
|
|
621
|
-
panel.minute = minuteValue < 10 ? "0" + minuteValue : minuteValue + "";
|
|
622
632
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
"
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
633
|
+
panel.minute = minuteValue < 10 ? "0" + minuteValue : minuteValue + "";
|
|
634
|
+
}
|
|
635
|
+
}, [generateTime(["minute", "second"].includes(modeType) ? 60 : 1).map(minute => {
|
|
636
|
+
return createVNode("div", {
|
|
637
|
+
"class": ["v_date_time_text", {
|
|
638
|
+
"v_date_time_text--active": panel.minute === minute.text
|
|
639
|
+
}],
|
|
640
|
+
"onClick": () => {
|
|
641
|
+
// 点击单项, 让scroll直接移动到指定位置
|
|
642
|
+
if (!minute.value) return; // 点击空白处时, 直接return
|
|
643
|
+
minuteValue = minute.value;
|
|
644
|
+
if (minuteScrollRef.value) {
|
|
632
645
|
minuteScrollRef.value.scrollTo(0, minuteValue * timeFontSize);
|
|
633
|
-
panel.minute = minuteValue < 10 ? "0" + minuteValue : minuteValue + "";
|
|
634
646
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
647
|
+
panel.minute = minuteValue < 10 ? "0" + minuteValue : minuteValue + "";
|
|
648
|
+
}
|
|
649
|
+
}, [minute.text]);
|
|
650
|
+
})])]), createVNode("div", {
|
|
638
651
|
"class": `v_date_time_col`
|
|
639
652
|
}, [createVNode("div", {
|
|
640
653
|
"class": `v_date_time_type`
|
|
641
|
-
}, [createTextVNode("sec")]), createVNode(
|
|
654
|
+
}, [createTextVNode("sec")]), createVNode("div", {
|
|
642
655
|
"ref": secondScrollRef,
|
|
643
|
-
"class": `v_date_time_scroll`,
|
|
644
|
-
"
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
if (
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
if (secondValue === 59) return;
|
|
655
|
-
secondValue++;
|
|
656
|
+
"class": `v_date_time_scroll v_date_scroll_container`,
|
|
657
|
+
"onWheel": e => {
|
|
658
|
+
// 滚轮事件, 支持快速切换秒
|
|
659
|
+
e.stopPropagation();
|
|
660
|
+
e.preventDefault();
|
|
661
|
+
if (["hour", "minute"].includes(modeType)) return; // 如果模式是hour或minute, 不需要滚动
|
|
662
|
+
if (e.deltaY > 0) {
|
|
663
|
+
// 向下滚动
|
|
664
|
+
if (secondValue === 59) return;
|
|
665
|
+
secondValue++;
|
|
666
|
+
if (secondScrollRef.value) {
|
|
656
667
|
secondScrollRef.value.scrollTo(0, secondValue * timeFontSize);
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
668
|
+
}
|
|
669
|
+
} else {
|
|
670
|
+
// 向上滚动
|
|
671
|
+
if (secondValue === 0) return;
|
|
672
|
+
secondValue--;
|
|
673
|
+
if (secondScrollRef.value) {
|
|
661
674
|
secondScrollRef.value.scrollTo(0, secondValue * timeFontSize);
|
|
662
675
|
}
|
|
663
|
-
panel.second = secondValue < 10 ? "0" + secondValue : secondValue + "";
|
|
664
676
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
"
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
677
|
+
panel.second = secondValue < 10 ? "0" + secondValue : secondValue + "";
|
|
678
|
+
}
|
|
679
|
+
}, [generateTime(modeType === "second" ? 60 : 1).map(second => {
|
|
680
|
+
return createVNode("div", {
|
|
681
|
+
"class": ["v_date_time_text", {
|
|
682
|
+
"v_date_time_text--active": panel.second === second.text
|
|
683
|
+
}],
|
|
684
|
+
"onClick": () => {
|
|
685
|
+
// 点击单项, 让scroll直接移动到指定位置
|
|
686
|
+
if (!second.value) return; // 点击空白处时, 直接return
|
|
687
|
+
secondValue = second.value;
|
|
688
|
+
if (secondScrollRef.value) {
|
|
674
689
|
secondScrollRef.value.scrollTo(0, secondValue * timeFontSize);
|
|
675
|
-
panel.second = secondValue < 10 ? "0" + secondValue : secondValue + "";
|
|
676
690
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
691
|
+
panel.second = secondValue < 10 ? "0" + secondValue : secondValue + "";
|
|
692
|
+
}
|
|
693
|
+
}, [second.text]);
|
|
694
|
+
})])])]), createVNode("div", {
|
|
680
695
|
"class": `v_date_panel_control`
|
|
681
696
|
}, [createVNode(Link, {
|
|
682
697
|
"tips": true,
|
|
@@ -697,7 +712,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
697
712
|
minute,
|
|
698
713
|
second
|
|
699
714
|
} = panel;
|
|
700
|
-
console.log("panel:", panel);
|
|
701
715
|
if (_props.onlyTime) {
|
|
702
716
|
inputValue.value = `${hour}:${minute}:${second}`;
|
|
703
717
|
} else {
|
|
@@ -773,8 +787,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
773
787
|
_emit("change", "");
|
|
774
788
|
_emit("update:model-value", "");
|
|
775
789
|
}
|
|
776
|
-
}, [createVNode(
|
|
777
|
-
"
|
|
790
|
+
}, [createVNode(Icon, {
|
|
791
|
+
"icon": "mdi:close-circle"
|
|
778
792
|
}, null)])],
|
|
779
793
|
prefix: _slots.prefix,
|
|
780
794
|
suffix: _slots.suffix
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, onMounted, onBeforeUnmount, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from '@iconify/vue';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
3
4
|
|
|
4
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
props: {
|
|
@@ -67,7 +68,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
68
|
document.documentElement.style.overflow = v ? "hidden" : "";
|
|
68
69
|
}
|
|
69
70
|
} catch (error) {
|
|
70
|
-
console.
|
|
71
|
+
console.error("Dialog error:", error);
|
|
71
72
|
}
|
|
72
73
|
}, {
|
|
73
74
|
immediate: true
|
|
@@ -119,8 +120,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
119
120
|
"onClick": () => {
|
|
120
121
|
closeDialog();
|
|
121
122
|
}
|
|
122
|
-
}, [createVNode(
|
|
123
|
-
"
|
|
123
|
+
}, [createVNode(Icon, {
|
|
124
|
+
"icon": "mdi:close-circle"
|
|
124
125
|
}, null)])]), createVNode("div", {
|
|
125
126
|
"class": "v_dialog_body"
|
|
126
127
|
}, [_slots.default && _slots.default()]), _slots.footer && createVNode("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
package/dist/lib/Form/Form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, provide, createVNode } from 'vue';
|
|
2
|
-
import { _ as __awaiter } from '../../_tslib-
|
|
2
|
+
import { _ as __awaiter } from '../../_tslib-DlAW9n5F.js';
|
|
3
3
|
import Schema from 'async-validator';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
|
@@ -65,7 +65,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
});
|
|
66
66
|
// 校验方法
|
|
67
67
|
const validate = (...args_1) => __awaiter(this, [...args_1], void 0, function* (rules = null) {
|
|
68
|
-
console.log(rules, _props.data);
|
|
69
68
|
const validator = new Schema(rules || _props.rules);
|
|
70
69
|
try {
|
|
71
70
|
yield validator.validate(_props.data);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, onMounted, onUnmounted, provide, createVNode } from 'vue';
|
|
2
|
-
import { _ as __awaiter } from '../../_tslib-
|
|
3
|
-
import { c as config } from '../../config-
|
|
2
|
+
import { _ as __awaiter } from '../../_tslib-DlAW9n5F.js';
|
|
3
|
+
import { c as config } from '../../config-B07fLkJm.js';
|
|
4
4
|
import Schema from 'async-validator';
|
|
5
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
5
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BXzNjKnu.js';
|
|
6
6
|
|
|
7
7
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
props: {
|