Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix: (issue #394) 图片动态 图片未上传完毕时发布按钮置灰
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Jun 15, 2018
1 parent 394c2be commit 42a6df7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/page/post/PostImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,10 @@ export default {
computed: {
...mapGetters(["compose", "composePhoto"]),
disabled() {
const imageAllCompleted = this.composePhoto.some(img => {
return !!img.id;
});
return !(
this.composePhoto.length > 0 ||
(this.compose.length > 0 && imageAllCompleted)
const imageAllCompleted = !this.composePhoto.some(
img => Object.keys(img).length === 0
);
return !(imageAllCompleted && this.composePhoto.length > 0);
}
},
methods: {
Expand Down

0 comments on commit 42a6df7

Please sign in to comment.