diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-01-07 13:27:17 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-01-07 13:27:17 +0900 |
| commit | 1b867cc1a4931329967c34478b2ccbe55f813354 (patch) | |
| tree | bb28f9a276e6a9861df887e160ad23e876890b0e | |
| parent | refactor(client): use composition api (diff) | |
| download | misskey-1b867cc1a4931329967c34478b2ccbe55f813354.tar.gz misskey-1b867cc1a4931329967c34478b2ccbe55f813354.tar.bz2 misskey-1b867cc1a4931329967c34478b2ccbe55f813354.zip | |
refactor(client): use composition api
Diffstat (limited to '')
| -rw-r--r-- | packages/client/src/components/file-type-icon.vue | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/packages/client/src/components/file-type-icon.vue b/packages/client/src/components/file-type-icon.vue index be1af5e501..11d28188cc 100644 --- a/packages/client/src/components/file-type-icon.vue +++ b/packages/client/src/components/file-type-icon.vue @@ -4,25 +4,12 @@ </span> </template> -<script lang="ts"> -import { defineComponent } from 'vue'; -import * as os from '@/os'; +<script lang="ts" setup> +import { computed } from 'vue'; -export default defineComponent({ - props: { - type: { - type: String, - required: true, - } - }, - data() { - return { - }; - }, - computed: { - kind(): string { - return this.type.split('/')[0]; - } - } -}); +const props = defineProps<{ + type: string; +}>(); + +const kind = computed(() => props.type.split('/')[0]); </script> |