@veltra/desktop 1.7.3 → 1.7.5
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/components/auto-complete/style2.css +7 -6
- package/dist/components/breadcrumb/style2.css +1 -1
- package/dist/components/calendar/utils.js +5 -5
- package/dist/components/calendar/utils.js.map +1 -1
- package/dist/components/card/style2.css +2 -2
- package/dist/components/condition-editor/style2.css +4 -4
- package/dist/components/contextmenu/style2.css +7 -7
- package/dist/components/date-picker/date-picker.js +27 -4
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/dual-nav/style2.css +1 -1
- package/dist/components/expression-editor/style2.css +1 -1
- package/dist/components/number-range-input/style2.css +1 -1
- package/dist/components/progress-nodes/style2.css +2 -2
- package/dist/components/rich-text-editor/style2.css +12 -12
- package/dist/components/select/style2.css +4 -4
- package/dist/components/tabs/style2.css +1 -1
- package/dist/components/tree/style2.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/types/date-panel.d.ts +1 -1
- package/dist/types/date-picker.d.ts +10 -2
- package/dist/types/date-range-picker.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +6 -6
- package/src/components/auto-complete/style.scss +31 -6
- package/src/components/breadcrumb/style.scss +1 -1
- package/src/components/calendar/utils.ts +8 -8
- package/src/components/card/style.scss +2 -2
- package/src/components/condition-editor/style.scss +4 -4
- package/src/components/contextmenu/style.scss +25 -5
- package/src/components/date-picker/__test__/date-picker.test.ts +235 -0
- package/src/components/date-picker/date-picker.vue +33 -3
- package/src/components/dual-nav/style.scss +1 -1
- package/src/components/expression-editor/style.scss +1 -1
- package/src/components/number-range-input/style.scss +1 -1
- package/src/components/progress-nodes/style.scss +3 -3
- package/src/components/rich-text-editor/style.scss +12 -12
- package/src/components/select/style.scss +20 -4
- package/src/components/tabs/style.scss +1 -1
- package/src/components/tree/style.scss +1 -1
- package/src/types/date-panel.ts +1 -1
- package/src/types/date-picker.ts +10 -1
- package/src/types/date-range-picker.ts +1 -1
|
@@ -36,21 +36,22 @@
|
|
|
36
36
|
cursor: pointer;
|
|
37
37
|
margin: 2px 0;
|
|
38
38
|
user-select: none;
|
|
39
|
+
color: var(--u-text-color-main);
|
|
39
40
|
overflow: hidden;
|
|
40
41
|
text-overflow: ellipsis;
|
|
41
42
|
white-space: nowrap;
|
|
42
43
|
}
|
|
43
44
|
.u-auto-complete__option:hover {
|
|
44
|
-
background-color: var(--u-
|
|
45
|
-
color: var(--u-
|
|
45
|
+
background-color: var(--u-auto-complete-option-hover-bg, var(--u-bg-color-hover));
|
|
46
|
+
color: var(--u-auto-complete-option-hover-color, var(--u-text-color-title));
|
|
46
47
|
}
|
|
47
48
|
.u-auto-complete__option.is-active {
|
|
48
|
-
background-color: var(--u-
|
|
49
|
-
color: var(--u-
|
|
49
|
+
background-color: var(--u-auto-complete-option-hover-bg, var(--u-bg-color-hover));
|
|
50
|
+
color: var(--u-auto-complete-option-hover-color, var(--u-text-color-title));
|
|
50
51
|
}
|
|
51
52
|
.u-auto-complete__option.is-selected {
|
|
52
|
-
background-color: var(--u-
|
|
53
|
-
color: var(--u-
|
|
53
|
+
background-color: var(--u-auto-complete-option-selected-bg, var(--u-color-primary-light-9));
|
|
54
|
+
color: var(--u-auto-complete-option-selected-color, var(--u-color-primary));
|
|
54
55
|
}
|
|
55
56
|
.u-auto-complete__ripple {
|
|
56
57
|
background-color: var(--u-color-primary-light-7);
|
|
@@ -25,7 +25,7 @@ function getMonthDays(d, disabledDate) {
|
|
|
25
25
|
type: "current"
|
|
26
26
|
};
|
|
27
27
|
day.isToday = day.date.format() === todayStr;
|
|
28
|
-
day.disabled = disabledDate?.(day.date);
|
|
28
|
+
day.disabled = disabledDate?.(day.date, day.date.raw);
|
|
29
29
|
return day;
|
|
30
30
|
});
|
|
31
31
|
const preMonthDays = [];
|
|
@@ -39,7 +39,7 @@ function getMonthDays(d, disabledDate) {
|
|
|
39
39
|
date: d.calc(-i, "days"),
|
|
40
40
|
type: "pre"
|
|
41
41
|
};
|
|
42
|
-
day.disabled = disabledDate?.(day.date);
|
|
42
|
+
day.disabled = disabledDate?.(day.date, day.date.raw);
|
|
43
43
|
preMonthDays.unshift(day);
|
|
44
44
|
i++;
|
|
45
45
|
}
|
|
@@ -52,7 +52,7 @@ function getMonthDays(d, disabledDate) {
|
|
|
52
52
|
date: d.calc(j++, "days"),
|
|
53
53
|
type: "next"
|
|
54
54
|
};
|
|
55
|
-
day.disabled = disabledDate?.(day.date);
|
|
55
|
+
day.disabled = disabledDate?.(day.date, day.date.raw);
|
|
56
56
|
nextMonthDays.push(day);
|
|
57
57
|
}
|
|
58
58
|
return [
|
|
@@ -80,7 +80,7 @@ function getYearMonths(d, disabledDate) {
|
|
|
80
80
|
key: ym,
|
|
81
81
|
month,
|
|
82
82
|
date: monthDate,
|
|
83
|
-
disabled: disabledDate?.(monthDate)
|
|
83
|
+
disabled: disabledDate?.(monthDate, monthDate.raw)
|
|
84
84
|
};
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -99,7 +99,7 @@ function getTenYears(d, disabledDate) {
|
|
|
99
99
|
return {
|
|
100
100
|
year,
|
|
101
101
|
date: yearDate,
|
|
102
|
-
disabled: disabledDate?.(yearDate)
|
|
102
|
+
disabled: disabledDate?.(yearDate, yearDate.raw)
|
|
103
103
|
};
|
|
104
104
|
});
|
|
105
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/calendar/utils.ts"],"sourcesContent":["import { type Dater, date } from '@cat-kit/core'\n\nimport type { CalendarDay, CalendarMonth, CalendarYear } from '../../types'\n\nexport const weekDays: string[] = ['日', '一', '二', '三', '四', '五', '六']\n\n/**\n * 获取一个月的天数\n * @param d 日期\n * @param disabledDate 禁用日期\n * @returns\n */\nexport function getMonthDays(\n d: Date | string | number | Dater,\n disabledDate?: (d: Dater) => boolean\n): CalendarDay[] {\n const todayStr = date().format()\n if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {\n d = date(d)\n }\n\n // 本月天数\n d.setDay(1)\n const currentMonthDays: CalendarDay[] = Array.from({ length: d.getDays() }).map((_, i) => {\n const day: CalendarDay = { date: d.calc(i, 'days'), type: 'current' }\n day.isToday = day.date.format() === todayStr\n day.disabled = disabledDate?.(day.date)\n return day\n })\n\n const preMonthDays: CalendarDay[] = []\n\n const nextMonthDays: CalendarDay[] = []\n\n // 上月天数\n const firstDayWeek = d.weekDay\n\n if (firstDayWeek !== 0) {\n // 上个月最后一天\n d.setDay(0)\n let i = 0\n while (i < firstDayWeek) {\n const day: CalendarDay = { date: d.calc(-i, 'days'), type: 'pre' }\n day.disabled = disabledDate?.(day.date)\n preMonthDays.unshift(day)\n i++\n }\n }\n\n // 下个月的天数\n const nextMonthDaysAmount = 42 - currentMonthDays.length - preMonthDays.length\n\n let j = 0\n d.setMonth(d.month + 2).setDay(1)\n\n while (j < nextMonthDaysAmount) {\n const day: CalendarDay = { date: d.calc(j++, 'days'), type: 'next' }\n day.disabled = disabledDate?.(day.date)\n nextMonthDays.push(day)\n }\n\n return [...preMonthDays, ...currentMonthDays, ...nextMonthDays]\n}\n\n/**\n * 获取一年的月份\n * @param d 日期\n * @param disabledDate 禁用的日期\n * @returns\n */\nexport function getYearMonths(\n d: Date | string | number | Dater,\n disabledDate?: (d: Dater) => boolean\n): CalendarMonth[] {\n if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {\n d = date(d)\n }\n\n const year = d.year\n\n return Array.from({ length: 12 }).map((_, i) => {\n const month = i + 1\n\n const ym = `${year}-${month}`\n\n const monthDate = date(ym).toEndOfMonth().setHours(23)\n\n monthDate.setMinutes(59)\n monthDate.setSeconds(59)\n\n return { key: ym, month, date: monthDate, disabled: disabledDate?.(monthDate) }\n })\n}\n\n/**\n * 获取当前年份所处的10年\n * @param d 日期\n * @param disabledDate 禁用的日期\n * @returns\n */\nexport function getTenYears(\n d: Date | string | number | Dater,\n disabledDate?: (d: Dater) => boolean\n): CalendarYear[] {\n if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {\n d = date(d)\n }\n\n const startYear = d.year - (d.year % 10) + 1\n\n return Array.from({ length: 10 }).map((_, i) => {\n const year = startYear + i\n\n const yearDate = date(`${year}-12-31 23:59:59`)\n\n return { year, date: yearDate, disabled: disabledDate?.(yearDate) }\n })\n}\n"],"mappings":";;AAIA,MAAa,WAAqB;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG;;;;;;;AAQpE,SAAgB,aACd,GACA,cACe;CACf,MAAM,WAAW,KAAK,CAAC,CAAC,OAAO;CAC/B,IAAI,aAAa,QAAQ,OAAO,MAAM,YAAY,OAAO,MAAM,UAC7D,IAAI,KAAK,CAAC;CAIZ,EAAE,OAAO,CAAC;CACV,MAAM,mBAAkC,MAAM,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;EACxF,MAAM,MAAmB;GAAE,MAAM,EAAE,KAAK,GAAG,MAAM;GAAG,MAAM;EAAU;EACpE,IAAI,UAAU,IAAI,KAAK,OAAO,MAAM;EACpC,IAAI,WAAW,eAAe,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/calendar/utils.ts"],"sourcesContent":["import { type Dater, date } from '@cat-kit/core'\n\nimport type { CalendarDay, CalendarMonth, CalendarYear } from '../../types'\n\nexport const weekDays: string[] = ['日', '一', '二', '三', '四', '五', '六']\n\n/**\n * 获取一个月的天数\n * @param d 日期\n * @param disabledDate 禁用日期\n * @returns\n */\nexport function getMonthDays(\n d: Date | string | number | Dater,\n disabledDate?: (d: Dater, raw: Date) => boolean\n): CalendarDay[] {\n const todayStr = date().format()\n if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {\n d = date(d)\n }\n\n // 本月天数\n d.setDay(1)\n const currentMonthDays: CalendarDay[] = Array.from({ length: d.getDays() }).map((_, i) => {\n const day: CalendarDay = { date: d.calc(i, 'days'), type: 'current' }\n day.isToday = day.date.format() === todayStr\n day.disabled = disabledDate?.(day.date, day.date.raw)\n return day\n })\n\n const preMonthDays: CalendarDay[] = []\n\n const nextMonthDays: CalendarDay[] = []\n\n // 上月天数\n const firstDayWeek = d.weekDay\n\n if (firstDayWeek !== 0) {\n // 上个月最后一天\n d.setDay(0)\n let i = 0\n while (i < firstDayWeek) {\n const day: CalendarDay = { date: d.calc(-i, 'days'), type: 'pre' }\n day.disabled = disabledDate?.(day.date, day.date.raw)\n preMonthDays.unshift(day)\n i++\n }\n }\n\n // 下个月的天数\n const nextMonthDaysAmount = 42 - currentMonthDays.length - preMonthDays.length\n\n let j = 0\n d.setMonth(d.month + 2).setDay(1)\n\n while (j < nextMonthDaysAmount) {\n const day: CalendarDay = { date: d.calc(j++, 'days'), type: 'next' }\n day.disabled = disabledDate?.(day.date, day.date.raw)\n nextMonthDays.push(day)\n }\n\n return [...preMonthDays, ...currentMonthDays, ...nextMonthDays]\n}\n\n/**\n * 获取一年的月份\n * @param d 日期\n * @param disabledDate 禁用的日期\n * @returns\n */\nexport function getYearMonths(\n d: Date | string | number | Dater,\n disabledDate?: (d: Dater, raw: Date) => boolean\n): CalendarMonth[] {\n if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {\n d = date(d)\n }\n\n const year = d.year\n\n return Array.from({ length: 12 }).map((_, i) => {\n const month = i + 1\n\n const ym = `${year}-${month}`\n\n const monthDate = date(ym).toEndOfMonth().setHours(23)\n\n monthDate.setMinutes(59)\n monthDate.setSeconds(59)\n\n return { key: ym, month, date: monthDate, disabled: disabledDate?.(monthDate, monthDate.raw) }\n })\n}\n\n/**\n * 获取当前年份所处的10年\n * @param d 日期\n * @param disabledDate 禁用的日期\n * @returns\n */\nexport function getTenYears(\n d: Date | string | number | Dater,\n disabledDate?: (d: Dater, raw: Date) => boolean\n): CalendarYear[] {\n if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {\n d = date(d)\n }\n\n const startYear = d.year - (d.year % 10) + 1\n\n return Array.from({ length: 10 }).map((_, i) => {\n const year = startYear + i\n\n const yearDate = date(`${year}-12-31 23:59:59`)\n\n return { year, date: yearDate, disabled: disabledDate?.(yearDate, yearDate.raw) }\n })\n}\n"],"mappings":";;AAIA,MAAa,WAAqB;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG;;;;;;;AAQpE,SAAgB,aACd,GACA,cACe;CACf,MAAM,WAAW,KAAK,CAAC,CAAC,OAAO;CAC/B,IAAI,aAAa,QAAQ,OAAO,MAAM,YAAY,OAAO,MAAM,UAC7D,IAAI,KAAK,CAAC;CAIZ,EAAE,OAAO,CAAC;CACV,MAAM,mBAAkC,MAAM,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;EACxF,MAAM,MAAmB;GAAE,MAAM,EAAE,KAAK,GAAG,MAAM;GAAG,MAAM;EAAU;EACpE,IAAI,UAAU,IAAI,KAAK,OAAO,MAAM;EACpC,IAAI,WAAW,eAAe,IAAI,MAAM,IAAI,KAAK,GAAG;EACpD,OAAO;CACT,CAAC;CAED,MAAM,eAA8B,CAAC;CAErC,MAAM,gBAA+B,CAAC;CAGtC,MAAM,eAAe,EAAE;CAEvB,IAAI,iBAAiB,GAAG;EAEtB,EAAE,OAAO,CAAC;EACV,IAAI,IAAI;EACR,OAAO,IAAI,cAAc;GACvB,MAAM,MAAmB;IAAE,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM;IAAG,MAAM;GAAM;GACjE,IAAI,WAAW,eAAe,IAAI,MAAM,IAAI,KAAK,GAAG;GACpD,aAAa,QAAQ,GAAG;GACxB;EACF;CACF;CAGA,MAAM,sBAAsB,KAAK,iBAAiB,SAAS,aAAa;CAExE,IAAI,IAAI;CACR,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;CAEhC,OAAO,IAAI,qBAAqB;EAC9B,MAAM,MAAmB;GAAE,MAAM,EAAE,KAAK,KAAK,MAAM;GAAG,MAAM;EAAO;EACnE,IAAI,WAAW,eAAe,IAAI,MAAM,IAAI,KAAK,GAAG;EACpD,cAAc,KAAK,GAAG;CACxB;CAEA,OAAO;EAAC,GAAG;EAAc,GAAG;EAAkB,GAAG;CAAa;AAChE;;;;;;;AAQA,SAAgB,cACd,GACA,cACiB;CACjB,IAAI,aAAa,QAAQ,OAAO,MAAM,YAAY,OAAO,MAAM,UAC7D,IAAI,KAAK,CAAC;CAGZ,MAAM,OAAO,EAAE;CAEf,OAAO,MAAM,KAAK,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;EAC9C,MAAM,QAAQ,IAAI;EAElB,MAAM,KAAK,GAAG,KAAK,GAAG;EAEtB,MAAM,YAAY,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,EAAE;EAErD,UAAU,WAAW,EAAE;EACvB,UAAU,WAAW,EAAE;EAEvB,OAAO;GAAE,KAAK;GAAI;GAAO,MAAM;GAAW,UAAU,eAAe,WAAW,UAAU,GAAG;EAAE;CAC/F,CAAC;AACH;;;;;;;AAQA,SAAgB,YACd,GACA,cACgB;CAChB,IAAI,aAAa,QAAQ,OAAO,MAAM,YAAY,OAAO,MAAM,UAC7D,IAAI,KAAK,CAAC;CAGZ,MAAM,YAAY,EAAE,OAAQ,EAAE,OAAO,KAAM;CAE3C,OAAO,MAAM,KAAK,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM;EAC9C,MAAM,OAAO,YAAY;EAEzB,MAAM,WAAW,KAAK,GAAG,KAAK,gBAAgB;EAE9C,OAAO;GAAE;GAAM,MAAM;GAAU,UAAU,eAAe,UAAU,SAAS,GAAG;EAAE;CAClF,CAAC;AACH"}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
font-weight: bold;
|
|
83
83
|
}
|
|
84
84
|
.u-card__header {
|
|
85
|
-
background-color: var(--u-header-bg
|
|
85
|
+
background-color: var(--u-card-header-bg, transparent);
|
|
86
86
|
color: var(--u-text-color-title);
|
|
87
87
|
}
|
|
88
88
|
.u-card__cover {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
transform: translateY(-50%);
|
|
102
102
|
}
|
|
103
103
|
.u-card__action {
|
|
104
|
-
background-color: var(--u-action-bg
|
|
104
|
+
background-color: var(--u-card-action-bg, transparent);
|
|
105
105
|
}
|
|
106
106
|
.u-card__action .u-button + .u-button {
|
|
107
107
|
margin-left: var(--u-gap-default);
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
background-color: var(--u-color-primary-light-9);
|
|
83
83
|
}
|
|
84
84
|
.u-condition-editor__connector--and:hover {
|
|
85
|
-
background-color: var(--u-color-primary-light-
|
|
85
|
+
background-color: var(--u-color-primary-light-7);
|
|
86
86
|
}
|
|
87
87
|
.u-condition-editor__connector--or {
|
|
88
|
-
color: var(--u-color-warning-dark-
|
|
88
|
+
color: var(--u-color-warning-dark-1);
|
|
89
89
|
background-color: var(--u-color-warning-light-9);
|
|
90
90
|
}
|
|
91
91
|
.u-condition-editor__connector--or:hover {
|
|
92
|
-
background-color: var(--u-color-warning-light-
|
|
92
|
+
background-color: var(--u-color-warning-light-7);
|
|
93
93
|
}
|
|
94
94
|
.u-condition-editor__connector:focus-visible {
|
|
95
95
|
box-shadow: var(--u-focus-ring);
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
211
211
|
}
|
|
212
212
|
.u-condition-editor__value-chip:hover {
|
|
213
|
-
background-color: var(--u-color-primary-light-
|
|
213
|
+
background-color: var(--u-color-primary-light-7);
|
|
214
214
|
border-color: var(--u-color-primary-light-5);
|
|
215
215
|
}
|
|
216
216
|
.u-condition-editor__value-chip:focus-visible {
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
flex-wrap: nowrap;
|
|
93
93
|
}
|
|
94
94
|
.u-contextmenu__item:not(.is-disabled):not(.is-loading) > .u-contextmenu__item-content:hover {
|
|
95
|
-
background-color: var(--u-
|
|
96
|
-
color: var(--u-
|
|
95
|
+
background-color: var(--u-contextmenu-item-hover-bg, var(--u-bg-color-hover));
|
|
96
|
+
color: var(--u-contextmenu-item-hover-color, var(--u-text-color-title));
|
|
97
97
|
}
|
|
98
98
|
.u-contextmenu .u-contextmenu__item.is-open:not(.is-disabled) > .u-contextmenu__item-content {
|
|
99
|
-
background-color: var(--u-
|
|
100
|
-
color: var(--u-
|
|
99
|
+
background-color: var(--u-contextmenu-item-hover-bg, var(--u-bg-color-hover));
|
|
100
|
+
color: var(--u-contextmenu-item-hover-color, var(--u-text-color-title));
|
|
101
101
|
}
|
|
102
102
|
.u-contextmenu__icon-place {
|
|
103
103
|
width: 1em;
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
}
|
|
147
147
|
.u-contextmenu--small__item-content {
|
|
148
148
|
padding: 0 var(--u-gap-small);
|
|
149
|
-
min-height: calc(var(--u-
|
|
149
|
+
min-height: var(--u-contextmenu-item-height-small, calc(var(--u-form-component-height-small) - 4px));
|
|
150
150
|
border-radius: calc(var(--u-radius-small) + 1px);
|
|
151
151
|
}
|
|
152
152
|
.u-contextmenu--default {
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
}
|
|
155
155
|
.u-contextmenu--default__item-content {
|
|
156
156
|
padding: 0 var(--u-gap-default);
|
|
157
|
-
min-height: calc(var(--u-
|
|
157
|
+
min-height: var(--u-contextmenu-item-height-default, calc(var(--u-form-component-height-default) - 4px));
|
|
158
158
|
border-radius: calc(var(--u-radius-default) + 1px);
|
|
159
159
|
}
|
|
160
160
|
.u-contextmenu--large {
|
|
@@ -162,6 +162,6 @@
|
|
|
162
162
|
}
|
|
163
163
|
.u-contextmenu--large__item-content {
|
|
164
164
|
padding: 0 var(--u-gap-large);
|
|
165
|
-
min-height: calc(var(--u-
|
|
165
|
+
min-height: var(--u-contextmenu-item-height-large, calc(var(--u-form-component-height-large) - 4px));
|
|
166
166
|
border-radius: calc(var(--u-radius-large) + 1px);
|
|
167
167
|
}
|
|
@@ -6,7 +6,7 @@ import { Fragment, computed, createBlock, createElementBlock, createTextVNode, c
|
|
|
6
6
|
import { useFormFallbackProps, useUserAction } from "@veltra/compositions";
|
|
7
7
|
import { FORM_EMPTY_CONTENT, bem, injectFormContext } from "@veltra/utils";
|
|
8
8
|
import { Calendar } from "@veltra/icons/normal";
|
|
9
|
-
import { date } from "@cat-kit/core";
|
|
9
|
+
import { Dater, date } from "@cat-kit/core";
|
|
10
10
|
//#region src/components/date-picker/date-picker.vue
|
|
11
11
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
12
12
|
name: "UDatePicker",
|
|
@@ -18,6 +18,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
18
18
|
type: { default: "date" },
|
|
19
19
|
format: {},
|
|
20
20
|
valueFormat: {},
|
|
21
|
+
dataType: { default: "string" },
|
|
21
22
|
disabledDate: {},
|
|
22
23
|
clearable: {
|
|
23
24
|
type: Boolean,
|
|
@@ -38,7 +39,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
38
39
|
rules: {},
|
|
39
40
|
size: {}
|
|
40
41
|
},
|
|
41
|
-
emits: ["update:modelValue"],
|
|
42
|
+
emits: ["update:modelValue", "change"],
|
|
42
43
|
setup(__props, { emit: __emit }) {
|
|
43
44
|
const props = __props;
|
|
44
45
|
const emit = __emit;
|
|
@@ -63,16 +64,37 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
63
64
|
});
|
|
64
65
|
const currentDate = shallowRef();
|
|
65
66
|
const { userAction, isUserActive } = useUserAction();
|
|
67
|
+
function parseModelValue(val) {
|
|
68
|
+
if (val == null || val === "") return void 0;
|
|
69
|
+
if (val instanceof Date || typeof val === "number") {
|
|
70
|
+
const d = date(val);
|
|
71
|
+
return isNaN(d.timestamp) ? void 0 : d;
|
|
72
|
+
}
|
|
73
|
+
if (typeof val === "string") {
|
|
74
|
+
if (props.dataType === "string" && props.valueFormat) {
|
|
75
|
+
const parsed = Dater.parse(val, props.valueFormat);
|
|
76
|
+
if (!isNaN(parsed.timestamp)) return parsed;
|
|
77
|
+
}
|
|
78
|
+
const fallback = date(val);
|
|
79
|
+
return isNaN(fallback.timestamp) ? void 0 : fallback;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
66
82
|
watch(() => props.modelValue, (modelValue) => {
|
|
67
83
|
if (isUserActive()) return;
|
|
68
|
-
currentDate.value =
|
|
84
|
+
currentDate.value = parseModelValue(modelValue);
|
|
69
85
|
}, { immediate: true });
|
|
70
86
|
const displayedValue = computed(() => {
|
|
71
87
|
return currentDate.value?.format(formatStr.value) ?? "";
|
|
72
88
|
});
|
|
89
|
+
function formatModelValue(d) {
|
|
90
|
+
if (props.dataType === "date") return d.raw;
|
|
91
|
+
if (props.dataType === "timestamp") return d.timestamp;
|
|
92
|
+
return d.format(props.valueFormat ?? formatStr.value);
|
|
93
|
+
}
|
|
73
94
|
const commitSelectedDate = userAction((date) => {
|
|
74
95
|
currentDate.value = date;
|
|
75
|
-
emit("update:modelValue", date
|
|
96
|
+
emit("update:modelValue", formatModelValue(date));
|
|
97
|
+
emit("change", date.raw);
|
|
76
98
|
});
|
|
77
99
|
async function handleSelectDate(date) {
|
|
78
100
|
await commitSelectedDate(date);
|
|
@@ -81,6 +103,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
81
103
|
function handleClear() {
|
|
82
104
|
currentDate.value = void 0;
|
|
83
105
|
emit("update:modelValue", void 0);
|
|
106
|
+
emit("change", void 0);
|
|
84
107
|
}
|
|
85
108
|
return (_ctx, _cache) => {
|
|
86
109
|
return !unref(readonly) ? (openBlock(), createBlock(unref(_sfc_main$2), mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","names":["$attrs"],"sources":["../../../src/components/date-picker/date-picker.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n :class=\"className\"\n trigger=\"click\"\n width=\"auto\"\n ref=\"dropdownRef\"\n @update:visible=\"\"\n :disabled=\"disabled\"\n >\n <template #trigger>\n <u-input\n :size=\"size\"\n native-readonly\n :clearable=\"clearable\"\n :placeholder=\"placeholder\"\n :model-value=\"displayedValue\"\n :disabled=\"disabled\"\n @clear=\"handleClear\"\n >\n <template #suffix>\n <u-icon :class=\"cls.e('icon')\"><Calendar /></u-icon>\n </template>\n </u-input>\n </template>\n\n <template #content>\n <UDatePanel :size :type :disabled-date :date=\"currentDate\" @select:date=\"handleSelectDate\" />\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ displayedValue || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { date,
|
|
1
|
+
{"version":3,"file":"date-picker.js","names":["$attrs"],"sources":["../../../src/components/date-picker/date-picker.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n :class=\"className\"\n trigger=\"click\"\n width=\"auto\"\n ref=\"dropdownRef\"\n @update:visible=\"\"\n :disabled=\"disabled\"\n >\n <template #trigger>\n <u-input\n :size=\"size\"\n native-readonly\n :clearable=\"clearable\"\n :placeholder=\"placeholder\"\n :model-value=\"displayedValue\"\n :disabled=\"disabled\"\n @clear=\"handleClear\"\n >\n <template #suffix>\n <u-icon :class=\"cls.e('icon')\"><Calendar /></u-icon>\n </template>\n </u-input>\n </template>\n\n <template #content>\n <UDatePanel :size :type :disabled-date :date=\"currentDate\" @select:date=\"handleSelectDate\" />\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ displayedValue || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { date, Dater } from '@cat-kit/core'\nimport { useFormFallbackProps, useUserAction } from '@veltra/compositions'\nimport { Calendar } from '@veltra/icons/normal'\nimport { bem, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport type { DatePickerEmits, DatePickerProps } from '../../types'\nimport type { DropdownExposed } from '../../types'\nimport { UDatePanel } from '../date-panel'\nimport { UDropdown } from '../dropdown'\nimport { UIcon } from '../icon'\nimport { UInput } from '../input'\n\ndefineOptions({ name: 'UDatePicker', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n placeholder: '选择日期',\n type: 'date',\n dataType: 'string',\n disabled: undefined,\n readonly: undefined,\n clearable: true\n})\n\nconst emit = defineEmits<DatePickerEmits>()\n\nconst cls = bem('date-picker')\n\nconst { formProps } = injectFormContext()\n\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props], {\n size: 'default',\n disabled: false,\n readonly: false\n})\n\nconst className = computed(() => {\n return [cls.b, cls.m(size.value)]\n})\n\nconst dropdownRef = shallowRef<DropdownExposed>()\n\nconst formatStr = computed(() => {\n const { format, type } = props\n if (format) return format\n if (type === 'date') return 'yyyy-MM-dd'\n if (type === 'month') return 'yyyy-MM'\n if (type === 'year') return 'yyyy'\n return 'yyyy-MM-dd'\n})\n\nconst currentDate = shallowRef<Dater>()\n\nconst { userAction, isUserActive } = useUserAction()\n\nfunction parseModelValue(val?: string | number | Date): Dater | undefined {\n if (val == null || val === '') return undefined\n if (val instanceof Date || typeof val === 'number') {\n const d = date(val)\n return isNaN(d.timestamp) ? undefined : d\n }\n if (typeof val === 'string') {\n if (props.dataType === 'string' && props.valueFormat) {\n const parsed = Dater.parse(val, props.valueFormat)\n if (!isNaN(parsed.timestamp)) return parsed\n }\n const fallback = date(val)\n return isNaN(fallback.timestamp) ? undefined : fallback\n }\n return undefined\n}\n\nwatch(\n () => props.modelValue,\n (modelValue) => {\n if (isUserActive()) return\n currentDate.value = parseModelValue(modelValue)\n },\n { immediate: true }\n)\n\nconst displayedValue = computed(() => {\n return currentDate.value?.format(formatStr.value) ?? ''\n})\n\nfunction formatModelValue(d: Dater) {\n if (props.dataType === 'date') {\n return d.raw\n }\n if (props.dataType === 'timestamp') {\n return d.timestamp\n }\n return d.format(props.valueFormat ?? formatStr.value)\n}\n\nconst commitSelectedDate = userAction((date: Dater) => {\n currentDate.value = date\n emit('update:modelValue', formatModelValue(date))\n emit('change', date.raw)\n})\n\nasync function handleSelectDate(date: Dater) {\n await commitSelectedDate(date)\n dropdownRef.value?.close()\n}\n\nfunction handleClear() {\n currentDate.value = undefined\n emit('update:modelValue', undefined)\n emit('change', undefined)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDA,MAAM,QAAQ;EASd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,aAAa;EAE7B,MAAM,EAAE,cAAc,kBAAkB;EAExC,MAAM,EAAE,MAAM,UAAU,aAAa,qBAAqB,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG;GAClF,MAAM;GACN,UAAU;GACV,UAAU;EACZ,CAAC;EAED,MAAM,YAAY,eAAe;GAC/B,OAAO,CAAC,IAAI,GAAG,IAAI,EAAE,KAAK,KAAK,CAAC;EAClC,CAAC;EAED,MAAM,cAAc,WAA4B;EAEhD,MAAM,YAAY,eAAe;GAC/B,MAAM,EAAE,QAAQ,SAAS;GACzB,IAAI,QAAQ,OAAO;GACnB,IAAI,SAAS,QAAQ,OAAO;GAC5B,IAAI,SAAS,SAAS,OAAO;GAC7B,IAAI,SAAS,QAAQ,OAAO;GAC5B,OAAO;EACT,CAAC;EAED,MAAM,cAAc,WAAkB;EAEtC,MAAM,EAAE,YAAY,iBAAiB,cAAc;EAEnD,SAAS,gBAAgB,KAAiD;GACxE,IAAI,OAAO,QAAQ,QAAQ,IAAI,OAAO,KAAA;GACtC,IAAI,eAAe,QAAQ,OAAO,QAAQ,UAAU;IAClD,MAAM,IAAI,KAAK,GAAG;IAClB,OAAO,MAAM,EAAE,SAAS,IAAI,KAAA,IAAY;GAC1C;GACA,IAAI,OAAO,QAAQ,UAAU;IAC3B,IAAI,MAAM,aAAa,YAAY,MAAM,aAAa;KACpD,MAAM,SAAS,MAAM,MAAM,KAAK,MAAM,WAAW;KACjD,IAAI,CAAC,MAAM,OAAO,SAAS,GAAG,OAAO;IACvC;IACA,MAAM,WAAW,KAAK,GAAG;IACzB,OAAO,MAAM,SAAS,SAAS,IAAI,KAAA,IAAY;GACjD;EAEF;EAEA,YACQ,MAAM,aACX,eAAe;GACd,IAAI,aAAa,GAAG;GACpB,YAAY,QAAQ,gBAAgB,UAAU;EAChD,GACA,EAAE,WAAW,KAAK,CACpB;EAEA,MAAM,iBAAiB,eAAe;GACpC,OAAO,YAAY,OAAO,OAAO,UAAU,KAAK,KAAK;EACvD,CAAC;EAED,SAAS,iBAAiB,GAAU;GAClC,IAAI,MAAM,aAAa,QACrB,OAAO,EAAE;GAEX,IAAI,MAAM,aAAa,aACrB,OAAO,EAAE;GAEX,OAAO,EAAE,OAAO,MAAM,eAAe,UAAU,KAAK;EACtD;EAEA,MAAM,qBAAqB,YAAY,SAAgB;GACrD,YAAY,QAAQ;GACpB,KAAK,qBAAqB,iBAAiB,IAAI,CAAC;GAChD,KAAK,UAAU,KAAK,GAAG;EACzB,CAAC;EAED,eAAe,iBAAiB,MAAa;GAC3C,MAAM,mBAAmB,IAAI;GAC7B,YAAY,OAAO,MAAM;EAC3B;EAEA,SAAS,cAAc;GACrB,YAAY,QAAQ,KAAA;GACpB,KAAK,qBAAqB,KAAA,CAAS;GACnC,KAAK,UAAU,KAAA,CAAS;EAC1B;;GAnJW,OAAA,CAAA,MAAA,QAAA,KADT,UAAA,GAAA,YA6Ba,MAAA,WAAA,GA7Bb,WA6Ba,EAAA,KAAA,EAAA,GA3BHA,KAAAA,QAAM;IACb,OAAO,UAAA;IACR,SAAQ;IACR,OAAM;IACF,SAAA;IAAJ,KAAI;IACH,oBAAc,OAAA,OAAA,OAAA,WAAf,CAAA;IACC,UAAU,MAAA,QAAA;;IAEA,SAAO,cAaN,CAZV,YAYU,MAAA,aAAA,GAAA;KAXP,MAAM,MAAA,IAAA;KACP,mBAAA;KACC,WAAW,QAAA;KACX,aAAa,QAAA;KACb,eAAa,eAAA;KACb,UAAU,MAAA,QAAA;KACV,SAAO;;KAEG,QAAM,cACqC,CAApD,YAAoD,MAAA,WAAA,GAAA,EAA3C,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,MAAA,CAAA,EAAA,GAAA;MAAU,SAAA,cAAY,CAAZ,YAAY,MAAA,QAAA,CAAA,CAAA,CAAA;;;;;;;;;;;IAKtC,SAAO,cAC6E,CAA7F,YAA6F,MAAA,WAAA,GAAA;KAAhF,MAAA,MAAA,IAAA;KAAM,MAAA,QAAA;KAAM,iBAAA,QAAA;KAAe,MAAM,YAAA;KAAc,iBAAa;;;;;;;;GAI7E,GAAA,IAAA,CAAA,SAAA,UAAA,CAAA,MAAA,UAAA,GAAA,mBAEW,UAAA,EAAA,KAAA,EAAA,GAAA,CADN,gBAAA,gBAAA,eAAA,SAAkB,MAAA,kBAAA,CAAkB,GAAA,CAAA,CAAA,GAAA,EAAA"}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
}
|
|
91
91
|
.u-expression-editor__chip:hover {
|
|
92
92
|
color: var(--u-expression-editor-chip-color, var(--u-color-primary));
|
|
93
|
-
background-color: var(--u-expression-editor-chip-bg, var(--u-color-primary-light-
|
|
93
|
+
background-color: var(--u-expression-editor-chip-bg, var(--u-color-primary-light-7));
|
|
94
94
|
box-shadow: 0 1px 4px var(--u-shadow-color);
|
|
95
95
|
}
|
|
96
96
|
.u-expression-editor__chip:hover .u-expression-editor__chip-close {
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
color: inherit;
|
|
43
43
|
flex: 0 0 auto;
|
|
44
44
|
transition: background-color 0.2s, color 0.2s;
|
|
45
|
-
border-radius: var(--u-radius-
|
|
45
|
+
border-radius: var(--u-radius-default);
|
|
46
46
|
}
|
|
47
47
|
.u-progress-nodes__item:hover .u-progress-nodes__dot {
|
|
48
48
|
border-color: var(--u-text-color-second);
|
|
49
49
|
}
|
|
50
50
|
.u-progress-nodes__item:hover .u-progress-nodes__label {
|
|
51
|
-
color: var(--u-
|
|
51
|
+
color: var(--u-color-primary);
|
|
52
52
|
}
|
|
53
53
|
.u-progress-nodes__node {
|
|
54
54
|
position: relative;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
width: 100%;
|
|
20
20
|
border: 1px solid var(--u-border-muted-color);
|
|
21
21
|
border-radius: var(--u-radius-default);
|
|
22
|
-
background-color: var(--u-color-
|
|
22
|
+
background-color: var(--u-bg-color-top);
|
|
23
23
|
transition: border-color 0.25s ease;
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-direction: column;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
gap: 2px;
|
|
49
49
|
padding: 6px 8px;
|
|
50
50
|
border-bottom: 1px solid var(--u-border-color);
|
|
51
|
-
background-color: var(--u-color-
|
|
51
|
+
background-color: var(--u-bg-color-middle);
|
|
52
52
|
}
|
|
53
53
|
.u-rich-text-editor__toolbar-btn {
|
|
54
54
|
display: inline-flex;
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
border: none;
|
|
60
60
|
border-radius: 4px;
|
|
61
61
|
background: transparent;
|
|
62
|
-
color: var(--u-text-color);
|
|
62
|
+
color: var(--u-text-color-main);
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
transition: all 0.15s ease;
|
|
65
65
|
padding: 0;
|
|
66
66
|
}
|
|
67
67
|
.u-rich-text-editor__toolbar-btn:not(.is-disabled):hover {
|
|
68
|
-
background-color: var(--u-color-hover);
|
|
68
|
+
background-color: var(--u-bg-color-hover);
|
|
69
69
|
}
|
|
70
70
|
.u-rich-text-editor__toolbar-btn.is-active {
|
|
71
|
-
background-color: var(--u-color-primary-light);
|
|
71
|
+
background-color: var(--u-color-primary-light-9);
|
|
72
72
|
color: var(--u-color-primary);
|
|
73
73
|
}
|
|
74
74
|
.u-rich-text-editor__toolbar-btn.is-disabled {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
border: 1px solid var(--u-border-muted-color);
|
|
104
104
|
border-radius: 4px;
|
|
105
105
|
background-color: transparent;
|
|
106
|
-
color: var(--u-text-color);
|
|
106
|
+
color: var(--u-text-color-main);
|
|
107
107
|
font-size: 13px;
|
|
108
108
|
cursor: pointer;
|
|
109
109
|
outline: none;
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
outline: none;
|
|
134
134
|
font-size: 14px;
|
|
135
135
|
line-height: 1.6;
|
|
136
|
-
color: var(--u-text-color);
|
|
136
|
+
color: var(--u-text-color-main);
|
|
137
137
|
word-break: break-word;
|
|
138
138
|
}
|
|
139
139
|
.u-rich-text-editor__editable:focus {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
font-weight: 600;
|
|
224
224
|
line-height: 1.4;
|
|
225
225
|
margin: 10px 0 4px 0;
|
|
226
|
-
color: var(--u-text-color-
|
|
226
|
+
color: var(--u-text-color-second);
|
|
227
227
|
}
|
|
228
228
|
.u-rte-h6:first-child {
|
|
229
229
|
margin-top: 0;
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
.u-rte-code {
|
|
249
249
|
font-family: "Menlo", "Consolas", "Monaco", monospace;
|
|
250
250
|
font-size: 0.9em;
|
|
251
|
-
background-color: var(--u-color-
|
|
251
|
+
background-color: var(--u-bg-color-middle);
|
|
252
252
|
padding: 2px 6px;
|
|
253
253
|
border-radius: 3px;
|
|
254
254
|
border: 1px solid var(--u-border-color);
|
|
@@ -277,8 +277,8 @@
|
|
|
277
277
|
margin: 8px 0;
|
|
278
278
|
padding: 8px 16px;
|
|
279
279
|
border-left: 3px solid var(--u-color-primary);
|
|
280
|
-
background-color: var(--u-color-
|
|
281
|
-
color: var(--u-text-color-
|
|
280
|
+
background-color: var(--u-bg-color-middle);
|
|
281
|
+
color: var(--u-text-color-second);
|
|
282
282
|
font-style: italic;
|
|
283
283
|
}
|
|
284
284
|
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
font-family: "Menlo", "Consolas", "Monaco", monospace;
|
|
287
287
|
font-size: 13px;
|
|
288
288
|
line-height: 1.6;
|
|
289
|
-
background-color: var(--u-color-
|
|
289
|
+
background-color: var(--u-bg-color-middle);
|
|
290
290
|
border: 1px solid var(--u-border-color);
|
|
291
291
|
border-radius: 6px;
|
|
292
292
|
padding: 12px 16px;
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
white-space: nowrap;
|
|
64
64
|
}
|
|
65
65
|
.u-select__option:hover {
|
|
66
|
-
background-color: var(--u-
|
|
67
|
-
color: var(--u-
|
|
66
|
+
background-color: var(--u-select-option-hover-bg, var(--u-bg-color-hover));
|
|
67
|
+
color: var(--u-select-option-hover-color, var(--u-text-color-title));
|
|
68
68
|
}
|
|
69
69
|
.u-select__option.is-selected {
|
|
70
70
|
position: relative;
|
|
71
|
-
background-color: var(--u-
|
|
72
|
-
color: var(--u-
|
|
71
|
+
background-color: var(--u-select-option-selected-bg, var(--u-color-primary-light-9));
|
|
72
|
+
color: var(--u-select-option-selected-color, var(--u-color-primary));
|
|
73
73
|
font-weight: 600;
|
|
74
74
|
}
|
|
75
75
|
.u-select__option.is-selected::before {
|
package/dist/index.d.ts
CHANGED
|
@@ -140,7 +140,7 @@ import { NavEmits, NavExposed, NavItem, NavProps, _NavExposed } from "./types/na
|
|
|
140
140
|
import { DualNavEmits, DualNavExposed, DualNavProps, DualNavRailVariant, DualNavRootItem, _DualNavExposed } from "./types/dual-nav.js";
|
|
141
141
|
import { GroupNavEmits, GroupNavGroup, GroupNavProps } from "./types/group-nav.js";
|
|
142
142
|
import { PasswordInputEmits, PasswordInputExposed, PasswordInputProps, _PasswordInputExposed } from "./types/password-input.js";
|
|
143
|
-
import { DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed } from "./types/date-picker.js";
|
|
143
|
+
import { DatePickerDataType, DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed } from "./types/date-picker.js";
|
|
144
144
|
import { DropdownEmits, DropdownExposed, DropdownProps, _DropdownExposed } from "./types/dropdown.js";
|
|
145
145
|
import { ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, _ContextmenuExposed } from "./types/contextmenu.js";
|
|
146
146
|
import { SelectEmits, SelectExposed, SelectProps, _SelectExposed } from "./types/select.js";
|
|
@@ -183,4 +183,4 @@ import { defineBatchEditColumns } from "./components/batch-edit/helper.js";
|
|
|
183
183
|
import { defineTableColumns } from "./components/table/use-columns.js";
|
|
184
184
|
import "./components/index.js";
|
|
185
185
|
export * from "@veltra/utils";
|
|
186
|
-
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditFormStatus, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, input_default as UInput, _sfc_main$42 as UKbd, _sfc_main$43 as ULayout, _sfc_main$44 as UList, _sfc_main$45 as UListItem, _sfc_main$46 as ULoading, _sfc_main$47 as UMessage, _sfc_main$48 as UMessageConfirm, _sfc_main$49 as UMultiSelect, _sfc_main$50 as UMultiTreeSelect, _sfc_main$51 as UNav, _sfc_main$52 as UNavItem, _sfc_main$53 as UNavSub, NodeRender as UNodeRender, _sfc_main$54 as UNotification, _sfc_main$55 as UNumber, _sfc_main$56 as UNumberInput, _sfc_main$57 as UNumberRangeInput, _sfc_main$58 as UPaginator, _sfc_main$59 as UPalette, _sfc_main$60 as UPasswordInput, _sfc_main$61 as UPopConfirm, _sfc_main$62 as UProgress, _sfc_main$63 as UProgressNodes, _sfc_main$64 as URadio, _sfc_main$65 as URadioGroup, _sfc_main$66 as URichTextEditor, _sfc_main$67 as UScroll, _sfc_main$68 as USegment, _sfc_main$69 as USelect, _sfc_main$70 as USlider, _sfc_main$71 as USteps, _sfc_main$72 as USwitch, _sfc_main$73 as UTable, _sfc_main$74 as UTableEditor, _sfc_main$75 as UTabs, _sfc_main$76 as UTabsHorizontal, _sfc_main$77 as UTabsVertical, _sfc_main$78 as UTag, _sfc_main$79 as UText, _sfc_main$80 as UTextarea, _sfc_main$81 as UTheme, _sfc_main$82 as UTip, _sfc_main$83 as UTree, _sfc_main$84 as UTreeSelect, _sfc_main$85 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
|
186
|
+
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditFormStatus, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerDataType, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, input_default as UInput, _sfc_main$42 as UKbd, _sfc_main$43 as ULayout, _sfc_main$44 as UList, _sfc_main$45 as UListItem, _sfc_main$46 as ULoading, _sfc_main$47 as UMessage, _sfc_main$48 as UMessageConfirm, _sfc_main$49 as UMultiSelect, _sfc_main$50 as UMultiTreeSelect, _sfc_main$51 as UNav, _sfc_main$52 as UNavItem, _sfc_main$53 as UNavSub, NodeRender as UNodeRender, _sfc_main$54 as UNotification, _sfc_main$55 as UNumber, _sfc_main$56 as UNumberInput, _sfc_main$57 as UNumberRangeInput, _sfc_main$58 as UPaginator, _sfc_main$59 as UPalette, _sfc_main$60 as UPasswordInput, _sfc_main$61 as UPopConfirm, _sfc_main$62 as UProgress, _sfc_main$63 as UProgressNodes, _sfc_main$64 as URadio, _sfc_main$65 as URadioGroup, _sfc_main$66 as URichTextEditor, _sfc_main$67 as UScroll, _sfc_main$68 as USegment, _sfc_main$69 as USelect, _sfc_main$70 as USlider, _sfc_main$71 as USteps, _sfc_main$72 as USwitch, _sfc_main$73 as UTable, _sfc_main$74 as UTableEditor, _sfc_main$75 as UTabs, _sfc_main$76 as UTabsHorizontal, _sfc_main$77 as UTabsVertical, _sfc_main$78 as UTag, _sfc_main$79 as UText, _sfc_main$80 as UTextarea, _sfc_main$81 as UTheme, _sfc_main$82 as UTip, _sfc_main$83 as UTree, _sfc_main$84 as UTreeSelect, _sfc_main$85 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
|
@@ -6,7 +6,7 @@ interface DatePanelProps {
|
|
|
6
6
|
date?: Dater;
|
|
7
7
|
rangeDate?: [Dater, Dater];
|
|
8
8
|
range?: boolean;
|
|
9
|
-
disabledDate?: (date: Dater) => boolean;
|
|
9
|
+
disabledDate?: (date: Dater, raw: Date) => boolean;
|
|
10
10
|
type?: 'date' | 'month' | 'year';
|
|
11
11
|
size?: FormComponentProps['size'];
|
|
12
12
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DeconstructValue, FormComponentProps } from "@veltra/utils";
|
|
2
2
|
import { Dater } from "@cat-kit/core";
|
|
3
3
|
//#region src/types/date-picker.d.ts
|
|
4
|
+
/** 绑定值类型 */
|
|
5
|
+
type DatePickerDataType = 'date' | 'timestamp' | 'string';
|
|
4
6
|
/** date-picker组件属性 */
|
|
5
7
|
interface DatePickerProps extends FormComponentProps {
|
|
6
8
|
modelValue?: string | number | Date;
|
|
@@ -12,19 +14,25 @@ interface DatePickerProps extends FormComponentProps {
|
|
|
12
14
|
format?: string;
|
|
13
15
|
/** 日期值格式化, 当没有指定时默认使用format属性,仅当值和显示的内容不一致时才需要使用到该属性 */
|
|
14
16
|
valueFormat?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 绑定值的类型,默认为字符串。
|
|
19
|
+
* 当 dataType 没有指定为字符串时,valueFormat 属性不生效
|
|
20
|
+
*/
|
|
21
|
+
dataType?: DatePickerDataType;
|
|
15
22
|
/** 最小可选日期 */
|
|
16
|
-
disabledDate?: (date: Dater) => boolean;
|
|
23
|
+
disabledDate?: (date: Dater, raw: Date) => boolean;
|
|
17
24
|
/** 是否显示清除按钮 */
|
|
18
25
|
clearable?: boolean;
|
|
19
26
|
}
|
|
20
27
|
/** date-picker组件定义的事件 */
|
|
21
28
|
interface DatePickerEmits {
|
|
22
29
|
(e: 'update:modelValue', value?: string | number | Date): void;
|
|
30
|
+
(e: 'change', date?: Date): void;
|
|
23
31
|
}
|
|
24
32
|
/** date-picker组件暴露的属性和方法(组件内部使用) */
|
|
25
33
|
interface _DatePickerExposed {}
|
|
26
34
|
/** date-picker组件暴露的属性和方法(组件外部使用, 引用的值会被自动解构) */
|
|
27
35
|
type DatePickerExposed = DeconstructValue<_DatePickerExposed>;
|
|
28
36
|
//#endregion
|
|
29
|
-
export { DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed };
|
|
37
|
+
export { DatePickerDataType, DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed };
|
|
30
38
|
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -13,7 +13,7 @@ interface DateRangePickerProps extends FormComponentProps {
|
|
|
13
13
|
/** 日期值格式化, 当没有指定时默认使用format属性,仅当值和显示的内容不一致时才需要使用到该属性 */
|
|
14
14
|
valueFormat?: string;
|
|
15
15
|
/** 最小可选日期 */
|
|
16
|
-
disabledDate?: (date: Dater) => boolean;
|
|
16
|
+
disabledDate?: (date: Dater, raw: Date) => boolean;
|
|
17
17
|
/** 是否显示清除按钮 */
|
|
18
18
|
clearable?: boolean;
|
|
19
19
|
}
|