nuxt-hs-ui 2.0.31 → 2.0.32
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/module.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import dayjs from "dayjs/esm/index";
|
|
11
11
|
// flatpickr cdn 経由で使用する
|
|
12
12
|
import flatpickr from "flatpickr";
|
|
13
|
-
import monthSelectPlugin from "flatpickr/dist/plugins/monthSelect";
|
|
13
|
+
// import monthSelectPlugin from "flatpickr/dist/plugins/monthSelect";
|
|
14
14
|
// [ vueuse ]
|
|
15
15
|
import { useMounted } from "@vueuse/core";
|
|
16
16
|
// [ NUXT ]
|
|
@@ -64,6 +64,7 @@ const hsMisc = useHsMisc();
|
|
|
64
64
|
const isMounted = useMounted();
|
|
65
65
|
// ----------------------------------------------------------------------------
|
|
66
66
|
// flatpickr
|
|
67
|
+
// const MonthSelectPlugin: any = monthSelectPlugin;
|
|
67
68
|
const timeDateFormat = "YYYY-MM-DD HH:mm:ss.SSS";
|
|
68
69
|
const timeOutputDateFormat = "HH:mm:ss.SSS";
|
|
69
70
|
const timeShowDateFormat = "HH:mm";
|
|
@@ -73,7 +74,8 @@ type Props = {
|
|
|
73
74
|
// ----------------------------------------------------------------------------
|
|
74
75
|
// Input 種類別
|
|
75
76
|
textAlign?: "left" | "center" | "right";
|
|
76
|
-
mode?: "all" | "date" | "time"
|
|
77
|
+
mode?: "all" | "date" | "time";
|
|
78
|
+
// mode?: "all" | "date" | "time" | "month";
|
|
77
79
|
/** mode=time の場合、[HH:mm:ss.SSS] に固定 */
|
|
78
80
|
dataFormat?: string;
|
|
79
81
|
/** mode=time の場合、[HH:mm] に固定 */
|
|
@@ -352,22 +354,20 @@ const initFlatPickerOption = () => {
|
|
|
352
354
|
state.option.noCalendar = true;
|
|
353
355
|
}
|
|
354
356
|
}
|
|
355
|
-
if (props.mode === "month") {
|
|
356
|
-
state.option.disableMobile = true;
|
|
357
|
-
}
|
|
358
357
|
if (props.disableMobile) {
|
|
359
358
|
state.option.disableMobile = true;
|
|
360
359
|
}
|
|
361
|
-
if (props.mode === "month") {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
360
|
+
// if (props.mode === "month") {
|
|
361
|
+
// state.option.disableMobile = true;
|
|
362
|
+
// state.option.plugins = [
|
|
363
|
+
// new MonthSelectPlugin({
|
|
364
|
+
// shorthand: true, // デフォルトはfalse
|
|
365
|
+
// dateFormat: "m.y", // デフォルトは"F Y"
|
|
366
|
+
// altFormat: "F Y", // デフォルトは"F Y"
|
|
367
|
+
// theme: "dark", // デフォルトは"light"
|
|
368
|
+
// }),
|
|
369
|
+
// ];
|
|
370
|
+
// }
|
|
371
371
|
};
|
|
372
372
|
|
|
373
373
|
const onOpen = () => {
|
|
@@ -505,10 +505,10 @@ const datePickerToday = () => {
|
|
|
505
505
|
if (props.readonly === true) return;
|
|
506
506
|
if (props.disabled === true) return;
|
|
507
507
|
if (state.date !== null) return;
|
|
508
|
-
|
|
509
|
-
if (props.mode === "month") {
|
|
510
|
-
|
|
511
|
-
}
|
|
508
|
+
const inputValue = dayjs();
|
|
509
|
+
// if (props.mode === "month") {
|
|
510
|
+
// inputValue = inputValue.startOf("month");
|
|
511
|
+
// }
|
|
512
512
|
const d = getShiftDayjs(inputValue);
|
|
513
513
|
if (checkDate(d.format("YYYY-MM-DD")) === false) {
|
|
514
514
|
Toast.Warning(
|
|
@@ -845,7 +845,8 @@ const computedIsFocusOpenBtn = computed(() => {
|
|
|
845
845
|
"
|
|
846
846
|
@click.stop="datePickerToday()"
|
|
847
847
|
>
|
|
848
|
-
{{ props.mode === "month" ? "Now" : "Today" }}
|
|
848
|
+
<!-- {{ props.mode === "month" ? "Now" : "Today" }} -->
|
|
849
|
+
Today
|
|
849
850
|
</span>
|
|
850
851
|
</div>
|
|
851
852
|
<template #right-icons>
|