Skip to content

Commit

Permalink
2024.3 形式のWidgetに対応。
Browse files Browse the repository at this point in the history
  • Loading branch information
pooza committed Mar 2, 2024
1 parent 64e985b commit 01fcc37
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/frontend/src/widgets/WidgetKoteitag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { useWidgetPropsManager, Widget, WidgetComponentExpose } from './widget.js';
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
import { GetFormResultType } from '@/scripts/form.js';
import * as os from '@/os.js';
import MkContainer from '@/components/MkContainer.vue';
Expand All @@ -35,12 +35,8 @@ let options = reactive({});
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 { configure } = useWidgetPropsManager(name, widgetPropsDef, props, emit);
defineExpose<WidgetComponentExpose>({
Expand Down

0 comments on commit 01fcc37

Please sign in to comment.