集成 tailwind css
This commit is contained in:
parent
a1ea37ae21
commit
8bd6f0706f
26
vue/cli.md
26
vue/cli.md
@ -45,3 +45,29 @@ yarn global add @vue/cli
|
|||||||
```bash
|
```bash
|
||||||
vue create hello-world
|
vue create hello-world
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 安装 TailWind CSS
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 安装依赖
|
||||||
|
yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest
|
||||||
|
|
||||||
|
# 生成配置文件
|
||||||
|
npx tailwindcss init -p
|
||||||
|
|
||||||
|
# 修改配置文件 tailwind.config.js
|
||||||
|
module.exports = {
|
||||||
|
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
||||||
|
theme: {
|
||||||
|
extend: {},
|
||||||
|
},
|
||||||
|
plugins: [],
|
||||||
|
}
|
||||||
|
|
||||||
|
# 创建 index.css
|
||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
|
# main.js 引入 index.css
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user