refactor(client): use composition api

This commit is contained in:
syuilo
2022-01-07 15:02:25 +09:00
parent f06ded9433
commit 6558cd2f27
6 changed files with 43 additions and 97 deletions

View File

@@ -5,28 +5,17 @@
</span>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
<script lang="ts" setup>
import * as misskey from 'misskey-js';
import { toUnicode } from 'punycode/';
import { host } from '@/config';
import { host as hostRaw } from '@/config';
export default defineComponent({
props: {
user: {
type: Object,
required: true
},
detail: {
type: Boolean,
default: false
},
},
data() {
return {
host: toUnicode(host),
};
}
});
defineProps<{
user: misskey.entities.UserDetailed;
detail?: boolean;
}>();
const host = toUnicode(hostRaw);
</script>
<style lang="scss" scoped>

View File

@@ -8,19 +8,8 @@
</transition>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
<script lang="ts" setup>
import MkButton from '@/components/ui/button.vue';
export default defineComponent({
components: {
MkButton,
},
data() {
return {
};
},
});
</script>
<style lang="scss" scoped>