add framework

This commit is contained in:
AceDataCloud committed 2023-09-29 18:50:38 +08:00
1 parent affd47193c
commit 3638ab93c3
6 files changed
+134 -12

No files matched your search

+4 -5
View File
@@ -2,6 +2,8 @@ html,
body {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
* {
@@ -9,7 +11,8 @@ body {
}
#app {
background-color: #f7f8fc;
width: 100%;
height: 100%;
.el-main {
padding: 0 !important;
@@ -26,10 +29,6 @@ body {
color: var(--el-text-color-regular);
}
.el-button {
border-radius: 9999px;
}
.el-textarea {
border-radius: 10px;
textarea {
+54
View File
@@ -0,0 +1,54 @@
<template>
<div class="sidebar">
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElTooltip, ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { ROUTE_CHAT_INDEX } from '@/router/constants';
export default defineComponent({
name: 'Sidebar',
components: {
ElButton,
FontAwesomeIcon
},
data() {
return {
links: [
{
route: {
name: ROUTE_CHAT_INDEX
},
icon: 'fa-question'
},
{
route: {
name: 'midjourney-index'
},
icon: 'fa-question'
}
]
};
}
});
</script>
<style lang="scss" scoped>
.sidebar {
display: flex;
flex-direction: column;
align-items: flex-end;
.top {
display: flex;
flex-direction: column;
}
.bottom {
display: flex;
flex-direction: column;
}
}
</style>
+61
View File
@@ -0,0 +1,61 @@
<template>
<div class="sidebar">
<div class="top">
<div v-for="(link, linkIndex) in links" :key="linkIndex" class="link">
<el-button @click="$router.push(link.route)">
<font-awesome-icon icon="fa-solid fa-question" />
</el-button>
</div>
</div>
<div class="bottom"></div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElTooltip, ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { ROUTE_CHAT_INDEX } from '@/router/constants';
export default defineComponent({
name: 'Navigator',
components: {
ElButton,
FontAwesomeIcon
},
data() {
return {
links: [
{
route: {
name: ROUTE_CHAT_INDEX
},
icon: 'fa-question'
},
{
route: {
name: 'midjourney-index'
},
icon: 'fa-question'
}
]
};
}
});
</script>
<style lang="scss" scoped>
.sidebar {
display: flex;
flex-direction: column;
align-items: flex-end;
.top {
display: flex;
flex-direction: column;
}
.bottom {
display: flex;
flex-direction: column;
}
}
</style>
-3
View File
@@ -1,3 +0,0 @@
<template>
<div>si</div>
</template>
+12 -4
View File
@@ -1,6 +1,8 @@
<template>
<div class="wrapper">
<div class="sidebar"></div>
<div class="left">
<navigator />
</div>
<div class="main">
<router-view />
</div>
@@ -10,10 +12,13 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { ElContainer, ElMain } from 'element-plus';
import Navigator from '@/components/common/Navigator.vue';
export default defineComponent({
name: 'LayoutMain',
components: {}
components: {
Navigator
}
});
</script>
@@ -22,11 +27,14 @@ export default defineComponent({
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.sidebar {
flex-direction: row;
.left {
width: 50px;
height: 100%;
background-color: aqua;
}
.main {
height: 100%;
flex: 1;
}
}
+3
View File
@@ -0,0 +1,3 @@
<template>
<div>chat index</div>
</template>