# vueShare **Repository Path**: zjh1023/vue-share ## Basic Information - **Project Name**: vueShare - **Description**: 使用vue3.0,简单局域网文件传输项目的前端部分 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-08 - **Last Updated**: 2025-04-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: Vue, TypeScript ## README # vueShare ——局域网文件分享的前端项目 这个项目使用的是 Vue 3 in Vite,typescript ## 1. 推荐的 IDE Setup [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). ## 2. TS对导入的`.vue`的类型支持 默认情况下,TypeScript 无法处理 `.vue` 导入的类型信息,因此我们将 `tsc` CLI 替换为 `vue-tsc` 进行类型检查。在编辑器中,我们需要 [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) 来使 TypeScript 语言服务能够识别 `.vue` 类型。 #### 重点:`.js`文件是编译时自动生成的,不需要手动更改,需要更改的是`ts`文件 ## 3. 项目设置 ```sh npm install ``` 会根据项目里的config文件自动下载安装所需要的所有包 ### 开发过程中的编译和热重载 ```sh npm run dev ``` 在`vite.config.ts`中已经设置了后端项目的代理,可以实现热重载。 ### 将项目打包到dist文件夹下(包括类型检查、编译和压缩) ```sh npm run build ``` 对本项目来说,打包后的文件为`/dist/index.html`和`/dist/assets`下的css和js文件 ## 4. 本项目的简略说明 项目内容文件在`/src`下,`/src/views`里是具体页面,其中`DetaiView.vue`并没有被使用。 `/src/router`里是路由设置,`/src/layout`是侧边栏。 ### Run Unit Tests with [Vitest](https://vitest.dev/) ```sh npm run test:unit ``` ### Run End-to-End Tests with [Playwright](https://playwright.dev) ```sh # Install browsers for the first run npx playwright install # When testing on CI, must build the project first npm run build # Runs the end-to-end tests npm run test:e2e # Runs the tests only on Chromium npm run test:e2e -- --project=chromium # Runs the tests of a specific file npm run test:e2e -- tests/example.spec.ts # Runs the tests in debug mode npm run test:e2e -- --debug ``` ### Lint with [ESLint](https://eslint.org/) ```sh npm run lint ```