2023-08-21 17:11:33 +08:00
|
|
|
|
# NextJs + NextUI
|
2023-08-21 16:14:04 +08:00
|
|
|
|
|
|
|
|
|
|
2023-08-21 17:11:33 +08:00
|
|
|
|
1. 为什么 `pages/*` 添加NextUI后无效
|
2023-08-21 16:14:04 +08:00
|
|
|
|
|
2023-08-21 17:11:33 +08:00
|
|
|
|
后来发现,在`pages/*`中使用tailwind也无效,原来原因是没有在css文件中引入tailwind
|
2023-08-21 16:14:04 +08:00
|
|
|
|
|
2023-08-21 17:11:33 +08:00
|
|
|
|
添加 `globals.css` 文件,在`_app.tsx`中导入
|
2023-08-21 16:14:04 +08:00
|
|
|
|
|
|
|
|
|
|
2023-08-21 17:11:33 +08:00
|
|
|
|
```css
|
|
|
|
|
@tailwind base;
|
|
|
|
|
@tailwind components;
|
|
|
|
|
@tailwind utilities;
|
|
|
|
|
```
|