# GpPopupSwitchRole 切换角色
# 引入
import PressGpPopupSwitchRole from '@tencent/press-next/press-gp-popup-switch-role/press-gp-popup-switch-role';
# 代码演示
# 基础用法
# API
# Props
interface Props {
show?: boolean;
title?: string;
tip?: string;
roleList?: Array<{
rolehead?: string;
rolename?: string;
deviceDesc?: string;
}>;
currentRoleIndex?: number;
}
withDefaults(defineProps<Props>(), {
show: false,
title: '修改参赛角色',
tip: '在本平台,将使用以上所选角色报名参赛',
roleList: () => ([]),
currentRoleIndex: -1,
});
# Events
const emits = defineEmits<{
close: [];
confirm: [];
switchRole: [item: Record<string, any>, index: number];
}>();