mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-31 19:17:48 +00:00
References - https://v3-migration.vuejs.org/breaking-changes/v-model - https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html
34 lines
588 B
Vue
34 lines
588 B
Vue
<script>
|
|
export default {
|
|
components: {},
|
|
props: {
|
|
url: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
show: false,
|
|
};
|
|
},
|
|
methods: {
|
|
onClose() {
|
|
this.show = false;
|
|
},
|
|
onClick() {
|
|
this.show = true;
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div class="image message-text__wrap">
|
|
<img :src="url" @click="onClick" @error="$emit('error')" />
|
|
<woot-modal v-model:show="show" full-width :on-close="onClose">
|
|
<img :src="url" class="modal-image skip-context-menu" />
|
|
</woot-modal>
|
|
</div>
|
|
</template>
|