Files
regulatory-management-system/开发日志.md
2025-10-24 11:45:27 +08:00

38 lines
694 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 前端
## 问题
### vue3 引入@路径
#### 引入path模块问题
node.js 自带的path模块是JavaScript代码要引入ts文件需要安装@type/node模块
```shell
npm install @types/node --save-dev
```
之后就可以加载path。在 vite.config.ts 中加上
```typescript
import path from "path";
resolve: {
//配置别名
alias: [
{
find: /^~/,
replacement: "",
},
{
find: "@",
replacement: path.resolve( __dirname, "src" ),
},
],
},
```
## 组件
### pdf预览组件
使用