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