no message

This commit is contained in:
kuaifan 2022-03-04 17:32:20 +08:00
parent 71cb8612d8
commit 95a3aa7290
3 changed files with 17 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<div class="project-title">
<h1>{{projectData.name}}</h1>
<label v-if="projectData.top_at" class="top-text">{{$L('置顶')}}</label>
<div v-if="projectLoad > 0" class="project-load"><Loading/></div>
<div v-if="loading" class="project-load"><Loading/></div>
</div>
<ul class="project-icons">
<li class="project-avatar" @click="projectDropdown('user')">
@ -464,6 +464,8 @@ export default {
ProjectLog, TaskArchived, TaskRow, Draggable, TaskAddSimple, UserInput, TaskAdd, TaskPriority},
data() {
return {
loading: false,
nowTime: $A.Time(),
nowInterval: null,
@ -791,6 +793,16 @@ export default {
projectData() {
this.sortData = this.getSort();
},
projectLoad(n) {
this._loadTimeout && clearTimeout(this._loadTimeout)
if (n > 0) {
this._loadTimeout = setTimeout(() => {
this.loading = true;
}, 1000)
} else {
this.loading = false;
}
},
projectId: {
handler(val) {
if (val > 0) {

View File

@ -671,7 +671,9 @@ export default {
project_id,
},
}).then(result => {
state.projectLoad--;
setTimeout(() => {
state.projectLoad--;
}, 10)
dispatch("saveProject", result.data);
resolve(result)
}).catch(e => {

View File

@ -9,6 +9,7 @@
animation: rotate 2s linear infinite;
.common-path {
fill: none;
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
stroke-linecap: round;
@ -17,7 +18,6 @@
}
@keyframes rotate {
to {
-webkit-transform: rotate(1turn);
transform: rotate(1turn)
}
}