style(projects): sort defineProps, defineEmits with TS type

This commit is contained in:
Soybean
2024-01-25 23:24:35 +08:00
parent b2c61f0306
commit 123fd4f96c
25 changed files with 100 additions and 97 deletions

View File

@@ -5,13 +5,6 @@ import { $t } from '@/locales';
defineOptions({ name: 'ThemeSchemaSwitch' });
const props = withDefaults(defineProps<Props>(), {
showTooltip: true,
tooltipPlacement: 'bottom'
});
const emit = defineEmits<Emits>();
interface Props {
/** Theme schema */
themeSchema: UnionKey.ThemeScheme;
@@ -21,10 +14,17 @@ interface Props {
tooltipPlacement?: PopoverPlacement;
}
const props = withDefaults(defineProps<Props>(), {
showTooltip: true,
tooltipPlacement: 'bottom'
});
interface Emits {
(e: 'switch'): void;
}
const emit = defineEmits<Emits>();
function handleSwitch() {
emit('switch');
}