feat: performance optimization.

pull/59/head
ruibaby 2019-11-23 21:50:55 +08:00
parent 34a01493a3
commit 7ecdd1d074
5 changed files with 9 additions and 21 deletions

View File

@ -212,9 +212,6 @@ export default {
default: true
}
},
created() {
this.loadSkeleton()
},
mounted() {
this.player = this.$refs.player
},

View File

@ -30,7 +30,7 @@
:paragraph="{ rows: 18 }"
>
<a-col :span="24">
<a-empty v-if="formattedDatas.length==0"/>
<a-empty v-if="formattedDatas.length==0" />
<div
v-else
class="attach-item"
@ -139,14 +139,11 @@ export default {
})
}
},
created() {
this.loadSkeleton()
this.loadAttachments()
},
watch: {
visible: function(newValue, oldValue) {
if (newValue) {
this.loadSkeleton()
this.loadAttachments()
}
}
},

View File

@ -28,7 +28,7 @@
:paragraph="{ rows: 18 }"
>
<a-col :span="24">
<a-empty v-if="attachments.length==0"/>
<a-empty v-if="attachments.length==0" />
<div
v-else
class="attach-item"
@ -129,14 +129,11 @@ export default {
uploadHandler: attachmentApi.upload
}
},
created() {
this.loadSkeleton()
this.loadAttachments()
},
watch: {
visible: function(newValue, oldValue) {
if (newValue) {
this.loadSkeleton()
this.loadAttachments()
}
}
},

View File

@ -163,9 +163,6 @@ export default {
}
}
},
created() {
this.loadSkeleton()
},
computed: {
...mapGetters(['options'])
},

View File

@ -31,7 +31,10 @@
<a-input v-model="selectedPost.url" />
</a-form-item>
<a-form-item label="访问密码:">
<a-input-password v-model="selectedPost.password" autocomplete="new-password"/>
<a-input-password
v-model="selectedPost.password"
autocomplete="new-password"
/>
</a-form-item>
<a-form-item label="发表时间:">
@ -261,10 +264,6 @@ export default {
default: false
}
},
created() {
this.loadSkeleton()
this.loadCategories()
},
watch: {
post(val) {
this.selectedPost = val
@ -287,6 +286,7 @@ export default {
visible: function(newValue, oldValue) {
if (newValue) {
this.loadSkeleton()
this.loadCategories()
}
}
},