NativeScript-Vue 2.0: Back to the Vueture (Webinar) is now on YouTube
ConfirmDialog

This is an overview of the most common usage of ConfirmDialog. For more information about the available properties, methods, or events, head over to the complete API documentation for ConfirmDialog.

confirm() 方法显示确认消息和取消以及OK按钮。

该方法是该 dialogs 模块的一部分。


基本用途

confirm() 方法可在全局范围内使用。您可以在应用中的任何位置调用它。

confirm('Your message')
  .then(result => {
    console.log(result);
  });

配置对话框选项

confirm({
  title: "Your title",
  message: "Your message",
  okButtonText: "Your OK button text",
  cancelButtonText: "Your Cancel text"
}).then(result => {
  console.log(result);
});
Contributors