个人博客前端(Vue+Ts)
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
PeterAlbus 970e560e74 Optimized types and navbar. 12 months ago
.vscode Refactor the project. 1 year ago
build/vite/plugins Refactor the project. 1 year ago
public Refactor the project. 1 year ago
src Optimized types and navbar. 12 months ago
.env.development Refactor the project. 1 year ago
.env.production Refactor the project. 1 year ago
.env.test Refactor the project. 1 year ago
.eslintrc.cjs Refactor the project. 1 year ago
.gitignore Refactor the project. 1 year ago
LICENSE Refactor the project. 1 year ago
README.md Update README.md 1 year ago
auto-imports.d.ts Refactor the project. 1 year ago
components.d.ts Optimized photo wall and other details. 1 year ago
env.d.ts Use mavon-editor instead of v-md-editor to ensure the analysis of latex. 1 year ago
index.html Optimized photo wall and other details. 1 year ago
package.json Use mavon-editor instead of v-md-editor to ensure the analysis of latex. 1 year ago
pnpm-lock.yaml Use mavon-editor instead of v-md-editor to ensure the analysis of latex. 1 year ago
tsconfig.app.json Refactor the project. 1 year ago
tsconfig.config.json Refactor the project. 1 year ago
tsconfig.json Refactor the project. 1 year ago
tsconfig.vitest.json Refactor the project. 1 year ago
vite.config.ts Refactor the project. 1 year ago

README.md

PeterAlbusBlogHikari

完全重构

在经历了从Vue + Webpack到Vite + Ts的转变后项目再一次进行了重构。

此次主要优化接口管理及前后端对接部分,对接口进行了统一管理。

此版本命名为Hikari——光。

以下为项目介绍。

Dependencies / 包含库

  • Vue3 + TypeScript + Less + Vue-Router + ESlint + Axios + Pinia
  • Element-Plus 2.2.15 + ElementPlus-Icons
  • moment / nprogress / qs

Development Standard / 开发规范

  • 页面SFC存放于views文件夹内组件存放于components。
  • 接口url及请求相关方法放置于services文件夹内。不同环境通过VITE_APP_ENV识别。

IntelliJ IDEA / WebStorm

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS / .vue 文件的类型支持

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration / 自定义配置

See Vite Configuration Reference.

Project Setup / 安装依赖

npm install
or pnpm install

Compile and Hot-Reload for Development / 编译并启动热更新服务器

npm run dev
or pnpm run dev

Type-Check, Compile and Minify for Production / 类型检查并编译

npm run build
or pnpm run build

Run Unit Tests with Vitest / 单元测试

npm run test:unit
or pnpm run test:unit

Lint with ESLint / 使用ESLint

npm run lint
or pnpm run lint