diff --git a/AGENTS.md b/AGENTS.md index 448d288..2201cce 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ YGChatCS 是一个基于 uni-app + Vue 3 的多端应用,当前配置重点面 ## 技术栈 -- 框架:uni-app 3、Vue 3、Vite 5。 +- 框架:uni-app 3、Vue 3、Vite 5、Tailwindcss。 - 状态管理:Pinia 3,使用 `pinia-plugin-unistorage` 做持久化。 - 样式:SCSS,公共工具类在 `src/static/scss/`,全局变量在 `src/uni.scss`。 - 多端:保留 H5、App、各类小程序脚本;当前微信小程序配置最完整。 @@ -22,8 +22,6 @@ YGChatCS 是一个基于 uni-app + Vue 3 的多端应用,当前配置重点面 yarn install yarn dev:mp-weixin yarn build:mp-weixin -yarn dev:h5 -yarn build:h5 yarn switch-client zhinian ``` diff --git a/package.json b/package.json index 0ea18b2..011c560 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "YGChatCS", "version": "1.0.0", "scripts": { + "postinstall": "node ./node_modules/weapp-tailwindcss/bin/weapp-tailwindcss.js patch", "dev:app": "uni -p app", "dev:app-android": "uni -p app-android", "dev:app-ios": "uni -p app-ios", @@ -70,10 +71,13 @@ "@dcloudio/uni-cli-shared": "3.0.0-4070620250821001", "@dcloudio/uni-stacktracey": "3.0.0-4070620250821001", "@dcloudio/vite-plugin-uni": "3.0.0-4070620250821001", + "@tailwindcss/postcss": "^4.3.0", "@vue/runtime-core": "^3.4.21", "@vue/tsconfig": "^0.1.3", "sass": "1.58.3", - "vite": "5.2.8" + "tailwindcss": "^4.3.0", + "vite": "5.2.8", + "weapp-tailwindcss": "^4.12.0" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..c5033f2 --- /dev/null +++ b/src/app.css @@ -0,0 +1,7 @@ +@import "weapp-tailwindcss/index.css"; + +@source "./**/*.{vue,js,ts}"; +@source not "./uni_modules"; +@source not "../dist"; +@source not "../node_modules"; +@source not "../docs"; diff --git a/src/main.js b/src/main.js index 5841745..58715b8 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,5 @@ import App from "./App"; +import "./app.css"; import share from "./utils/share"; // #ifndef VUE3 @@ -32,4 +33,4 @@ export function createApp() { pinia, }; } -// #endif \ No newline at end of file +// #endif diff --git a/src/pages/test/index.vue b/src/pages/test/index.vue index f76369a..1469ce5 100644 --- a/src/pages/test/index.vue +++ b/src/pages/test/index.vue @@ -1,8 +1,8 @@