mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 10:53:11 +02:00
refactor(client): use setup
This commit is contained in:
parent
1576ce2e15
commit
d51c18d96d
1 changed files with 11 additions and 21 deletions
|
@ -5,34 +5,24 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import XSetup from './welcome.setup.vue';
|
||||
import XEntrance from './welcome.entrance.a.vue';
|
||||
import { instanceName } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import * as symbols from '@/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XSetup,
|
||||
XEntrance,
|
||||
},
|
||||
let meta = $ref(null);
|
||||
|
||||
data() {
|
||||
return {
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: instanceName,
|
||||
icon: null
|
||||
},
|
||||
meta: null
|
||||
}
|
||||
},
|
||||
os.api('meta', { detail: true }).then(res => {
|
||||
meta = res;
|
||||
});
|
||||
|
||||
created() {
|
||||
os.api('meta', { detail: true }).then(meta => {
|
||||
this.meta = meta;
|
||||
});
|
||||
}
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: computed(() => ({
|
||||
title: instanceName,
|
||||
icon: null,
|
||||
})),
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue