This commit is contained in:
syuilo
2023-05-19 16:20:53 +09:00
parent 56d4658b36
commit 95470a40a7
74 changed files with 310 additions and 439 deletions

View File

@@ -1,5 +1,5 @@
<template>
<MkContainer :show-header="widgetProps.showHeader" class="mkw-clicker">
<MkContainer :showHeader="widgetProps.showHeader" class="mkw-clicker">
<template #icon><i class="ti ti-cookie"></i></template>
<template #header>Clicker</template>
<MkClickerGame/>
@@ -7,7 +7,7 @@
</template>
<script lang="ts" setup>
import { useWidgetPropsManager, Widget, WidgetComponentExpose } from './widget';
import { useWidgetPropsManager, Widget, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget';
import { GetFormResultType } from '@/scripts/form';
import MkContainer from '@/components/MkContainer.vue';
import MkClickerGame from '@/components/MkClickerGame.vue';
@@ -23,12 +23,9 @@ 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,
widgetPropsDef,
props,