add framework
This commit is contained in:
1 parent
affd47193c
commit
3638ab93c3
6 files changed
+134
-12
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -1,3 +0,0 @@
|
||||
<template>
|
||||
<div>si</div>
|
||||
</template>
|
||||
+12
-4
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>chat index</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user