From 3f0f5e05ede8bf44826c0955084706033673d9fd Mon Sep 17 00:00:00 2001 From: cleveng Date: Tue, 20 Aug 2024 16:59:00 +0800 Subject: [PATCH] Update dialog.mdx fix ask / message argument type name error --- src/content/docs/zh-cn/plugin/dialog.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/zh-cn/plugin/dialog.mdx b/src/content/docs/zh-cn/plugin/dialog.mdx index 467d6b9969..b167caa9b4 100644 --- a/src/content/docs/zh-cn/plugin/dialog.mdx +++ b/src/content/docs/zh-cn/plugin/dialog.mdx @@ -96,7 +96,7 @@ import { ask } from '@tauri-apps/plugin-dialog'; // 创建 Yes/No 对话框 const answer = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', - type: 'warning', + kind: 'warning', }); console.log(answer); @@ -115,7 +115,7 @@ import { confirm } from '@tauri-apps/plugin-dialog'; // Creates a confirmation Ok/Cancel dialog const confirmation = await confirm( 'This action cannot be reverted. Are you sure?', - { title: 'Tauri', type: 'warning' } + { title: 'Tauri', kind: 'warning' } ); console.log(confirmation); @@ -132,7 +132,7 @@ console.log(confirmation); import { message } from '@tauri-apps/plugin-dialog'; // Shows message -await message('File not found', { title: 'Tauri', type: 'error' }); +await message('File not found', { title: 'Tauri', kind: 'error' }); ``` {/* OPEN */}