# GpPopupImage 查看图片
# 引入
import PressGpPopupImage from '@tencent/press-next/press-gp-popup-image/press-gp-popup-image';
# 代码演示
# 基础用法
<PressGpPopupImage
:show="dialog.show"
:image="dialog.image"
title="比赛群"
@cancel="cancel"
/>
const dialog = ref({
show: true,
image: 'https://image-1251917893.file.myqcloud.com/TIP-igameweb/match-web/img/match-wchat-qr.png',
});
const cancel = () => {
dialog.value.show = false;
};
# API
# Props
interface Props {
tip?: string;
image: string;
show?: boolean;
title?: string;
showClose?: boolean;
}
withDefaults(defineProps<Props>(), {
tip: '长按图片或截图保存',
image: '',
show: false,
title: '',
showClose: true,
});
# Events
const emits = defineEmits<{
cancel: []
}>();