1.拉去vite脚手架
npm create vite@latest
选择vue及javascript创建项目
2.安装tailwind
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
初始化tailwind.config.js
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
增加style.css
@tailwind base;
@tailwind components;
@tailwind utilities;