mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
37 lines
645 B
Vue
37 lines
645 B
Vue
<template>
|
|
<div class="image message-text__wrap">
|
|
<img :src="url" @click="onClick" @error="onImgError()" />
|
|
<woot-modal :full-width="true" :show.sync="show" :on-close="onClose">
|
|
<img :src="url" class="modal-image skip-context-menu" />
|
|
</woot-modal>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
components: {},
|
|
props: {
|
|
url: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
show: false,
|
|
};
|
|
},
|
|
methods: {
|
|
onClose() {
|
|
this.show = false;
|
|
},
|
|
onClick() {
|
|
this.show = true;
|
|
},
|
|
onImgError() {
|
|
this.$emit('error');
|
|
},
|
|
},
|
|
};
|
|
</script>
|