vueless 0.0.46 → 0.0.48
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/package.json +1 -1
- package/ui.form-calendar/index.vue +18 -17
- package/ui.form-date-picker-range/index.vue +18 -18
- package/web-types.json +1 -1
package/package.json
CHANGED
|
@@ -148,6 +148,7 @@
|
|
|
148
148
|
|
|
149
149
|
<script setup>
|
|
150
150
|
import { computed, onMounted, ref, watch } from "vue";
|
|
151
|
+
import { merge } from "lodash-es";
|
|
151
152
|
|
|
152
153
|
import UIcon from "../ui.image-icon";
|
|
153
154
|
import UButton from "../ui.button";
|
|
@@ -344,40 +345,40 @@ const isCurrentView = computed(() => ({
|
|
|
344
345
|
year: currentView.value === VIEW.year,
|
|
345
346
|
}));
|
|
346
347
|
|
|
348
|
+
const currentLocale = computed(() => merge(props.config.i18n, tm("UCalendar")));
|
|
349
|
+
|
|
347
350
|
const locale = computed(() => {
|
|
348
|
-
const
|
|
351
|
+
const { months, weekdays } = currentLocale.value;
|
|
349
352
|
|
|
350
|
-
|
|
351
|
-
|
|
353
|
+
// formatted locale
|
|
354
|
+
return {
|
|
355
|
+
...currentLocale.value,
|
|
352
356
|
months: {
|
|
353
|
-
shorthand: getSortedLocale(
|
|
354
|
-
longhand: getSortedLocale(
|
|
357
|
+
shorthand: getSortedLocale(months.shorthand, LOCALE_TYPE.month),
|
|
358
|
+
longhand: getSortedLocale(months.longhand, LOCALE_TYPE.month),
|
|
355
359
|
},
|
|
356
360
|
weekdays: {
|
|
357
|
-
shorthand: getSortedLocale(
|
|
358
|
-
longhand: getSortedLocale(
|
|
361
|
+
shorthand: getSortedLocale(weekdays.shorthand, LOCALE_TYPE.day),
|
|
362
|
+
longhand: getSortedLocale(weekdays.longhand, LOCALE_TYPE.day),
|
|
359
363
|
},
|
|
360
364
|
};
|
|
361
|
-
|
|
362
|
-
return formattedLocale;
|
|
363
365
|
});
|
|
364
366
|
|
|
365
367
|
const userFormatLocale = computed(() => {
|
|
366
|
-
const
|
|
368
|
+
const { months, weekdays } = currentLocale.value;
|
|
367
369
|
|
|
368
|
-
|
|
370
|
+
// formatted locale
|
|
371
|
+
return {
|
|
369
372
|
...currentLocale,
|
|
370
373
|
months: {
|
|
371
|
-
shorthand: getSortedLocale(
|
|
372
|
-
longhand: getSortedLocale(
|
|
374
|
+
shorthand: getSortedLocale(months.shorthand, LOCALE_TYPE.month),
|
|
375
|
+
longhand: getSortedLocale(months.userFormat || months.longhand, LOCALE_TYPE.month),
|
|
373
376
|
},
|
|
374
377
|
weekdays: {
|
|
375
|
-
shorthand: getSortedLocale(
|
|
376
|
-
longhand: getSortedLocale(
|
|
378
|
+
shorthand: getSortedLocale(weekdays.shorthand, LOCALE_TYPE.day),
|
|
379
|
+
longhand: getSortedLocale(weekdays.userFormat || weekdays.longhand, LOCALE_TYPE.day),
|
|
377
380
|
},
|
|
378
381
|
};
|
|
379
|
-
|
|
380
|
-
return formattedLocale;
|
|
381
382
|
});
|
|
382
383
|
|
|
383
384
|
const isTimepickerEnabled = computed(() => {
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
<script setup>
|
|
181
181
|
import { computed, watch, ref, nextTick } from "vue";
|
|
182
182
|
import { useStore } from "vuex";
|
|
183
|
+
import { merge } from "lodash-es";
|
|
183
184
|
|
|
184
185
|
import UIcon from "../ui.image-icon";
|
|
185
186
|
import UInput from "../ui.form-input";
|
|
@@ -413,42 +414,41 @@ const localValue = computed({
|
|
|
413
414
|
});
|
|
414
415
|
|
|
415
416
|
const isMobileDevice = computed(() => store.getters["breakpoint/isMobileDevice"]);
|
|
416
|
-
|
|
417
417
|
const rangeInputName = computed(() => `rangeInput-${props.id}`);
|
|
418
|
+
const currentLocale = computed(() => merge(props.config.i18n, tm("UDatePickerRange")));
|
|
418
419
|
|
|
419
420
|
const locale = computed(() => {
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
const { months, weekdays } = currentLocale.value;
|
|
422
|
+
|
|
423
|
+
// formatted locale
|
|
424
|
+
return {
|
|
425
|
+
...currentLocale.value,
|
|
423
426
|
months: {
|
|
424
|
-
shorthand: getSortedLocale(
|
|
425
|
-
longhand: getSortedLocale(
|
|
427
|
+
shorthand: getSortedLocale(months.shorthand, LOCALE_TYPE.month),
|
|
428
|
+
longhand: getSortedLocale(months.longhand, LOCALE_TYPE.month),
|
|
426
429
|
},
|
|
427
430
|
weekdays: {
|
|
428
|
-
shorthand: getSortedLocale(
|
|
429
|
-
longhand: getSortedLocale(
|
|
431
|
+
shorthand: getSortedLocale(weekdays.shorthand, LOCALE_TYPE.day),
|
|
432
|
+
longhand: getSortedLocale(weekdays.longhand, LOCALE_TYPE.day),
|
|
430
433
|
},
|
|
431
434
|
};
|
|
432
|
-
|
|
433
|
-
return formattedLocale;
|
|
434
435
|
});
|
|
435
436
|
|
|
436
437
|
const userFormatLocale = computed(() => {
|
|
437
|
-
const
|
|
438
|
+
const { months, weekdays } = currentLocale.value;
|
|
438
439
|
|
|
439
|
-
|
|
440
|
+
// formatted locale
|
|
441
|
+
return {
|
|
440
442
|
...currentLocale,
|
|
441
443
|
months: {
|
|
442
|
-
shorthand: getSortedLocale(
|
|
443
|
-
longhand: getSortedLocale(
|
|
444
|
+
shorthand: getSortedLocale(months.shorthand, LOCALE_TYPE.month),
|
|
445
|
+
longhand: getSortedLocale(months.userFormat || months.longhand, LOCALE_TYPE.month),
|
|
444
446
|
},
|
|
445
447
|
weekdays: {
|
|
446
|
-
shorthand: getSortedLocale(
|
|
447
|
-
longhand: getSortedLocale(
|
|
448
|
+
shorthand: getSortedLocale(weekdays.shorthand, LOCALE_TYPE.day),
|
|
449
|
+
longhand: getSortedLocale(weekdays.userFormat || weekdays.longhand, LOCALE_TYPE.day),
|
|
448
450
|
},
|
|
449
451
|
};
|
|
450
|
-
|
|
451
|
-
return formattedLocale;
|
|
452
452
|
});
|
|
453
453
|
|
|
454
454
|
const periods = computed(() => [
|