refactor
This commit is contained in:
parent
56d4658b36
commit
95470a40a7
74 changed files with 310 additions and 439 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<MkContainer :show-header="widgetProps.showHeader" data-cy-mkw-rss class="mkw-rss">
|
||||
<MkContainer :showHeader="widgetProps.showHeader" data-cy-mkw-rss class="mkw-rss">
|
||||
<template #icon><i class="ti ti-rss"></i></template>
|
||||
<template #header>RSS</template>
|
||||
<template #func="{ buttonStyleClass }"><button class="_button" :class="buttonStyleClass" @click="configure"><i class="ti ti-settings"></i></button></template>
|
||||
|
@ -19,7 +19,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, computed } from 'vue';
|
||||
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 { url as base } from '@/config';
|
||||
|
@ -49,11 +49,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,
|
||||
widgetPropsDef,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue