修复列表图标闪烁问题

This commit is contained in:
Peng-YM 2020-12-09 11:17:42 +08:00
parent 5f1b389548
commit 3dddc53ed3
5 changed files with 16 additions and 43 deletions

View File

@ -44,6 +44,9 @@ function initStore(store) {
store.dispatch("FETCH_ARTIFACTS").catch(() => { store.dispatch("FETCH_ARTIFACTS").catch(() => {
showError(`无法拉取配置列表!`); showError(`无法拉取配置列表!`);
}); });
store.dispatch("FETCH_SETTINGS").catch(() => {
showError(`无法拉取配置列表!`);
});
store.dispatch("FETCH_ENV").catch(() => { store.dispatch("FETCH_ENV").catch(() => {
showError(`无法获取当前运行环境!`); showError(`无法获取当前运行环境!`);
}); });

View File

@ -231,12 +231,12 @@ html, body {
} }
} }
.v-avatar { //.v-avatar {
.v-icon, .v-image, .v-responsive__content, img, svg { // .v-icon, .v-image, .v-responsive__content, img, svg {
-webkit-box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2); // -webkit-box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2); // box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
} // }
} //}
.v-list-item__icon { .v-list-item__icon {
margin: 12px 0; margin: 12px 0;
@ -350,12 +350,6 @@ html, body {
background-color: #fff; background-color: #fff;
margin-right: 17px; margin-right: 17px;
margin-bottom: 2px; margin-bottom: 2px;
&:hover {
background-color: #fff;
-webkit-box-shadow: 0 14px 26px -12px hsla(0, 0%, 60%, 0.42), 0 4px 23px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px hsla(0, 0%, 60%, 0.2);
box-shadow: 0 14px 26px -12px hsla(0, 0%, 60%, 0.42), 0 4px 23px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px hsla(0, 0%, 60%, 0.2);
}
} }
.v-toolbar__content { .v-toolbar__content {
@ -441,12 +435,6 @@ html, body {
.theme--light.v-btn:not(.v-btn--flat):not(.v-btn--text):not(.v-btn--outlined) { .theme--light.v-btn:not(.v-btn--flat):not(.v-btn--text):not(.v-btn--outlined) {
background-color: #999; background-color: #999;
//color: #fff;
&:hover {
background-color: #999;
color: #fff;
}
} }
.v-btn--contained { .v-btn--contained {

View File

@ -1,5 +1,5 @@
<template> <template>
<v-container> <v-container fluid>
<v-card> <v-card>
<v-card-title> <v-card-title>
同步配置 同步配置
@ -191,12 +191,6 @@ export default {
} }
} }
}, },
created() {
axios.get("/artifacts").then(resp => {
const {data} = resp.data;
this.artifacts = Object.keys(data).map(k => data[k]);
})
},
computed: { computed: {
artifacts() { artifacts() {
const items = this.$store.state.artifacts; const items = this.$store.state.artifacts;

View File

@ -1,5 +1,5 @@
<template> <template>
<v-container> <v-container fluid>
<v-card> <v-card>
<v-card-title> <v-card-title>
订阅 订阅

View File

@ -1,5 +1,5 @@
<template> <template>
<v-container> <v-container fluid>
<v-card> <v-card>
<v-card-title> <v-card-title>
GitHub 配置 GitHub 配置
@ -53,23 +53,10 @@ import {axios, showError} from "@/utils";
import {format} from "timeago.js"; import {format} from "timeago.js";
export default { export default {
data() {
return {
settings: {
gistToken: "",
githubUser: "",
syncTime: ""
}
}
},
created() {
axios.get(`/settings`).then(resp => {
this.settings.gistToken = resp.data.gistToken;
this.settings.githubUser = resp.data.githubUser;
this.settings.syncTime = resp.data.syncTime;
});
},
computed: { computed: {
settings() {
return this.$store.state.settings;
},
syncTime(){ syncTime(){
if (this.settings.syncTime) { if (this.settings.syncTime) {
return format(this.settings.syncTime, "zh_CN"); return format(this.settings.syncTime, "zh_CN");
@ -81,6 +68,7 @@ export default {
methods: { methods: {
save() { save() {
axios.patch(`/settings`, this.settings); axios.patch(`/settings`, this.settings);
this.$store.dispatch("FETCH_SETTINGS");
this.$store.commit("SET_SUCCESS_MESSAGE", `保存成功!`); this.$store.commit("SET_SUCCESS_MESSAGE", `保存成功!`);
}, },