// 获取姓名
function getName () {
const name = data.decode.name
return name
}
onMounted(() => { (window as any).getName = () => { return getName() } })
控制台调用
onMounted(() => { (window as any).getName = () => { return getName() } })
控制台调用