我在Vetur中使用VSCode。这是我的代码:
alert({
title: 'Success!',
message: 'Account created successfully',
okButtonText: 'Okay'
}).then(() => {
console.log('Alert dialog closed!');
})
我收到错误Property 'then' does not exist on type 'void' Vetur(2339)
我只是按照此处的文档中的说明进行操作:https://nativescript-vue.org/en/docs/elements/dialogs/alert/
知道发生了什么吗?
请确保
import { alert } from 'tns-core-modules/ui/dialogs