- 移除了 @nuxt/image 模块引用- 更新了 x-image 组件,使用原生 img 标签替代 nuxt-img - 调整了 home 和 login 页面中的样式 - 更新了 realAuth 页面的路由和样式
34 lines
488 B
Vue
34 lines
488 B
Vue
<script setup>
|
|
import { showImagePreview } from 'vant';
|
|
const props = defineProps({
|
|
src: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
preview: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
|
|
})
|
|
|
|
const showImage = () => {
|
|
if (props.preview) {
|
|
showImagePreview([props.src]);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<img
|
|
loading="lazy"
|
|
v-bind="{ ...$props, ...$attrs }"
|
|
style="object-fit: cover"
|
|
@click="showImage"
|
|
:src="src"
|
|
/>
|
|
</template>
|
|
|
|
<style scoped>
|
|
</style> |