/// 读取文本文件内容(供前端原生对话框选择文件后使用) #[tauri::command] pub fn read_text_file(path: &str) -> Result { std::fs::read_to_string(path).map_err(|e| format!("无法读取文件: {}", e)) }