diff --git a/package.json b/package.json index 3650576..986f20d 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev:mp-lark": "uni -p mp-lark", "dev:mp-qq": "uni -p mp-qq", "dev:mp-toutiao": "uni -p mp-toutiao", - "dev:mp-weixin": "pnpm git:hooks && uni -p mp-weixin --devtools", + "dev:mp-weixin": "pnpm git:hooks && uni -p mp-weixin", "dev:quickapp-webview": "uni -p quickapp-webview", "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei", "dev:quickapp-webview-union": "uni -p quickapp-webview-union", @@ -64,8 +64,8 @@ "@dcloudio/uni-automator": "3.0.0-alpha-4020520240808001", "@dcloudio/uni-cli-shared": "3.0.0-alpha-4020520240808001", "@dcloudio/uni-stacktracey": "3.0.0-alpha-4020520240808001", - "@dcloudio/uni-vue-devtools": "3.0.0-alpha-4020520240808001", "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4020520240808001", + "@egoist/tailwindcss-icons": "^1.8.1", "@iconify/json": "^2.2.238", "@types/crypto-js": "^4.2.2", "@types/lodash-es": "^4.17.12", diff --git a/src/components/Iconify/index.vue b/src/components/Iconify/index.vue index 40b470f..b5e8706 100644 --- a/src/components/Iconify/index.vue +++ b/src/components/Iconify/index.vue @@ -1,39 +1,34 @@ - diff --git a/src/pages/demo/index.vue b/src/pages/demo/index.vue index e4a9905..7d0037f 100644 --- a/src/pages/demo/index.vue +++ b/src/pages/demo/index.vue @@ -11,9 +11,11 @@ const demo = ref('Demo'); iconify 组件 - - - + + + + + diff --git a/tailwind.config.js b/tailwind.config.js index 1f23d6e..99643e6 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,3 +1,6 @@ +import { getIconCollections, iconsPlugin } from '@egoist/tailwindcss-icons'; +import { isMp } from './build/platform'; + /** @type {import('tailwindcss').Config} */ export default { content: ['./public/index.html', './src/**/*.{html,js,ts,jsx,tsx,vue}'], @@ -5,7 +8,11 @@ export default { extend: {}, }, corePlugins: { - preflight: false, + // 小程序去使用 h5 的 preflight 和响应式 container 没有意义 + preflight: !isMp, + container: !isMp, }, - plugins: [], + plugins: [iconsPlugin({ + collections: getIconCollections(['mdi', 'svg-spinners']), + })], };