Skip to content

Commit 9f85c88

Browse files
committed
optimize: style
1 parent f42d57c commit 9f85c88

6 files changed

Lines changed: 33 additions & 19 deletions

File tree

src/assets/styles/realize/lin-variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $sidebar-background: #192a5e;
77
$navbar-height: 30px;
88
$navbar-padding: 20px;
99
$header-height: 72px;
10+
$reusetab-height: 29px;
1011

1112
$navbar-background: #BECCD8;
1213
$appmain-background: #F9FAFB;

src/components/layout/ReuseTab.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default {
164164
.swiper-slide {
165165
width: 126px;
166166
display: flex;
167-
height: 26px;
167+
height: $reusetab-height;
168168
flex-direction: column;
169169
justify-content: center;
170170
background-color: $reuse-tab-item-background;
@@ -175,7 +175,7 @@ export default {
175175
bottom: 0;
176176
left: 0;
177177
// width: calc(100% -40px);
178-
height: 26px;
178+
height: $reusetab-height;
179179
background: $header-background;
180180
font-size: 14px;
181181
color: #8c98ae;
@@ -186,7 +186,7 @@ export default {
186186
.reuse-tab-item {
187187
box-sizing: border-box;
188188
width: auto;
189-
height: 26px;
189+
height: $reusetab-height;
190190
width: 126px;
191191
display: flex;
192192
justify-content: center;

src/lin/plugins/axios.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ _axios.interceptors.request.use(
109109
// Add a response interceptor
110110
_axios.interceptors.response.use(
111111
async res => {
112-
let { error_code, message } = res.data // eslint-disable-line
112+
let { code, message } = res.data // eslint-disable-line
113113
if (res.status.toString().charAt(0) === '2') {
114114
return res.data
115115
}
116116
return new Promise(async (resolve, reject) => {
117117
const { params, url } = res.config
118118

119119
// refresh_token 异常,直接登出
120-
if (error_code === 10000 || error_code === 10100) {
120+
if (code === 10000 || code === 10100) {
121121
setTimeout(() => {
122122
store.dispatch('loginOut')
123123
const { origin } = window.location
@@ -126,7 +126,7 @@ _axios.interceptors.response.use(
126126
return resolve(null)
127127
}
128128
// 令牌相关,刷新令牌
129-
if (error_code === 10040 || error_code === 10041 || error_code === 10050 || error_code === 10051) {
129+
if (code === 10040 || code === 10041 || code === 10050 || code === 10051) {
130130
const cache = {}
131131
if (cache.url !== url) {
132132
cache.url = url
@@ -146,7 +146,7 @@ _axios.interceptors.response.use(
146146
// 这一次请求添加 params 参数:showBackend 为 true, 弹出后端返回错误信息
147147
if (params && !params.showBackend) {
148148
// 弹出前端自定义错误信息
149-
const errorArr = Object.entries(ErrorCode).filter(v => v[0] === error_code.toString())
149+
const errorArr = Object.entries(ErrorCode).filter(v => v[0] === code.toString())
150150
// 匹配到前端自定义的错误码
151151
if (errorArr.length > 0) {
152152
if (errorArr[0][1] !== '') {

src/views/admin/user/UserInfo.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@
4444
>
4545
<el-option v-for="item in groups" :key="item.id" :label="item.name" :value="item.id"> </el-option>
4646
</el-select> -->
47-
<el-checkbox-group v-model="form.group_ids">
48-
<el-checkbox v-for="item in groups" :key="item.id" :label="item.id">{{ item.name }}</el-checkbox>
47+
<el-checkbox-group v-model="form.group_ids" size="small" style="transform: translateY(5px);">
48+
<el-checkbox v-for="item in groups" :key="item.id" :label="item.id" border style="margin-left: 0">{{
49+
item.name
50+
}}</el-checkbox>
4951
</el-checkbox-group>
5052
</el-form-item>
5153
<el-form-item v-show="submit" class="submit">

src/views/home/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default {
8888
this.$refs.operate.style.height = '71px'
8989
})
9090
this.eventBus.$on('hasReuse', () => {
91-
this.$refs.operate.style.height = '45px'
91+
this.$refs.operate.style.height = '43px'
9292
})
9393
},
9494
inject: ['eventBus'],

src/views/log/Log.vue

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
</el-button>
1717
<el-dropdown-menu slot="dropdown">
1818
<el-dropdown-item :command="['全部人员']">全部人员</el-dropdown-item>
19-
<el-dropdown-item icon="el-icon-user-solid" v-for="(user, index) in users" :key="index" :command="[user]"
19+
<el-dropdown-item
20+
icon="el-icon-user-solid"
21+
v-for="(user, index) in users.items"
22+
:key="index"
23+
:command="[user]"
2024
>{{ user }}
2125
</el-dropdown-item>
2226
</el-dropdown-menu>
@@ -48,16 +52,19 @@
4852
</section>
4953
</article>
5054

51-
<el-divider></el-divider>
52-
<div class="more" :class="{ nothing: finished }">
53-
<i v-if="more" class="iconfont icon-loading"></i>
54-
<div v-show="!more && !finished" @click="nextPage">
55-
<span>查看更多</span> <i class="iconfont icon-gengduo" style="font-size:14px"></i>
56-
</div>
57-
<div v-if="finished">
58-
<span>{{ totalCount === 0 ? '暂无数据' : '没有更多数据了' }}</span>
55+
<div v-if="logs && logs.length">
56+
<el-divider></el-divider>
57+
<div class="more" :class="{ nothing: finished }">
58+
<i v-if="more" class="iconfont icon-loading"></i>
59+
<div v-show="!more && !finished" @click="nextPage">
60+
<span>查看更多</span> <i class="iconfont icon-gengduo" style="font-size:14px"></i>
61+
</div>
62+
<div v-if="finished">
63+
<span>{{ totalCount === 0 ? '暂无数据' : '没有更多数据了' }}</span>
64+
</div>
5965
</div>
6066
</div>
67+
<div class="nothing">暂无日志信息</div>
6168
</div>
6269
</div>
6370
</template>
@@ -423,6 +430,10 @@ export default {
423430
}
424431
}
425432
}
433+
.nothing {
434+
color: #45526b;
435+
font-size: 14px;
436+
}
426437
427438
@keyframes spin {
428439
from {

0 commit comments

Comments
 (0)