@varlet/ui 3.20.1 → 3.20.2
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/action-sheet/style/index.mjs +1 -1
- package/es/date-picker/DatePicker.mjs +6 -8
- package/es/date-picker/constants.mjs +1 -2
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/varlet.esm.js +882 -883
- package/highlight/web-types.en-US.json +2 -2
- package/highlight/web-types.zh-CN.json +2 -2
- package/lib/varlet.cjs.js +8 -9
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
|
@@ -359,9 +359,7 @@ const __sfc__ = defineComponent({
|
|
|
359
359
|
var _a, _b, _c, _d;
|
|
360
360
|
const { multiple, range } = props2;
|
|
361
361
|
if (range) {
|
|
362
|
-
const formattedDays = selectionState.selectedRangeDays.map(
|
|
363
|
-
(date) => dayjs(date).format(DatePickerFormats.DayPadded)
|
|
364
|
-
);
|
|
362
|
+
const formattedDays = selectionState.selectedRangeDays.map((date) => dayjs(date).format(DatePickerFormats.Day));
|
|
365
363
|
return formattedDays.length ? formattedDays.join(" ~ ") : "";
|
|
366
364
|
}
|
|
367
365
|
if (multiple) {
|
|
@@ -380,7 +378,7 @@ const __sfc__ = defineComponent({
|
|
|
380
378
|
if ((pt || t)("lang") === "zh-CN") {
|
|
381
379
|
return `${selectionState.selectedMonth}-${showDay} ${weekName.slice(0, 3)}`;
|
|
382
380
|
}
|
|
383
|
-
return `${weekName.slice(0, 3)}, ${monthName.slice(0, 3)} ${selectionState.selectedDay}`;
|
|
381
|
+
return `${weekName.slice(0, 3)}, ${monthName.slice(0, 3)} ${toNumber(selectionState.selectedDay)}`;
|
|
384
382
|
});
|
|
385
383
|
const dateSlotProps = computed(() => {
|
|
386
384
|
var _a, _b;
|
|
@@ -396,7 +394,7 @@ const __sfc__ = defineComponent({
|
|
|
396
394
|
};
|
|
397
395
|
});
|
|
398
396
|
const formattedRangeDays = computed(
|
|
399
|
-
() => selectionState.selectedRangeDays.map((date) => dayjs(date).format(DatePickerFormats.
|
|
397
|
+
() => selectionState.selectedRangeDays.map((date) => dayjs(date).format(DatePickerFormats.Day))
|
|
400
398
|
);
|
|
401
399
|
const selectedYearInPreview = computed(() => selectionState.selectedYear === previewYear.value);
|
|
402
400
|
const selectedMonthInPreview = computed(() => selectionState.selectedMonth === previewMonth.value);
|
|
@@ -526,7 +524,7 @@ const __sfc__ = defineComponent({
|
|
|
526
524
|
}
|
|
527
525
|
function updateMultiple(selectedValue, pickerType) {
|
|
528
526
|
const selectedMultipleValues = getMultipleValuesByType(pickerType);
|
|
529
|
-
const valueFormat = pickerType === DatePickerTypes.Year ? DatePickerFormats.Year : pickerType === DatePickerTypes.Month ? DatePickerFormats.Month : DatePickerFormats.
|
|
527
|
+
const valueFormat = pickerType === DatePickerTypes.Year ? DatePickerFormats.Year : pickerType === DatePickerTypes.Month ? DatePickerFormats.Month : DatePickerFormats.Day;
|
|
530
528
|
const nextMultipleValues = selectedMultipleValues.map((date) => dayjs(date).format(valueFormat));
|
|
531
529
|
const index = nextMultipleValues.findIndex((multipleValue) => multipleValue === selectedValue);
|
|
532
530
|
const alreadySelected = index !== -1;
|
|
@@ -582,7 +580,7 @@ const __sfc__ = defineComponent({
|
|
|
582
580
|
monthOffset,
|
|
583
581
|
DatePickerUnits.Month
|
|
584
582
|
);
|
|
585
|
-
const dayValue =
|
|
583
|
+
const dayValue = targetMonthDayjsObject.date(day).format(DatePickerFormats.Day);
|
|
586
584
|
if (!isSelectableDate(dayValue, DatePickerUnits.Day)) {
|
|
587
585
|
return;
|
|
588
586
|
}
|
|
@@ -592,7 +590,7 @@ const __sfc__ = defineComponent({
|
|
|
592
590
|
previewMonth.value = targetMonthDayjsObject.format(DatePickerFormats.Month).split("-")[1];
|
|
593
591
|
emitPreview();
|
|
594
592
|
}
|
|
595
|
-
selectValue(
|
|
593
|
+
selectValue(dayValue, DatePickerTypes.Date);
|
|
596
594
|
}
|
|
597
595
|
function selectMonthFromPanel(month) {
|
|
598
596
|
const { type: pickerType, readonly } = props2;
|
package/es/index.bundle.mjs
CHANGED
|
@@ -310,7 +310,7 @@ import './tree-menu/style/index.mjs'
|
|
|
310
310
|
import './uploader/style/index.mjs'
|
|
311
311
|
import './watermark/style/index.mjs'
|
|
312
312
|
|
|
313
|
-
const version = '3.20.
|
|
313
|
+
const version = '3.20.2'
|
|
314
314
|
|
|
315
315
|
function install(app) {
|
|
316
316
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ export * from './tree-menu/index.mjs'
|
|
|
206
206
|
export * from './uploader/index.mjs'
|
|
207
207
|
export * from './watermark/index.mjs'
|
|
208
208
|
|
|
209
|
-
const version = '3.20.
|
|
209
|
+
const version = '3.20.2'
|
|
210
210
|
|
|
211
211
|
function install(app) {
|
|
212
212
|
ActionSheet.install && app.use(ActionSheet)
|