perf:统一layout宽度

This commit is contained in:
Xwen
2023-12-20 21:52:42 +08:00
parent 8f81888784
commit 64cdcea6b9
7 changed files with 203 additions and 203 deletions

View File

@@ -1,24 +1,20 @@
<template class="back-color">
<div class="content-main">
<RouterView />
</div>
</template>
<style scoped>
.body-main {
min-height: 10rem;
min-width: 10rem;
background-color:#F0F2F5;
background-color: #f0f2f5;
}
.content-main {
margin: 0 auto;
display: flex;
justify-content: center;
width: 1300px;
min-height: 1150px;
}
</style>

View File

@@ -123,7 +123,7 @@ const isLogin = getToken("AccessToken") ? true : false;
<style scoped lang="scss">
.header {
padding: 0 100px;
width: 1200px;
width: 1300px;
display: flex;
align-items: center;
justify-content: space-between;

View File

@@ -44,12 +44,10 @@ const useUserStore = defineStore("user", {
const res = response.data;
const user = res.user;
console.log(user, "user");
const avatar =
user.icon == "" || user.icon == null
? "/favicon.ico"
: import.meta.env.VITE_APP_BASEAPI + "/file/" + user.icon;
console.log(avatar, "avatar");
if (res.roleCodes && res.roleCodes.length > 0) {
// 验证返回的roles是否是一个非空数组
this.roles = res.roleCodes;

View File

@@ -1,5 +1,5 @@
<template>
<div style="width: 90%; min-width: 1200px">
<div class="article-box">
<!-- <div style="width: 1200px;"> -->
<el-row :gutter="20" class="top-div">
<el-col :span="5">
@@ -383,6 +383,9 @@ watch(
);
</script>
<style scoped>
.article-box {
width: 100%;
height: 100%;
.comment {
min-height: 40rem;
}
@@ -467,4 +470,5 @@ h2 {
.breadcrumb {
margin-bottom: 10px;
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div style="width: 1200px" class="body-div">
<div class="discuss-box">
<div class="header">
<el-form :inline="true">
<el-form-item label="标题:">
@@ -24,7 +24,7 @@
@click="enterEditArticle"
type="primary"
v-hasPer="['bbs:discuss:add']"
>分享</el-button
>发布主题</el-button
>
<el-dropdown>
<span class="el-dropdown-link">
@@ -183,14 +183,17 @@ watch(
{ immediate: true }
);
</script>
<style scoped>
<style scoped lang="scss">
.discuss-box {
width: 100%;
height: 100%;
.el-pagination {
margin: 2rem 0rem 2rem 0rem;
justify-content: right;
}
.body-div {
/* .body-div {
min-height: 1000px;
}
} */
.el-dropdown-link {
cursor: pointer;
color: var(--el-color-primary);
@@ -244,4 +247,5 @@ watch(
.el-divider {
margin: 0.5rem 0;
}
}
</style>

View File

@@ -44,12 +44,6 @@
</div>
</div>
</div>
<!-- <h2> 登录-欢迎</h2>
<el-input v-model="loginForm.userName" placeholder="用户名" />
<el-input v-model="loginForm.password" placeholder="密码" show-password />
<el-button class="login-btn" type="primary" @click="login">登录</el-button>
<br>
<el-button class="login-btn" type="primary" @click="guestlogin">游客临时登录</el-button> -->
</template>
<script setup>
import { ref, reactive } from "vue";

View File

@@ -1,5 +1,5 @@
<template>
<div style="width: 1200px">
<div class="home-box">
<el-row :gutter="20" class="top-div">
<el-col :span="17">
<div class="scrollbar">
@@ -157,7 +157,10 @@ const statisOptions = computed(() => {
};
});
</script>
<style scoped>
<style scoped lang="scss">
.home-box {
width: 100%;
height: 100%;
.introduce {
color: rgba(0, 0, 0, 0.45);
font-size: small;
@@ -201,4 +204,5 @@ const statisOptions = computed(() => {
width: 100%;
height: 300px;
}
}
</style>