|
39 | 39 | <!-- image picker header -->
|
40 | 40 | <div class="header" :class="{ 'added': image.added }" >
|
41 | 41 | (<span v-html="image.progress"></span>%):
|
42 |
| - <a :href="image.url" target="_blank" v-if="image.url"> |
| 42 | + <a :href="imageUrl(image)" target="_blank" v-if="image.url"> |
43 | 43 | <span v-html="image.name"></span>
|
44 | 44 | </a>
|
45 | 45 | <span v-html="image.status" v-if="!image.url"></span>
|
46 | 46 | </div>
|
47 | 47 | <!-- image picker body -->
|
48 | 48 | <div class="picker-body">
|
49 |
| - <img :src="image.url" @click="fireDone(image)"/> |
| 49 | + <img :src="imageUrl(image)" @click="fireDone(image)"/> |
50 | 50 | <a class="after" v-if="image.url" @click="fireDone(image)">
|
51 | 51 | <div>
|
52 | 52 | <span class="stroke" v-if="!image.added">Add to Editor</span>
|
@@ -75,6 +75,8 @@ export default {
|
75 | 75 | components: { Modal },
|
76 | 76 | setup(props, { emit }) { //, { emit }) {
|
77 | 77 | /* View Methods */
|
| 78 | + const imageUrl = image => 'http://localhost:8080' + image.url |
| 79 | +
|
78 | 80 | const uploadFile = (e) => {
|
79 | 81 | v.hover = false
|
80 | 82 | emit('upload-error', null) // clear previous errors
|
@@ -243,7 +245,7 @@ export default {
|
243 | 245 |
|
244 | 246 | watch(() => v.hover, a => a ? null : emit('hover-stop'))
|
245 | 247 |
|
246 |
| - return { ...toRefs(v), uploadFile, fireDone } |
| 248 | + return { ...toRefs(v), imageUrl, uploadFile, fireDone } |
247 | 249 | }
|
248 | 250 | }
|
249 | 251 | </script>
|
|
0 commit comments