创建Tauri项目
vue 2026-01-07 22:19:25

1、创建项目

C/C++ Code复制内容到剪贴板
  1. yarn create vite tray-admin-1  

 

success Installed "create-vite@8.2.0" with binaries:

      - create-vite

      - cva

  Select a framework:

  Vue

  Select a variant:

  JavaScript

  Use rolldown-vite (Experimental)?:

  No

  Install with yarn and start now?

  Yes

  Scaffolding project in /Users/yoyo/WorkFiles/Yoyos/工作资料/臻超科技/[D]代码仓库/tray-admin-1...

  Installing dependencies with yarn...

 

2、安装 Tauri CLI(开发依赖)

C/C++ Code复制内容到剪贴板
  1. yarn add -D @tauri-apps/cli  

 

3、初始化 Tauri

C/C++ Code复制内容到剪贴板
  1. yarn tauri init  

 

What is your app name? · tray-admin

What should the window title be? · tray-admin

? Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will b Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will be created? · ../dist

What is the url of your dev server? · http://localhost:3018

What is your frontend dev command? · yarn dev

What is your frontend build command? · yarn build

 

项目目录会出现:

tray-admin/

 ├─ src/

 ├─ src-tauri/

 │   ├─ src/main.rs

 │   ├─ tauri.conf.json

 

创建项目完成。

 

 

本文来自于:http://www.yoyo88.cn/study/vue/715.html

下一篇 返回列表
Powered by yoyo苏ICP备15045725号