初始提交:项目基础结构
- backend: FastAPI 后端服务 (Python) - frontend: React + Tauri 前端应用 - docker-compose.yml: 容器编排配置
This commit is contained in:
19
frontend/src-tauri/Cargo.toml
Normal file
19
frontend/src-tauri/Cargo.toml
Normal file
@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "track"
|
||||
version = "0.1.0"
|
||||
description = "工厂生产流转管理系统"
|
||||
authors = ["you"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "track_lib"
|
||||
crate-type = ["lib", "cdylib", "staticlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2", features = [] }
|
||||
tauri-plugin-shell = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
3
frontend/src-tauri/build.rs
Normal file
3
frontend/src-tauri/build.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
||||
9
frontend/src-tauri/capabilities/default.json
Normal file
9
frontend/src-tauri/capabilities/default.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"identifier": "default",
|
||||
"description": "默认权限配置",
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"shell:default"
|
||||
]
|
||||
}
|
||||
7
frontend/src-tauri/src/lib.rs
Normal file
7
frontend/src-tauri/src/lib.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
14
frontend/src-tauri/src/main.rs
Normal file
14
frontend/src-tauri/src/main.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
38
frontend/src-tauri/tauri.conf.json
Normal file
38
frontend/src-tauri/tauri.conf.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/nickolay/tauri-docs/refs/heads/v2/src/content/docs/_schema/config.schema.json",
|
||||
"productName": "track",
|
||||
"version": "0.1.0",
|
||||
"identifier": "com.track.production",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"beforeDevCommand": "npm run dev",
|
||||
"beforeBuildCommand": "npm run build"
|
||||
},
|
||||
"app": {
|
||||
"title": "生产流转",
|
||||
"windows": [
|
||||
{
|
||||
"title": "工厂生产流转管理系统",
|
||||
"width": 390,
|
||||
"height": 844,
|
||||
"resizable": true,
|
||||
"fullscreen": false
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user