You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
897 B
42 lines
897 B
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
import Aside from './aside/Aside.vue'
|
|
import Content from './content/Content.vue'
|
|
import Robot from '@/components/Robot/index.vue'
|
|
import { useKeydown } from '@/hooks/event/useKeydown'
|
|
|
|
const contentRef: any = ref(null)
|
|
|
|
function showLoginModal() {
|
|
contentRef.value.showLoginSuccessModal()
|
|
}
|
|
function closeLoginModal() {
|
|
contentRef.value.closeLoginSuccessModal()
|
|
}
|
|
useKeydown('m m', showLoginModal)
|
|
useKeydown('enter', closeLoginModal)
|
|
</script>
|
|
|
|
<template>
|
|
<div class="main">
|
|
<!-- 侧边 -->
|
|
<Aside :contentRef="contentRef"/>
|
|
|
|
<!-- 内容 -->
|
|
<Content ref="contentRef" />
|
|
|
|
<!-- 机器人 -->
|
|
<Robot :can-click="true" @click="showLoginModal" />
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="less" scoped>
|
|
.main {
|
|
display: flex;
|
|
flex-direction: row;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
margin-bottom: 16px
|
|
}
|
|
</style>
|