Skip to content

Commit

Permalink
Merge branch 'master' of github.com:szuprefix/vue-django
Browse files Browse the repository at this point in the history
  • Loading branch information
szuprefix committed Aug 17, 2020
2 parents b63f751 + f154724 commit d9884c2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/media/ImageInput.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<image-upload v-bind="[$attrs, $pros, field]" :context="context" :bucket="$store.state.qcloud.cos.bucket"
<image-upload v-bind="[$attrs, $pros, field]" :context="context" :bucket="bucket"
:urls="imageUrls" @success="onSuccess" @remove="onRemove">
</image-upload>
</template>
<script>
import ImageUpload from './qcloud/ImageUpload.vue'
import {template} from 'lodash'
import {template, get} from 'lodash'
export default{
props: {
value: [String, Array],
Expand All @@ -18,7 +18,7 @@
}
},
created () {
// console.log(this.$store.state.qcloud.cos.bucket)
console.log(this.bucket)
},
components: {ImageUpload},
methods: {
Expand All @@ -45,6 +45,10 @@
return [v]
}
return v
},
bucket () {
let state= this.$store.state
return get(state, 'party.settings.media.qcloud.cos.bucket') || get(state, 'qcloud.cos.bucket')
}
}
}
Expand Down

0 comments on commit d9884c2

Please sign in to comment.