HumanBreak/src/App.vue

111 lines
2.0 KiB
Vue
Raw Normal View History

2022-11-13 18:02:05 +08:00
<template>
2023-10-29 22:13:37 +08:00
<div id="ui-new">
<div id="ui-main">
<div id="ui-list">
<div class="ui-one" v-for="ui of mainUi.stack">
2023-11-05 10:54:26 +08:00
<component
:is="ui.ui.component"
v-on="ui.vOn ?? {}"
v-bind="ui.vBind ?? {}"
></component>
2023-10-29 22:13:37 +08:00
</div>
</div>
</div>
<div id="ui-fixed">
<template v-for="ui of fixedUi.stack">
<component
:is="ui.ui.component"
v-on="ui.vOn ?? {}"
v-bind="ui.vBind ?? {}"
></component>
</template>
</div>
2022-11-13 18:02:05 +08:00
</div>
</template>
<script lang="ts" setup>
2023-10-29 22:13:37 +08:00
import { onMounted } from 'vue';
import { mainUi, fixedUi } from './core/main/init/ui';
import { hook } from '@/core/main/game';
onMounted(() => {
hook.emit('mounted');
});
2022-11-13 18:02:05 +08:00
</script>
<style lang="less" scoped>
2022-11-14 17:11:23 +08:00
#ui {
width: 90%;
height: 90%;
2022-11-13 18:02:05 +08:00
display: flex;
justify-content: center;
2022-11-14 17:11:23 +08:00
overflow: hidden;
2022-11-13 18:02:05 +08:00
}
2022-11-16 23:01:23 +08:00
2023-10-29 22:13:37 +08:00
#ui-new {
width: 0;
height: 0;
left: 0;
top: 0;
position: fixed;
overflow: visible;
display: block;
}
#ui-main {
width: 100vw;
height: 100vh;
display: none;
justify-content: center;
2023-11-05 10:54:26 +08:00
align-items: center;
2023-10-29 22:13:37 +08:00
left: 0;
top: 0;
position: fixed;
2023-11-05 10:54:26 +08:00
background-color: #000b;
backdrop-filter: blur(5px);
2023-11-07 19:25:59 +08:00
z-index: 1;
2023-10-29 22:13:37 +08:00
}
#ui-list {
2023-11-07 19:25:59 +08:00
width: 90vw;
height: 90vh;
2023-10-29 22:13:37 +08:00
overflow: hidden;
position: relative;
left: 0;
top: 0;
}
.ui-one {
2023-11-07 19:25:59 +08:00
width: 90vw;
height: 90vh;
2023-10-29 22:13:37 +08:00
position: absolute;
left: 0;
top: 0;
display: flex;
justify-content: center;
}
#ui-fixed {
position: fixed;
width: 0;
height: 0;
overflow: visible;
left: 0;
top: 0;
display: none;
2023-11-07 19:25:59 +08:00
z-index: 0;
2023-10-29 22:13:37 +08:00
}
2022-11-30 16:42:44 +08:00
@media screen and (max-width: 600px) {
2022-11-16 23:01:23 +08:00
#ui {
width: 100%;
height: 100%;
}
2023-10-29 22:13:37 +08:00
#ui-list {
width: 100%;
height: 100%;
}
2022-11-16 23:01:23 +08:00
}
2022-11-13 18:02:05 +08:00
</style>