zartui 3.0.7 → 3.0.9
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/es/calendar/Calendar.d.ts +23 -33
- package/es/calendar/Calendar.mjs +124 -31
- package/es/calendar/CalendarDay.mjs +1 -1
- package/es/calendar/CalendarHeader.d.ts +15 -1
- package/es/calendar/CalendarHeader.mjs +106 -4
- package/es/calendar/CalendarMonth.d.ts +23 -24
- package/es/calendar/CalendarMonth.mjs +49 -8
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +15 -22
- package/es/calendar/types.d.ts +3 -1
- package/es/calendar/utils.d.ts +4 -1
- package/es/calendar/utils.mjs +23 -3
- package/es/cascader/Cascader.mjs +1 -1
- package/es/dialog/Dialog.d.ts +4 -0
- package/es/dialog/Dialog.mjs +24 -9
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +3 -0
- package/es/dialog/types.d.ts +1 -0
- package/es/field/Field.d.ts +3 -0
- package/es/field/Field.mjs +2 -1
- package/es/field/index.d.ts +2 -0
- package/es/icon/config.mjs +2 -1
- package/es/icon/index.css +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/overlay/index.d.ts +1 -1
- package/es/popover/Popover.mjs +14 -6
- package/es/swipe-cell/index.d.ts +1 -1
- package/es/table/Table.d.ts +8 -3
- package/es/table/Table.mjs +122 -31
- package/es/table/index.css +1 -1
- package/es/table/index.d.ts +5 -3
- package/es/table/style/index.mjs +2 -0
- package/es/table/types.d.ts +5 -0
- package/es/table/types.mjs +8 -0
- package/es/tag/Tag.d.ts +3 -0
- package/es/tag/Tag.mjs +24 -16
- package/es/tag/index.css +1 -1
- package/es/tag/index.d.ts +2 -0
- package/es/tag/style/index.mjs +1 -0
- package/es/uploader/UploaderPreviewItem.d.ts +1 -1
- package/lib/calendar/Calendar.d.ts +23 -33
- package/lib/calendar/Calendar.js +123 -30
- package/lib/calendar/CalendarDay.js +1 -1
- package/lib/calendar/CalendarHeader.d.ts +15 -1
- package/lib/calendar/CalendarHeader.js +106 -4
- package/lib/calendar/CalendarMonth.d.ts +23 -24
- package/lib/calendar/CalendarMonth.js +48 -7
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +15 -22
- package/lib/calendar/types.d.ts +3 -1
- package/lib/calendar/utils.d.ts +4 -1
- package/lib/calendar/utils.js +23 -3
- package/lib/cascader/Cascader.js +1 -1
- package/lib/dialog/Dialog.d.ts +4 -0
- package/lib/dialog/Dialog.js +24 -9
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +3 -0
- package/lib/dialog/types.d.ts +1 -0
- package/lib/field/Field.d.ts +3 -0
- package/lib/field/Field.js +2 -1
- package/lib/field/index.d.ts +2 -0
- package/lib/icon/config.js +2 -1
- package/lib/icon/index.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/overlay/index.d.ts +1 -1
- package/lib/popover/Popover.js +14 -6
- package/lib/swipe-cell/index.d.ts +1 -1
- package/lib/table/Table.d.ts +8 -3
- package/lib/table/Table.js +122 -31
- package/lib/table/index.css +1 -1
- package/lib/table/index.d.ts +5 -3
- package/lib/table/style/index.js +2 -0
- package/lib/table/types.d.ts +5 -0
- package/lib/table/types.js +27 -0
- package/lib/tag/Tag.d.ts +3 -0
- package/lib/tag/Tag.js +34 -16
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.d.ts +2 -0
- package/lib/tag/style/index.js +1 -0
- package/lib/uploader/UploaderPreviewItem.d.ts +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +488 -110
- package/lib/zartui.es.js +488 -110
- package/lib/zartui.js +488 -110
- package/lib/zartui.min.js +1 -1
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, computed, defineComponent } from "vue";
|
|
3
|
-
import { pick, addUnit, numericProp, setScrollTop, createNamespace, makeRequiredProp } from "../utils/index.mjs";
|
|
3
|
+
import { pick, addUnit, numericProp, setScrollTop, createNamespace, makeRequiredProp, makeStringProp } from "../utils/index.mjs";
|
|
4
4
|
import { t, bem, compareDay, getPrevDay, getNextDay, formatMonthTitle } from "./utils.mjs";
|
|
5
5
|
import { useRect, useToggle } from "@zartui/use";
|
|
6
6
|
import { useExpose } from "../composables/use-expose.mjs";
|
|
@@ -9,10 +9,11 @@ import CalendarDay from "./CalendarDay.mjs";
|
|
|
9
9
|
const [name] = createNamespace("calendar-month");
|
|
10
10
|
const calendarMonthProps = {
|
|
11
11
|
date: makeRequiredProp(Date),
|
|
12
|
+
showType: makeStringProp("inline"),
|
|
12
13
|
type: String,
|
|
13
14
|
color: String,
|
|
14
|
-
minDate:
|
|
15
|
-
maxDate:
|
|
15
|
+
minDate: Date,
|
|
16
|
+
maxDate: Date,
|
|
16
17
|
showMark: Boolean,
|
|
17
18
|
rowHeight: numericProp,
|
|
18
19
|
formatter: Function,
|
|
@@ -21,7 +22,8 @@ const calendarMonthProps = {
|
|
|
21
22
|
allowSameDay: Boolean,
|
|
22
23
|
showSubtitle: Boolean,
|
|
23
24
|
showMonthTitle: Boolean,
|
|
24
|
-
firstDayOfWeek: Number
|
|
25
|
+
firstDayOfWeek: Number,
|
|
26
|
+
disabledDate: Function
|
|
25
27
|
};
|
|
26
28
|
var stdin_default = defineComponent({
|
|
27
29
|
name,
|
|
@@ -48,6 +50,7 @@ var stdin_default = defineComponent({
|
|
|
48
50
|
const totalDay = computed(() => getMonthEndDay(props.date.getFullYear(), props.date.getMonth() + 1));
|
|
49
51
|
const shouldRender = computed(() => visible.value || !props.lazyRender);
|
|
50
52
|
const getTitle = () => title.value;
|
|
53
|
+
const getDate = () => props.date;
|
|
51
54
|
const getMultipleDayType = (day) => {
|
|
52
55
|
const isSelected = (date) => props.currentDate.some((item) => compareDay(item, date) === 0);
|
|
53
56
|
if (isSelected(day)) {
|
|
@@ -92,18 +95,22 @@ var stdin_default = defineComponent({
|
|
|
92
95
|
}
|
|
93
96
|
return "";
|
|
94
97
|
};
|
|
95
|
-
const getDayType = (day) => {
|
|
98
|
+
const getDayType = (day, defaultType) => {
|
|
96
99
|
const {
|
|
97
100
|
type,
|
|
98
101
|
minDate,
|
|
99
102
|
maxDate,
|
|
100
|
-
currentDate
|
|
103
|
+
currentDate,
|
|
104
|
+
disabledDate
|
|
101
105
|
} = props;
|
|
102
|
-
if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) {
|
|
106
|
+
if (minDate && compareDay(day, minDate) < 0 || maxDate && compareDay(day, maxDate) > 0 || disabledDate && disabledDate(day)) {
|
|
103
107
|
return "disabled";
|
|
104
108
|
}
|
|
105
109
|
if (currentDate === null) {
|
|
106
|
-
return "";
|
|
110
|
+
return defaultType || "";
|
|
111
|
+
}
|
|
112
|
+
if (defaultType) {
|
|
113
|
+
return defaultType;
|
|
107
114
|
}
|
|
108
115
|
if (Array.isArray(currentDate)) {
|
|
109
116
|
if (type === "multiple") {
|
|
@@ -144,6 +151,22 @@ var stdin_default = defineComponent({
|
|
|
144
151
|
const days2 = [];
|
|
145
152
|
const year = props.date.getFullYear();
|
|
146
153
|
const month = props.date.getMonth();
|
|
154
|
+
if (props.showType && props.showType === "inline") {
|
|
155
|
+
for (let day = offset.value - 1; day >= 0; day--) {
|
|
156
|
+
const date = new Date(year, month, -day);
|
|
157
|
+
const type = getDayType(date, "preview");
|
|
158
|
+
let config = {
|
|
159
|
+
date,
|
|
160
|
+
type,
|
|
161
|
+
text: date.getDate(),
|
|
162
|
+
bottomInfo: getBottomInfo(type)
|
|
163
|
+
};
|
|
164
|
+
if (props.formatter) {
|
|
165
|
+
config = props.formatter(config);
|
|
166
|
+
}
|
|
167
|
+
days2.push(config);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
147
170
|
for (let day = 1; day <= totalDay.value; day++) {
|
|
148
171
|
const date = new Date(year, month, day);
|
|
149
172
|
const type = getDayType(date);
|
|
@@ -158,6 +181,23 @@ var stdin_default = defineComponent({
|
|
|
158
181
|
}
|
|
159
182
|
days2.push(config);
|
|
160
183
|
}
|
|
184
|
+
if (props.showType && props.showType === "inline" && days2 && days2.length < 42) {
|
|
185
|
+
const nextMonthsLength = days2.length;
|
|
186
|
+
for (let day = 1; day <= 42 - nextMonthsLength; day++) {
|
|
187
|
+
const date = new Date(year, month + 1, day);
|
|
188
|
+
const type = getDayType(date, "preview");
|
|
189
|
+
let config = {
|
|
190
|
+
date,
|
|
191
|
+
type,
|
|
192
|
+
text: date.getDate(),
|
|
193
|
+
bottomInfo: getBottomInfo(type)
|
|
194
|
+
};
|
|
195
|
+
if (props.formatter) {
|
|
196
|
+
config = props.formatter(config);
|
|
197
|
+
}
|
|
198
|
+
days2.push(config);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
161
201
|
return days2;
|
|
162
202
|
});
|
|
163
203
|
const disabledDays = computed(() => days.value.filter((day) => day.type === "disabled"));
|
|
@@ -185,6 +225,7 @@ var stdin_default = defineComponent({
|
|
|
185
225
|
}, [(shouldRender.value ? days : placeholders).value.map(renderDay)]);
|
|
186
226
|
useExpose({
|
|
187
227
|
getTitle,
|
|
228
|
+
getDate,
|
|
188
229
|
getHeight: () => height.value,
|
|
189
230
|
setVisible,
|
|
190
231
|
scrollToDate,
|
package/es/calendar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-calendar-background: var(--zt-background-2);--zt-calendar-popup-height: 80%;--zt-calendar-body-box-shadow: inset 0 4px 8px 0 var(--zt-gray-a1);--zt-calendar-header-title-height: 44px;--zt-calendar-header-title-font-size: var(--zt-font-size-md);--zt-calendar-header-subtitle-font-size: var(--zt-font-size-md);--zt-calendar-weekdays-height: 30px;--zt-calendar-weekdays-font-size: var(--zt-font-size-sm);--zt-calendar-weekdays-font-color: var(----zt-gray-default);--zt-calendar-weekdays-background: var(--zt-calendar-background);--zt-calendar-month-title-font-size: var(--zt-font-size-md);--zt-calendar-month-mark-color: rgba(242, 243, 245, .8);--zt-calendar-month-mark-font-size: 160px;--zt-calendar-day-height: 14.285vw;--zt-calendar-day-height-half: 7.143vw;--zt-calendar-day-font-size: var(--zt-font-size-lg);--zt-calendar-day-margin-bottom: 4px;--zt-calendar-range-edge-color: var(--zt-white);--zt-calendar-range-edge-background: var(--zt-primary-color);--zt-calendar-range-middle-color: var(--zt-primary-color);--zt-calendar-range-middle-background-opacity: .1;--zt-calendar-selected-day-size: var(--zt-calendar-day-height);--zt-calendar-selected-day-color: var(--zt-white);--zt-calendar-info-font-size: var(--zt-font-size-xs);--zt-calendar-info-line-height: var(--zt-line-height-xs);--zt-calendar-selected-day-background: var(--zt-primary-color);--zt-calendar-day-disabled-color: var(--zt-
|
|
1
|
+
:root{--zt-calendar-background: var(--zt-background-2);--zt-calendar-popup-height: 80%;--zt-calendar-body-box-shadow: inset 0 4px 8px 0 var(--zt-gray-a1);--zt-calendar-header-title-height: 44px;--zt-calendar-header-title-font-size: var(--zt-font-size-md);--zt-calendar-header-subtitle-font-size: var(--zt-font-size-md);--zt-calendar-weekdays-height: 30px;--zt-calendar-weekdays-font-size: var(--zt-font-size-sm);--zt-calendar-weekdays-font-color: var(----zt-gray-default);--zt-calendar-weekdays-background: var(--zt-calendar-background);--zt-calendar-month-title-font-size: var(--zt-font-size-md);--zt-calendar-month-mark-color: rgba(242, 243, 245, .8);--zt-calendar-month-mark-font-size: 160px;--zt-calendar-day-height: 14.285vw;--zt-calendar-day-height-half: 7.143vw;--zt-calendar-day-font-size: var(--zt-font-size-lg);--zt-calendar-day-margin-bottom: 4px;--zt-calendar-range-edge-color: var(--zt-white);--zt-calendar-range-edge-background: var(--zt-primary-color);--zt-calendar-range-middle-color: var(--zt-primary-color);--zt-calendar-range-middle-background-opacity: .1;--zt-calendar-selected-day-size: var(--zt-calendar-day-height);--zt-calendar-selected-day-color: var(--zt-white);--zt-calendar-info-font-size: var(--zt-font-size-xs);--zt-calendar-info-line-height: var(--zt-line-height-xs);--zt-calendar-selected-day-background: var(--zt-primary-color);--zt-calendar-day-disabled-color: var(--zt-gray-a2);--zt-calendar-confirm-button-height: 36px;--zt-calendar-confirm-button-margin: 7px 0;--zt-calendar-header-title-color: var(--zt-gray-a4)}.zt-calendar{display:flex;flex-direction:column;height:100%;background:var(--zt-calendar-background);color:var(--zt-text-color)}.zt-calendar__popup.zt-popup--top,.zt-calendar__popup.zt-popup--bottom{height:var(--zt-calendar-popup-height)}.zt-calendar__popup.zt-popup--left,.zt-calendar__popup.zt-popup--right{height:100%}.zt-calendar__header{flex-shrink:0}.zt-calendar__month-title,.zt-calendar__header-title,.zt-calendar__header-subtitle{display:flex;padding:0 16px;color:var(--zt-text-color);height:var(--zt-calendar-header-title-height);line-height:var(--zt-calendar-header-title-height);text-align:center;align-items:center;justify-content:center}.zt-calendar__month-title--opt,.zt-calendar__header-title--opt,.zt-calendar__header-subtitle--opt{width:32px;height:32px;line-height:32px;border-radius:50%;padding:0;margin:0 8px}.zt-calendar__month-title--right,.zt-calendar__header-title--right,.zt-calendar__header-subtitle--right{transform:rotate(180deg)}.zt-calendar__month-title--unenable,.zt-calendar__header-title--unenable,.zt-calendar__header-subtitle--unenable{opacity:.2}.zt-calendar__month-title--enable,.zt-calendar__header-title--enable,.zt-calendar__header-subtitle--enable{opacity:1}.zt-calendar__month-title--enable:active,.zt-calendar__header-title--enable:active,.zt-calendar__header-subtitle--enable:active{border-radius:50%;background-color:var(--zt-gray-a1);opacity:.6}.zt-calendar__month-title-text,.zt-calendar__header-title-text,.zt-calendar__header-subtitle-text{flex-grow:1}.zt-calendar__header-title{font-size:var(--zt-calendar-header-title-font-size);color:var(--zt-calendar-header-title-color);position:relative;display:flex;justify-content:center;align-items:center}.zt-calendar__header-title:after{top:var(--zt-calendar-header-title-height);content:"";position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-calendar__header-subtitle{font-size:var(--zt-calendar-header-subtitle-font-size)}.zt-calendar__month-title{font-size:var(--zt-calendar-month-title-font-size)}.zt-calendar__weekdays{display:flex;background-color:rgba(0,0,0,.02)}.zt-calendar__weekday{flex:1;font-size:var(--zt-calendar-weekdays-font-size);line-height:var(--zt-calendar-weekdays-height);font-weight:var(--zt-font-bold);text-align:center;background:var(--zt-calendar-weekdays-background);color:var(--zt-calendar-weekdays-font-color)}.zt-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;background-color:var(--zt-calendar-background);box-shadow:var(--zt-calendar-body-box-shadow)}.zt-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.zt-calendar__day,.zt-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.zt-calendar__day{position:relative;width:14.285%;height:var(--zt-calendar-day-height);margin-bottom:var(--zt-calendar-day-margin-bottom);font-size:var(--zt-calendar-day-font-size);cursor:pointer;outline:none}.zt-calendar__day--end,.zt-calendar__day--start,.zt-calendar__day--start-end,.zt-calendar__day--multiple-middle,.zt-calendar__day--multiple-selected{color:var(--zt-calendar-range-edge-color);background:var(--zt-calendar-range-edge-background);box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__day--start{border-radius:var(--zt-calendar-day-height-half) 0 0 var(--zt-calendar-day-height-half);border-right:none}.zt-calendar__day--end{border-radius:0 var(--zt-calendar-day-height-half) var(--zt-calendar-day-height-half) 0;border-left:none}.zt-calendar__day--start-end,.zt-calendar__day--multiple-selected{border-radius:var(--zt-calendar-day-height-half)}.zt-calendar__day--middle{color:var(--zt-calendar-range-middle-color)}.zt-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--zt-calendar-range-middle-background-opacity);content:""}.zt-calendar__day--disabled,.zt-calendar__day--preview{color:var(--zt-calendar-day-disabled-color);cursor:default}.zt-calendar__selected-day{font-weight:var(--zt-font-bold);width:var(--zt-calendar-selected-day-size);height:var(--zt-calendar-selected-day-size);color:var(--zt-calendar-selected-day-color);background:var(--zt-calendar-selected-day-background);border-radius:calc(var(--zt-calendar-selected-day-size) / 2);box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__footer{flex-shrink:0;display:flex;padding:8px 16px;border-top:1px solid rgba(45,75,115,.1)}.zt-calendar__footer--unfit{padding-bottom:0}.zt-theme-dark{--zt-calendar-header-title-color: var(--zt-gray-a6);--zt-calendar-range-middle-color: none;--zt-calendar-weekdays-font-color: rgba(255, 255, 255, .8);--zt-calendar-weekdays-background: rgba(255, 255, 255, .04);--zt-calendar-month-mark-color: rgba(100, 101, 102, .2);--zt-calendar-day-disabled-color: rgba(255, 255, 255, .3)}
|
package/es/calendar/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const Calendar: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
2
|
show: BooleanConstructor;
|
|
3
|
+
showType: {
|
|
4
|
+
type: import("vue").PropType<import("./types").CalendarShowType>;
|
|
5
|
+
default: import("./types").CalendarShowType;
|
|
6
|
+
};
|
|
3
7
|
type: {
|
|
4
8
|
type: import("vue").PropType<import("./types").CalendarType>;
|
|
5
9
|
default: import("./types").CalendarType;
|
|
@@ -71,23 +75,20 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
71
75
|
type: BooleanConstructor;
|
|
72
76
|
default: true;
|
|
73
77
|
};
|
|
74
|
-
minDate:
|
|
75
|
-
|
|
76
|
-
validator: (val: unknown) => val is Date;
|
|
77
|
-
default: () => Date;
|
|
78
|
-
};
|
|
79
|
-
maxDate: {
|
|
80
|
-
type: DateConstructor;
|
|
81
|
-
validator: (val: unknown) => val is Date;
|
|
82
|
-
default: () => Date;
|
|
83
|
-
};
|
|
78
|
+
minDate: DateConstructor;
|
|
79
|
+
maxDate: DateConstructor;
|
|
84
80
|
firstDayOfWeek: {
|
|
85
81
|
type: (NumberConstructor | StringConstructor)[];
|
|
86
82
|
default: number;
|
|
87
83
|
validator: (val: number) => boolean;
|
|
88
84
|
};
|
|
85
|
+
disabledDate: import("vue").PropType<(date: Date) => boolean>;
|
|
89
86
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show" | "cancel" | "clickSubtitle" | "confirm" | "unselect" | "monthShow" | "overRange")[], "select" | "update:show" | "cancel" | "clickSubtitle" | "confirm" | "unselect" | "monthShow" | "overRange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
90
87
|
show: BooleanConstructor;
|
|
88
|
+
showType: {
|
|
89
|
+
type: import("vue").PropType<import("./types").CalendarShowType>;
|
|
90
|
+
default: import("./types").CalendarShowType;
|
|
91
|
+
};
|
|
91
92
|
type: {
|
|
92
93
|
type: import("vue").PropType<import("./types").CalendarType>;
|
|
93
94
|
default: import("./types").CalendarType;
|
|
@@ -159,21 +160,14 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
159
160
|
type: BooleanConstructor;
|
|
160
161
|
default: true;
|
|
161
162
|
};
|
|
162
|
-
minDate:
|
|
163
|
-
|
|
164
|
-
validator: (val: unknown) => val is Date;
|
|
165
|
-
default: () => Date;
|
|
166
|
-
};
|
|
167
|
-
maxDate: {
|
|
168
|
-
type: DateConstructor;
|
|
169
|
-
validator: (val: unknown) => val is Date;
|
|
170
|
-
default: () => Date;
|
|
171
|
-
};
|
|
163
|
+
minDate: DateConstructor;
|
|
164
|
+
maxDate: DateConstructor;
|
|
172
165
|
firstDayOfWeek: {
|
|
173
166
|
type: (NumberConstructor | StringConstructor)[];
|
|
174
167
|
default: number;
|
|
175
168
|
validator: (val: number) => boolean;
|
|
176
169
|
};
|
|
170
|
+
disabledDate: import("vue").PropType<(date: Date) => boolean>;
|
|
177
171
|
}>> & {
|
|
178
172
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
179
173
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
@@ -195,6 +189,7 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
195
189
|
safeAreaInsetTop: boolean;
|
|
196
190
|
safeAreaInsetBottom: boolean;
|
|
197
191
|
popup: boolean;
|
|
192
|
+
showType: import("./types").CalendarShowType;
|
|
198
193
|
maxRange: string | number;
|
|
199
194
|
showMark: boolean;
|
|
200
195
|
showTitle: boolean;
|
|
@@ -202,8 +197,6 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
|
|
|
202
197
|
allowSameDay: boolean;
|
|
203
198
|
showSubtitle: boolean;
|
|
204
199
|
showRangePrompt: boolean;
|
|
205
|
-
minDate: Date;
|
|
206
|
-
maxDate: Date;
|
|
207
200
|
firstDayOfWeek: string | number;
|
|
208
201
|
}>>;
|
|
209
202
|
export default Calendar;
|
package/es/calendar/types.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import type { ComponentPublicInstance, ComputedRef, Ref } from 'vue';
|
|
|
2
2
|
import type { Numeric } from '../utils';
|
|
3
3
|
import type { CalendarProps } from './Calendar';
|
|
4
4
|
import type { CalendarMonthProps } from './CalendarMonth';
|
|
5
|
+
export declare type CalendarShowType = 'inline' | 'scroll';
|
|
5
6
|
export declare type CalendarType = 'single' | 'range' | 'multiple';
|
|
6
|
-
export declare type CalendarDayType = '' | 'start' | 'start-end' | 'middle' | 'end' | 'selected' | 'multiple-middle' | 'multiple-selected' | 'disabled' | 'placeholder';
|
|
7
|
+
export declare type CalendarDayType = '' | 'start' | 'start-end' | 'middle' | 'end' | 'selected' | 'multiple-middle' | 'multiple-selected' | 'disabled' | 'placeholder' | 'preview';
|
|
7
8
|
export declare type CalendarDayItem = {
|
|
8
9
|
date?: Date;
|
|
9
10
|
text?: Numeric;
|
|
@@ -21,6 +22,7 @@ export declare type CalendarInstance = ComponentPublicInstance<CalendarProps, Ca
|
|
|
21
22
|
export declare type CalendarMonthInstance = ComponentPublicInstance<CalendarMonthProps, {
|
|
22
23
|
showed?: boolean;
|
|
23
24
|
getTitle: () => string;
|
|
25
|
+
getDate: () => Date;
|
|
24
26
|
getHeight: () => number;
|
|
25
27
|
setVisible: (value?: boolean | undefined) => void;
|
|
26
28
|
scrollToDate: (body: Element, targetDate: Date) => void;
|
package/es/calendar/utils.d.ts
CHANGED
|
@@ -5,8 +5,11 @@ export declare function compareMonth(date1: Date, date2: Date): 0 | 1 | -1;
|
|
|
5
5
|
export declare function compareDay(day1: Date, day2: Date): 0 | 1 | -1;
|
|
6
6
|
export declare const cloneDate: (date: Date) => Date;
|
|
7
7
|
export declare const cloneDates: (dates: Date | Date[]) => Date | Date[];
|
|
8
|
-
export declare function getDayByOffset(date: Date, offset: number): Date;
|
|
8
|
+
export declare function getDayByOffset(date: Date, offset: number, isMonth?: boolean, isYear?: boolean): Date;
|
|
9
9
|
export declare const getPrevDay: (date: Date) => Date;
|
|
10
10
|
export declare const getNextDay: (date: Date) => Date;
|
|
11
11
|
export declare const getToday: () => Date;
|
|
12
|
+
export declare const getPrevDate: (date: Date, isMonth: boolean, isYear: boolean) => Date;
|
|
13
|
+
export declare const getNextDate: (date: Date, isMonth: boolean, isYear: boolean) => Date;
|
|
12
14
|
export declare function calcDateNum(date: [Date, Date]): number;
|
|
15
|
+
export declare function getFirstDate(date: Date): Date;
|
package/es/calendar/utils.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createNamespace } from "../utils/index.mjs";
|
|
2
|
+
const monthsOfYear = 12;
|
|
2
3
|
const [name, bem, t] = createNamespace("calendar");
|
|
3
|
-
const formatMonthTitle = (date) => t("
|
|
4
|
+
const formatMonthTitle = (date) => t("ztCalendar.monthTitle", date.getFullYear(), date.getMonth() + 1);
|
|
4
5
|
function compareMonth(date1, date2) {
|
|
5
6
|
const year1 = date1.getFullYear();
|
|
6
7
|
const year2 = date2.getFullYear();
|
|
@@ -22,9 +23,20 @@ function compareDay(day1, day2) {
|
|
|
22
23
|
}
|
|
23
24
|
const cloneDate = (date) => new Date(date);
|
|
24
25
|
const cloneDates = (dates) => Array.isArray(dates) ? dates.map(cloneDate) : cloneDate(dates);
|
|
25
|
-
function getDayByOffset(date, offset) {
|
|
26
|
+
function getDayByOffset(date, offset, isMonth, isYear) {
|
|
26
27
|
const cloned = cloneDate(date);
|
|
27
|
-
|
|
28
|
+
if (isYear) {
|
|
29
|
+
cloned.setFullYear(cloned.getFullYear() + offset);
|
|
30
|
+
} else if (isMonth) {
|
|
31
|
+
cloned.setMonth(cloned.getMonth() + offset);
|
|
32
|
+
const multiplier = cloned.getFullYear() - date.getFullYear();
|
|
33
|
+
const setLastDate = date.getMonth() + offset !== cloned.getMonth() + multiplier * monthsOfYear;
|
|
34
|
+
if (setLastDate) {
|
|
35
|
+
cloned.setDate(0);
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
cloned.setDate(cloned.getDate() + offset);
|
|
39
|
+
}
|
|
28
40
|
return cloned;
|
|
29
41
|
}
|
|
30
42
|
const getPrevDay = (date) => getDayByOffset(date, -1);
|
|
@@ -34,11 +46,16 @@ const getToday = () => {
|
|
|
34
46
|
today.setHours(0, 0, 0, 0);
|
|
35
47
|
return today;
|
|
36
48
|
};
|
|
49
|
+
const getPrevDate = (date, isMonth, isYear) => getDayByOffset(date, -1, isMonth, isYear);
|
|
50
|
+
const getNextDate = (date, isMonth, isYear) => getDayByOffset(date, 1, isMonth, isYear);
|
|
37
51
|
function calcDateNum(date) {
|
|
38
52
|
const day1 = date[0].getTime();
|
|
39
53
|
const day2 = date[1].getTime();
|
|
40
54
|
return (day2 - day1) / (1e3 * 60 * 60 * 24) + 1;
|
|
41
55
|
}
|
|
56
|
+
function getFirstDate(date) {
|
|
57
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
58
|
+
}
|
|
42
59
|
export {
|
|
43
60
|
bem,
|
|
44
61
|
calcDateNum,
|
|
@@ -48,7 +65,10 @@ export {
|
|
|
48
65
|
compareMonth,
|
|
49
66
|
formatMonthTitle,
|
|
50
67
|
getDayByOffset,
|
|
68
|
+
getFirstDate,
|
|
69
|
+
getNextDate,
|
|
51
70
|
getNextDay,
|
|
71
|
+
getPrevDate,
|
|
52
72
|
getPrevDay,
|
|
53
73
|
getToday,
|
|
54
74
|
name,
|
package/es/cascader/Cascader.mjs
CHANGED
|
@@ -188,7 +188,7 @@ var stdin_default = defineComponent({
|
|
|
188
188
|
options,
|
|
189
189
|
selected
|
|
190
190
|
} = tab;
|
|
191
|
-
const placeholder = props.placeholder || t("
|
|
191
|
+
const placeholder = props.placeholder || t("ztCascader.select");
|
|
192
192
|
const title = selected ? selected[textKey] : placeholder;
|
|
193
193
|
return _createVNode(Tab, {
|
|
194
194
|
"title": title,
|
package/es/dialog/Dialog.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare const dialogProps: {
|
|
|
27
27
|
};
|
|
28
28
|
} & {
|
|
29
29
|
title: StringConstructor;
|
|
30
|
+
primaryHeader: BooleanConstructor;
|
|
30
31
|
theme: PropType<DialogTheme>;
|
|
31
32
|
width: (NumberConstructor | StringConstructor)[];
|
|
32
33
|
message: PropType<DialogMessage>;
|
|
@@ -83,6 +84,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
84
|
};
|
|
84
85
|
} & {
|
|
85
86
|
title: StringConstructor;
|
|
87
|
+
primaryHeader: BooleanConstructor;
|
|
86
88
|
theme: PropType<DialogTheme>;
|
|
87
89
|
width: (NumberConstructor | StringConstructor)[];
|
|
88
90
|
message: PropType<DialogMessage>;
|
|
@@ -137,6 +139,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
137
139
|
};
|
|
138
140
|
} & {
|
|
139
141
|
title: StringConstructor;
|
|
142
|
+
primaryHeader: BooleanConstructor;
|
|
140
143
|
theme: PropType<DialogTheme>;
|
|
141
144
|
width: (NumberConstructor | StringConstructor)[];
|
|
142
145
|
message: PropType<DialogMessage>;
|
|
@@ -179,6 +182,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
179
182
|
transition: string;
|
|
180
183
|
closeOnPopstate: boolean;
|
|
181
184
|
allowHtml: boolean;
|
|
185
|
+
primaryHeader: boolean;
|
|
182
186
|
showCancelButton: boolean;
|
|
183
187
|
cancelButtonDisabled: boolean;
|
|
184
188
|
confirmButtonDisabled: boolean;
|
package/es/dialog/Dialog.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { Button } from "../button/index.mjs";
|
|
|
7
7
|
const [name, bem, t] = createNamespace("dialog");
|
|
8
8
|
const dialogProps = extend({}, popupSharedProps, {
|
|
9
9
|
title: String,
|
|
10
|
+
primaryHeader: Boolean,
|
|
10
11
|
theme: String,
|
|
11
12
|
width: numericProp,
|
|
12
13
|
message: [String, Function],
|
|
@@ -84,12 +85,21 @@ var stdin_default = defineComponent({
|
|
|
84
85
|
const renderTitle = () => {
|
|
85
86
|
const title = slots.title ? slots.title() : props.title;
|
|
86
87
|
if (title) {
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
return (
|
|
89
|
+
// <div
|
|
90
|
+
// class={bem(['header', props.titleType, {
|
|
91
|
+
// isolated: !props.message && !slots.default,
|
|
92
|
+
// 'custom-title': !!slots.title,
|
|
93
|
+
// }])}
|
|
94
|
+
// >
|
|
95
|
+
_createVNode("div", {
|
|
96
|
+
"class": bem("header", {
|
|
97
|
+
isolated: !props.message && !slots.default,
|
|
98
|
+
"custom-title": !!slots.title,
|
|
99
|
+
primary: props.primaryHeader
|
|
100
|
+
})
|
|
101
|
+
}, [title])
|
|
102
|
+
);
|
|
93
103
|
}
|
|
94
104
|
};
|
|
95
105
|
const renderMessage = (hasTitle) => {
|
|
@@ -98,10 +108,15 @@ var stdin_default = defineComponent({
|
|
|
98
108
|
allowHtml,
|
|
99
109
|
messageAlign
|
|
100
110
|
} = props;
|
|
101
|
-
const
|
|
102
|
-
"has-title": hasTitle,
|
|
111
|
+
const mods = {
|
|
103
112
|
[messageAlign]: messageAlign
|
|
104
|
-
}
|
|
113
|
+
};
|
|
114
|
+
if (props.primaryHeader) {
|
|
115
|
+
mods["primary-header"] = props.primaryHeader;
|
|
116
|
+
} else if (hasTitle) {
|
|
117
|
+
mods["has-title"] = hasTitle;
|
|
118
|
+
}
|
|
119
|
+
const classNames = bem("message", mods);
|
|
105
120
|
const content = isFunction(message) ? message() : message;
|
|
106
121
|
if (allowHtml && typeof content === "string") {
|
|
107
122
|
return _createVNode("div", {
|
package/es/dialog/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-dialog-width: 350px;--zt-dialog-max-width: 90%;--zt-dialog-font-size: var(--zt-font-size-lg);--zt-dialog-transition: var(--zt-duration-base);--zt-dialog-radius: 12px;--zt-dialog-background: var(--zt-background-2);--zt-dialog-header-font-weight: var(--zt-font-bold);--zt-dialog-header-line-height: 24px;--zt-dialog-header-padding-top: 24px;--zt-dialog-header-isolated-padding: var(--zt-padding-lg) 0;--zt-dialog-message-padding: var(--zt-padding-lg) var(--zt-padding-md);--zt-dialog-message-font-size: var(--zt-font-size-lg);--zt-dialog-message-line-height: var(--zt-line-height-md);--zt-dialog-message-max-height: 60vh;--zt-dialog-has-title-message-font-size: var(--zt-font-size-md);--zt-dialog-has-title-message-text-color: var(--zt-gray-a6);--zt-dialog-has-title-message-padding-top: var(--zt-padding-xs);--zt-dialog-confirm-button-text-color: var(--zt-white);--zt-dialog-cancel-button-background-color: var(--zt-white);--zt-dialog-cancel-button-border: 0}.zt-dialog{top:45%;width:var(--zt-dialog-width);max-width:var(--zt-dialog-max-width);overflow:hidden;font-size:var(--zt-dialog-font-size);background:var(--zt-dialog-background);border-radius:var(--zt-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--zt-dialog-transition);transition-property:transform,opacity}.zt-dialog__header{color:var(--zt-text-color);padding-top:var(--zt-dialog-header-padding-top);font-weight:var(--zt-dialog-header-font-weight);line-height:var(--zt-dialog-header-line-height);text-align:center}.zt-dialog__header--isolated{padding:var(--zt-dialog-header-isolated-padding)}.zt-dialog__header--custom-title{padding-left:0;padding-right:0;padding-top:0}.zt-dialog__content{text-align:center;font-size:0}.zt-dialog__message{display:inline-block;color:var(--zt-gray-a8);max-height:var(--zt-dialog-message-max-height);padding:var(--zt-dialog-message-padding);overflow-y:auto;font-size:var(--zt-dialog-message-font-size);line-height:var(--zt-dialog-message-line-height);white-space:pre-wrap;text-align:left;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:var(--zt-dialog-has-title-message-padding-top);color:var(--zt-dialog-has-title-message-text-color);font-size:var(--zt-dialog-has-title-message-font-size)}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__message--justify{text-align:justify}.zt-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none;margin:0 var(--zt-padding-xl) var(--zt-padding-lg)}.zt-dialog__confirm,.zt-dialog__cancel{flex:1;margin:0;border-width:var(--zt-dialog-cancel-button-border);background-color:var(--zt-dialog-cancel-button-background-color)}.zt-dialog__confirm,.zt-dialog__confirm:active{color:var(--zt-dialog-confirm-button-text-color)}.zt-dialog__confirm--with-cancel{margin-left:8px}.zt-dialog--round-button .zt-dialog__footer{position:relative;height:auto;padding:var(--zt-padding-xs) var(--zt-padding-lg) var(--zt-padding-md)}.zt-dialog--round-button .zt-dialog__message{padding-bottom:var(--zt-padding-md);color:var(--zt-text-color)}.zt-dialog--round-button .zt-dialog__confirm,.zt-dialog--round-button .zt-dialog__cancel{height:var(--zt-dialog-round-button-height)}.zt-dialog--round-button .zt-dialog__confirm{color:var(--zt-white)}.zt-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}.zt-theme-dark{--zt-dialog-cancel-button-border: .5px solid rgba(255, 255, 255, .2);--zt-dialog-cancel-button-background-color: rbga(255, 255, 255, .2)}
|
|
1
|
+
:root{--zt-dialog-width: 350px;--zt-dialog-max-width: 90%;--zt-dialog-font-size: var(--zt-font-size-lg);--zt-dialog-transition: var(--zt-duration-base);--zt-dialog-radius: 12px;--zt-dialog-background: var(--zt-background-2);--zt-dialog-header-font-weight: var(--zt-font-bold);--zt-dialog-header-line-height: 24px;--zt-dialog-header-padding-top: 24px;--zt-dialog-header-isolated-padding: var(--zt-padding-lg) 0;--zt-dialog-header-primary-padding: 10px;--zt-dialog-message-padding: var(--zt-padding-lg) var(--zt-padding-md);--zt-dialog-message-font-size: var(--zt-font-size-lg);--zt-dialog-message-line-height: var(--zt-line-height-md);--zt-dialog-message-max-height: 60vh;--zt-dialog-has-title-message-font-size: var(--zt-font-size-md);--zt-dialog-has-title-message-text-color: var(--zt-gray-a6);--zt-dialog-has-title-message-padding-top: var(--zt-padding-xs);--zt-dialog-has-title-message-primary-header: var(--zt-padding-lg);--zt-dialog-confirm-button-text-color: var(--zt-white);--zt-dialog-cancel-button-background-color: var(--zt-white);--zt-dialog-cancel-button-border: 0}.zt-dialog{top:45%;width:var(--zt-dialog-width);max-width:var(--zt-dialog-max-width);overflow:hidden;font-size:var(--zt-dialog-font-size);background:var(--zt-dialog-background);border-radius:var(--zt-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--zt-dialog-transition);transition-property:transform,opacity}.zt-dialog__header{color:var(--zt-text-color);padding-top:var(--zt-dialog-header-padding-top);font-weight:var(--zt-dialog-header-font-weight);line-height:var(--zt-dialog-header-line-height);text-align:center}.zt-dialog__header--isolated{padding:var(--zt-dialog-header-isolated-padding)}.zt-dialog__header--custom-title{padding-left:0;padding-right:0;padding-top:0}.zt-dialog__header--primary{padding:var(--zt-dialog-header-primary-padding);background:var(--zt-primary-color);color:var(--zt-white)}.zt-dialog__content{text-align:center;font-size:0}.zt-dialog__message{display:inline-block;color:var(--zt-gray-a8);max-height:var(--zt-dialog-message-max-height);padding:var(--zt-dialog-message-padding);overflow-y:auto;font-size:var(--zt-dialog-message-font-size);line-height:var(--zt-dialog-message-line-height);white-space:pre-wrap;text-align:left;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:var(--zt-dialog-has-title-message-padding-top);color:var(--zt-dialog-has-title-message-text-color);font-size:var(--zt-dialog-has-title-message-font-size)}.zt-dialog__message--primary-header{padding-top:var(--zt-dialog-has-title-message-primary-header)}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__message--justify{text-align:justify}.zt-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none;margin:0 var(--zt-padding-xl) var(--zt-padding-lg)}.zt-dialog__confirm,.zt-dialog__cancel{flex:1;margin:0;border-width:var(--zt-dialog-cancel-button-border);background-color:var(--zt-dialog-cancel-button-background-color)}.zt-dialog__confirm,.zt-dialog__confirm:active{color:var(--zt-dialog-confirm-button-text-color)}.zt-dialog__confirm--with-cancel{margin-left:8px}.zt-dialog--round-button .zt-dialog__footer{position:relative;height:auto;padding:var(--zt-padding-xs) var(--zt-padding-lg) var(--zt-padding-md)}.zt-dialog--round-button .zt-dialog__message{padding-bottom:var(--zt-padding-md);color:var(--zt-text-color)}.zt-dialog--round-button .zt-dialog__confirm,.zt-dialog--round-button .zt-dialog__cancel{height:var(--zt-dialog-round-button-height)}.zt-dialog--round-button .zt-dialog__confirm{color:var(--zt-white)}.zt-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}.zt-theme-dark{--zt-dialog-cancel-button-border: .5px solid rgba(255, 255, 255, .2);--zt-dialog-cancel-button-background-color: rbga(255, 255, 255, .2)}
|
package/es/dialog/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
|
25
25
|
};
|
|
26
26
|
} & {
|
|
27
27
|
title: StringConstructor;
|
|
28
|
+
primaryHeader: BooleanConstructor;
|
|
28
29
|
theme: import("vue").PropType<import("./types").DialogTheme>;
|
|
29
30
|
width: (NumberConstructor | StringConstructor)[];
|
|
30
31
|
message: import("vue").PropType<import("./types").DialogMessage>;
|
|
@@ -79,6 +80,7 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
|
79
80
|
};
|
|
80
81
|
} & {
|
|
81
82
|
title: StringConstructor;
|
|
83
|
+
primaryHeader: BooleanConstructor;
|
|
82
84
|
theme: import("vue").PropType<import("./types").DialogTheme>;
|
|
83
85
|
width: (NumberConstructor | StringConstructor)[];
|
|
84
86
|
message: import("vue").PropType<import("./types").DialogMessage>;
|
|
@@ -121,6 +123,7 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
|
121
123
|
transition: string;
|
|
122
124
|
closeOnPopstate: boolean;
|
|
123
125
|
allowHtml: boolean;
|
|
126
|
+
primaryHeader: boolean;
|
|
124
127
|
showCancelButton: boolean;
|
|
125
128
|
cancelButtonDisabled: boolean;
|
|
126
129
|
confirmButtonDisabled: boolean;
|
package/es/dialog/types.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare type DialogMessage = string | (() => JSX.Element);
|
|
|
6
6
|
export declare type DialogMessageAlign = 'left' | 'center' | 'right' | 'justify';
|
|
7
7
|
export declare type DialogOptions = {
|
|
8
8
|
title?: string;
|
|
9
|
+
primaryHeader?: boolean;
|
|
9
10
|
width?: Numeric;
|
|
10
11
|
theme?: DialogTheme;
|
|
11
12
|
message?: DialogMessage;
|
package/es/field/Field.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ declare const fieldProps: {
|
|
|
130
130
|
labelAlign: PropType<FieldTextAlign>;
|
|
131
131
|
showWordLimit: BooleanConstructor;
|
|
132
132
|
errorMessageAlign: PropType<FieldTextAlign>;
|
|
133
|
+
descriptionClass: PropType<unknown>;
|
|
133
134
|
description: {
|
|
134
135
|
type: PropType<string>;
|
|
135
136
|
default: string;
|
|
@@ -226,6 +227,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
226
227
|
labelAlign: PropType<FieldTextAlign>;
|
|
227
228
|
showWordLimit: BooleanConstructor;
|
|
228
229
|
errorMessageAlign: PropType<FieldTextAlign>;
|
|
230
|
+
descriptionClass: PropType<unknown>;
|
|
229
231
|
description: {
|
|
230
232
|
type: PropType<string>;
|
|
231
233
|
default: string;
|
|
@@ -320,6 +322,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
320
322
|
labelAlign: PropType<FieldTextAlign>;
|
|
321
323
|
showWordLimit: BooleanConstructor;
|
|
322
324
|
errorMessageAlign: PropType<FieldTextAlign>;
|
|
325
|
+
descriptionClass: PropType<unknown>;
|
|
323
326
|
description: {
|
|
324
327
|
type: PropType<string>;
|
|
325
328
|
default: string;
|
package/es/field/Field.mjs
CHANGED
|
@@ -51,6 +51,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
|
51
51
|
labelAlign: String,
|
|
52
52
|
showWordLimit: Boolean,
|
|
53
53
|
errorMessageAlign: String,
|
|
54
|
+
descriptionClass: unknownProp,
|
|
54
55
|
description: makeStringProp(""),
|
|
55
56
|
colon: {
|
|
56
57
|
type: Boolean,
|
|
@@ -388,7 +389,7 @@ var stdin_default = defineComponent({
|
|
|
388
389
|
return;
|
|
389
390
|
}
|
|
390
391
|
return _createVNode("div", {
|
|
391
|
-
"class": bem("description")
|
|
392
|
+
"class": [bem("description"), props.descriptionClass]
|
|
392
393
|
}, [props.description]);
|
|
393
394
|
};
|
|
394
395
|
const showMessage = computed(() => !(form && form.props.showErrorMessage === false) && (props.errorMessage || state.validateMessage));
|
package/es/field/index.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
85
85
|
labelAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
86
86
|
showWordLimit: BooleanConstructor;
|
|
87
87
|
errorMessageAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
88
|
+
descriptionClass: import("vue").PropType<unknown>;
|
|
88
89
|
description: {
|
|
89
90
|
type: import("vue").PropType<string>;
|
|
90
91
|
default: string;
|
|
@@ -179,6 +180,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
179
180
|
labelAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
180
181
|
showWordLimit: BooleanConstructor;
|
|
181
182
|
errorMessageAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
183
|
+
descriptionClass: import("vue").PropType<unknown>;
|
|
182
184
|
description: {
|
|
183
185
|
type: import("vue").PropType<string>;
|
|
184
186
|
default: string;
|