chore (client): address TODO comments
This commit is contained in:
parent
cb0676ff5a
commit
521cfe7fe3
18 changed files with 126 additions and 112 deletions
|
@ -51,9 +51,7 @@ const props = defineProps<{
|
|||
];
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: "closed"): void;
|
||||
}>();
|
||||
const emit = defineEmits<(ev: "closed") => void>();
|
||||
|
||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||
const form = shallowRef<InstanceType<typeof MkPostForm>>();
|
||||
|
|
|
@ -45,7 +45,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import { i18n } from "@/i18n";
|
||||
|
@ -63,11 +67,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -48,7 +48,11 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
|
@ -184,11 +188,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import {
|
||||
WidgetComponentEmits,
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
useWidgetPropsManager,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import { timezones } from "@/scripts/timezones";
|
||||
import MkDigitalClock from "@/components/MkDigitalClock.vue";
|
||||
|
@ -64,11 +64,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -45,7 +45,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
|
@ -67,15 +71,13 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps> & { foldable?: boolean; scrollable?: boolean; }>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{
|
||||
widget?: Widget<WidgetProps>;
|
||||
foldable?: boolean;
|
||||
scrollable?: boolean;
|
||||
}>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<
|
||||
WidgetComponentProps<WidgetProps> & {
|
||||
foldable?: boolean;
|
||||
scrollable?: boolean;
|
||||
}
|
||||
>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -23,7 +23,11 @@
|
|||
import { ref, shallowRef } from "vue";
|
||||
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
import MkTagCloud from "@/components/MkTagCloud.vue";
|
||||
|
@ -42,11 +46,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -124,7 +124,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted, reactive } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import { useStream } from "@/stream";
|
||||
|
@ -148,11 +152,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -31,7 +31,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
|
@ -60,11 +64,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure, save } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -21,7 +21,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import * as os from "@/os";
|
||||
|
@ -39,11 +43,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted, ref } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import { useStream } from "@/stream";
|
||||
|
@ -53,11 +57,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import XPostForm from "@/components/MkPostForm.vue";
|
||||
|
@ -19,11 +23,8 @@ const widgetPropsDef = {};
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -38,7 +38,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import MarqueeText from "@/components/MkMarquee.vue";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
|
@ -85,11 +89,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -30,7 +30,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
|
@ -56,11 +60,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -24,7 +24,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import * as os from "@/os";
|
||||
|
@ -47,11 +51,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure, save } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -70,7 +70,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import * as os from "@/os";
|
||||
|
@ -109,11 +113,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure, save } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -38,7 +38,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
|
@ -60,11 +64,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -18,7 +18,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted, ref, watch } from "vue";
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
|
||||
|
@ -46,11 +50,8 @@ const widgetPropsDef = {
|
|||
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure } = useWidgetPropsManager(
|
||||
name,
|
||||
|
|
|
@ -30,7 +30,11 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||
import type {
|
||||
WidgetComponentExpose,
|
||||
WidgetComponentProps,
|
||||
WidgetComponentEmits,
|
||||
} from "./widget";
|
||||
import { useWidgetPropsManager } from "./widget";
|
||||
import type { GetFormResultType } from "@/scripts/form";
|
||||
import MkContainer from "@/components/MkContainer.vue";
|
||||
|
@ -54,11 +58,10 @@ const widgetPropsDef = {
|
|||
},
|
||||
};
|
||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||
// 現時点ではvueの制限によりimportしたtypeをジェネリックに渡せない
|
||||
// const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
// const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||
|
||||
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
||||
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
||||
|
||||
const { widgetProps, configure, save } = useWidgetPropsManager(
|
||||
name,
|
||||
widgetPropsDef,
|
||||
|
|
Loading…
Reference in a new issue