Fixed serialization issue for snake_case to CamelCase.
This commit is contained in:
parent
ca061b9c1a
commit
104704cb88
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
//! ```rust,no_run
|
||||
//! use tauri_api::dialog::open;
|
||||
//!
|
||||
//! let path = open.await;
|
||||
//! let path = open(None).await;
|
||||
//! ```
|
||||
use serde::Serialize;
|
||||
use std::path::PathBuf;
|
||||
|
@ -61,6 +61,7 @@ impl MessageDialogOptions {
|
|||
#[derive(Serialize)]
|
||||
pub struct OpenDialogOptions {
|
||||
/// Initial directory or file path.
|
||||
#[serde(rename(serialize = "defaultPath"))]
|
||||
pub default_path: Option<PathBuf>,
|
||||
|
||||
/// Whether the dialog is a directory selection or not.
|
||||
|
@ -101,6 +102,7 @@ pub struct SaveDialogOptions {
|
|||
/// If it's not a directory path, the dialog interface will change to that folder.
|
||||
/// If it's not an existing directory, the file name will be set to the dialog's
|
||||
/// file name input and the dialog will be set to the parent folder.
|
||||
#[serde(rename(serialize = "defaultPath"))]
|
||||
pub default_path: Option<PathBuf>,
|
||||
|
||||
/// The filters of the dialog.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue