tiny-vue/examples/sites/demos/mobile-first/app/image/load-event.vue

24 lines
439 B
Vue

<template>
<tiny-image :src="url" @load="loadHandler"></tiny-image>
</template>
<script>
import { Image, Modal } from '@opentiny/vue'
export default {
components: {
TinyImage: Image
},
data() {
return {
url: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/1.jpg`
}
},
methods: {
loadHandler() {
Modal.message({ message: '加载成功触发事件', status: 'info' })
}
}
}
</script>