feat-适配 windicss

This commit is contained in:
h_mo 2022-06-02 23:11:32 +08:00
parent 912baed91b
commit f9aea4253f
8 changed files with 241 additions and 22 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
/node_modules/
/dist/
/.idea/
/.hbuilderx/

View File

@ -45,15 +45,17 @@
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3040820220424001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3040820220424001",
"vue": "^3.2.33",
"vue-i18n": "^9.1.9",
"vuex": "^4.0.2"
"vue-i18n": "^9.1.9"
},
"devDependencies": {
"@dcasia/mini-program-tailwind-webpack-plugin": "^1.4.0",
"@dcloudio/types": "^2.6.4",
"@dcloudio/uni-automator": "3.0.0-alpha-3040820220424001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3040820220424001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3040820220424001",
"sass": "^1.52.1",
"typescript": "^4.6.3",
"vite": "^2.9.6"
"vite": "^2.9.6",
"vite-plugin-windicss": "^1.8.4"
}
}

187
pnpm-lock.yaml generated
View File

@ -1,6 +1,7 @@
lockfileVersion: 5.4
specifiers:
'@dcasia/mini-program-tailwind-webpack-plugin': ^1.4.0
'@dcloudio/types': ^2.6.4
'@dcloudio/uni-app': 3.0.0-alpha-3040820220424001
'@dcloudio/uni-app-plus': 3.0.0-alpha-3040820220424001
@ -19,9 +20,9 @@ specifiers:
'@dcloudio/vite-plugin-uni': 3.0.0-alpha-3040820220424001
typescript: ^4.6.3
vite: ^2.9.6
vite-plugin-windicss: ^1.8.4
vue: ^3.2.33
vue-i18n: ^9.1.9
vuex: ^4.0.2
dependencies:
'@dcloudio/uni-app': registry.npmmirror.com/@dcloudio/uni-app/3.0.0-alpha-3040820220424001_vue@3.2.36
@ -38,15 +39,16 @@ dependencies:
'@dcloudio/uni-quickapp-webview': registry.npmmirror.com/@dcloudio/uni-quickapp-webview/3.0.0-alpha-3040820220424001_vue@3.2.36
vue: registry.npmmirror.com/vue/3.2.36
vue-i18n: registry.npmmirror.com/vue-i18n/9.1.10_vue@3.2.36
vuex: registry.npmmirror.com/vuex/4.0.2_vue@3.2.36
devDependencies:
'@dcasia/mini-program-tailwind-webpack-plugin': registry.npmmirror.com/@dcasia/mini-program-tailwind-webpack-plugin/1.4.0
'@dcloudio/types': registry.npmmirror.com/@dcloudio/types/2.6.11
'@dcloudio/uni-automator': registry.npmmirror.com/@dcloudio/uni-automator/3.0.0-alpha-3040820220424001_vue@3.2.36
'@dcloudio/uni-cli-shared': registry.npmmirror.com/@dcloudio/uni-cli-shared/3.0.0-alpha-3040820220424001_vue@3.2.36
'@dcloudio/vite-plugin-uni': registry.npmmirror.com/@dcloudio/vite-plugin-uni/3.0.0-alpha-3040820220424001_vite@2.9.9+vue@3.2.36
typescript: registry.npmmirror.com/typescript/4.7.2
vite: registry.npmmirror.com/vite/2.9.9
vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.8.4_vite@2.9.9
packages:
@ -59,6 +61,12 @@ packages:
'@jridgewell/gen-mapping': registry.npmmirror.com/@jridgewell/gen-mapping/0.1.1
'@jridgewell/trace-mapping': registry.npmmirror.com/@jridgewell/trace-mapping/0.3.13
registry.npmmirror.com/@antfu/utils/0.5.2:
resolution: {integrity: sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@antfu/utils/-/utils-0.5.2.tgz}
name: '@antfu/utils'
version: 0.5.2
dev: true
registry.npmmirror.com/@babel/code-frame/7.16.7:
resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.16.7.tgz}
name: '@babel/code-frame'
@ -399,6 +407,20 @@ packages:
'@babel/helper-validator-identifier': registry.npmmirror.com/@babel/helper-validator-identifier/7.16.7
to-fast-properties: registry.npmmirror.com/to-fast-properties/2.0.0
registry.npmmirror.com/@dcasia/mini-program-tailwind-webpack-plugin/1.4.0:
resolution: {integrity: sha512-7ExS8pheqvNvUcdMdDlhAqsiPEhhjHsKGRAlXLfMm0zCe4Ii9iIokAZDUk5ajWMlBnkMWl7HN55Uo+wsrTxLaQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@dcasia/mini-program-tailwind-webpack-plugin/-/mini-program-tailwind-webpack-plugin-1.4.0.tgz}
name: '@dcasia/mini-program-tailwind-webpack-plugin'
version: 1.4.0
dependencies:
'@babel/core': registry.npmmirror.com/@babel/core/7.18.2
'@vivaxy/wxml': registry.npmmirror.com/@vivaxy/wxml/2.1.0
postcss: registry.npmmirror.com/postcss/8.4.14
webpack-sources: registry.npmmirror.com/webpack-sources/1.4.3
windicss-webpack-plugin: registry.npmmirror.com/windicss-webpack-plugin/1.7.3
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/@dcloudio/types/2.6.11:
resolution: {integrity: sha512-nTlGWxGAI0Xq7twTThdRJTJa0kBtNDyWACO2xYJyhVQXNKKIci1PwDuQmpvZCD1apbwWWVi+jm9RBMNsjAtxZw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@dcloudio/types/-/types-2.6.11.tgz}
name: '@dcloudio/types'
@ -1180,6 +1202,12 @@ packages:
vite: registry.npmmirror.com/vite/2.9.9
vue: registry.npmmirror.com/vue/3.2.36
registry.npmmirror.com/@vivaxy/wxml/2.1.0:
resolution: {integrity: sha512-xqnfAB58tl5SPyfkQjrn7D7nuvq7XV9um7QUsjCrvA4X6aZBxcau9sAM47LsQTOpJIVPzjaKIMvq3ul07yZlOA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vivaxy/wxml/-/wxml-2.1.0.tgz}
name: '@vivaxy/wxml'
version: 2.1.0
dev: true
registry.npmmirror.com/@vue/babel-helper-vue-transform-on/1.0.2:
resolution: {integrity: sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.0.2.tgz}
name: '@vue/babel-helper-vue-transform-on'
@ -1376,6 +1404,34 @@ packages:
name: '@vue/shared'
version: 3.2.36
registry.npmmirror.com/@windicss/config/1.8.4:
resolution: {integrity: sha512-i4fFGFfZoRess6WMkauykHC3PFd9xKYVx7lSuLfMK7sgo6x3+l4dY42GbsWMHyLqH1sTMfyt1LgfXSIKYJozSA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@windicss/config/-/config-1.8.4.tgz}
name: '@windicss/config'
version: 1.8.4
dependencies:
debug: registry.npmmirror.com/debug/4.3.4
jiti: registry.npmmirror.com/jiti/1.13.0
windicss: registry.npmmirror.com/windicss/3.5.4
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/@windicss/plugin-utils/1.8.4:
resolution: {integrity: sha512-DqJVwAfzlgd8nYSNlmhXOey32pI8UwH7QiOWdFS/AR2O/q9oLDGHDn97Its/kZdfoyhi8ylwZNP2Pk0H7cihhQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@windicss/plugin-utils/-/plugin-utils-1.8.4.tgz}
name: '@windicss/plugin-utils'
version: 1.8.4
dependencies:
'@antfu/utils': registry.npmmirror.com/@antfu/utils/0.5.2
'@windicss/config': registry.npmmirror.com/@windicss/config/1.8.4
debug: registry.npmmirror.com/debug/4.3.4
fast-glob: registry.npmmirror.com/fast-glob/3.2.11
magic-string: registry.npmmirror.com/magic-string/0.26.2
micromatch: registry.npmmirror.com/micromatch/4.0.5
windicss: registry.npmmirror.com/windicss/3.5.4
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/accepts/1.3.8:
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz}
name: accepts
@ -1438,6 +1494,12 @@ packages:
version: 3.0.1
engines: {node: '>=6.0.0'}
registry.npmmirror.com/big.js/5.2.2:
resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz}
name: big.js
version: 5.2.2
dev: true
registry.npmmirror.com/binary-extensions/2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz}
name: binary-extensions
@ -1737,6 +1799,13 @@ packages:
name: electron-to-chromium
version: 1.4.144
registry.npmmirror.com/emojis-list/3.0.0:
resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz}
name: emojis-list
version: 3.0.0
engines: {node: '>= 4'}
dev: true
registry.npmmirror.com/encodeurl/1.0.2:
resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz}
name: encodeurl
@ -2176,6 +2245,13 @@ packages:
has-symbols: registry.npmmirror.com/has-symbols/1.0.3
dev: true
registry.npmmirror.com/get-port/6.1.2:
resolution: {integrity: sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/get-port/-/get-port-6.1.2.tgz}
name: get-port
version: 6.1.2
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true
registry.npmmirror.com/get-stream/6.0.1:
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz}
name: get-stream
@ -2338,6 +2414,13 @@ packages:
version: 2.0.0
dev: true
registry.npmmirror.com/jiti/1.13.0:
resolution: {integrity: sha512-/n9mNxZj/HDSrincJ6RP+L+yXbpnB8FybySBa+IjIaoH9FIxBbrbRT5XUbe8R7zuVM2AQqNMNDDqz0bzx3znOQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jiti/-/jiti-1.13.0.tgz}
name: jiti
version: 1.13.0
hasBin: true
dev: true
registry.npmmirror.com/js-tokens/4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz}
name: js-tokens
@ -2371,6 +2454,12 @@ packages:
optionalDependencies:
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.10
registry.npmmirror.com/kolorist/1.5.1:
resolution: {integrity: sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/kolorist/-/kolorist-1.5.1.tgz}
name: kolorist
version: 1.5.1
dev: true
registry.npmmirror.com/licia/1.36.0:
resolution: {integrity: sha512-T1E+U8ObQmsVVTE4XN/OUUhwve8f9cDgKFFBOdJvuXIN1uZvKEQa0PP8Q+KSgSRCgUnp/gjvxGKskNt4K5pVkA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/licia/-/licia-1.36.0.tgz}
name: licia
@ -2383,6 +2472,17 @@ packages:
version: 2.0.5
engines: {node: '>=10'}
registry.npmmirror.com/loader-utils/2.0.2:
resolution: {integrity: sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz}
name: loader-utils
version: 2.0.2
engines: {node: '>=8.9.0'}
dependencies:
big.js: registry.npmmirror.com/big.js/5.2.2
emojis-list: registry.npmmirror.com/emojis-list/3.0.0
json5: registry.npmmirror.com/json5/2.2.1
dev: true
registry.npmmirror.com/loader-utils/3.2.0:
resolution: {integrity: sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/loader-utils/-/loader-utils-3.2.0.tgz}
name: loader-utils
@ -2401,6 +2501,12 @@ packages:
name: lodash.camelcase
version: 4.3.0
registry.npmmirror.com/lodash/4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz}
name: lodash
version: 4.17.21
dev: true
registry.npmmirror.com/magic-string/0.25.9:
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz}
name: magic-string
@ -2625,6 +2731,12 @@ packages:
version: 0.1.7
dev: true
registry.npmmirror.com/pathe/0.2.0:
resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pathe/-/pathe-0.2.0.tgz}
name: pathe
version: 0.2.0
dev: true
registry.npmmirror.com/picocolors/1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz}
name: picocolors
@ -2964,6 +3076,12 @@ packages:
version: 3.0.7
dev: true
registry.npmmirror.com/source-list-map/2.0.1:
resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-list-map/-/source-list-map-2.0.1.tgz}
name: source-list-map
version: 2.0.1
dev: true
registry.npmmirror.com/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz}
name: source-map-js
@ -3109,6 +3227,23 @@ packages:
engines: {node: '>= 0.8'}
dev: true
registry.npmmirror.com/vite-plugin-windicss/1.8.4_vite@2.9.9:
resolution: {integrity: sha512-LSZAO8BZn3x406GRbYX5t5ONXXJVdqiQtN1qrznLA/Dy5/NzZVhfcrL6N1qEYYO7HsCDT4pLAjTzObvDnM9Y8A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-windicss/-/vite-plugin-windicss-1.8.4.tgz}
id: registry.npmmirror.com/vite-plugin-windicss/1.8.4
name: vite-plugin-windicss
version: 1.8.4
peerDependencies:
vite: ^2.0.1
dependencies:
'@windicss/plugin-utils': registry.npmmirror.com/@windicss/plugin-utils/1.8.4
debug: registry.npmmirror.com/debug/4.3.4
kolorist: registry.npmmirror.com/kolorist/1.5.1
vite: registry.npmmirror.com/vite/2.9.9
windicss: registry.npmmirror.com/windicss/3.5.4
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/vite/2.9.9:
resolution: {integrity: sha512-ffaam+NgHfbEmfw/Vuh6BHKKlI/XIAhxE5QSS7gFLIngxg171mg1P3a4LSRME0z2ZU1ScxoKzphkipcYwSD5Ew==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite/-/vite-2.9.9.tgz}
name: vite
@ -3173,17 +3308,20 @@ packages:
'@vue/server-renderer': registry.npmmirror.com/@vue/server-renderer/3.2.36_vue@3.2.36
'@vue/shared': registry.npmmirror.com/@vue/shared/3.2.36
registry.npmmirror.com/vuex/4.0.2_vue@3.2.36:
resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz}
id: registry.npmmirror.com/vuex/4.0.2
name: vuex
version: 4.0.2
peerDependencies:
vue: ^3.0.2
registry.npmmirror.com/webpack-sources/1.4.3:
resolution: {integrity: sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/webpack-sources/-/webpack-sources-1.4.3.tgz}
name: webpack-sources
version: 1.4.3
dependencies:
'@vue/devtools-api': registry.npmmirror.com/@vue/devtools-api/6.1.4
vue: registry.npmmirror.com/vue/3.2.36
dev: false
source-list-map: registry.npmmirror.com/source-list-map/2.0.1
source-map: registry.npmmirror.com/source-map/0.6.1
dev: true
registry.npmmirror.com/webpack-virtual-modules/0.4.3:
resolution: {integrity: sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz}
name: webpack-virtual-modules
version: 0.4.3
dev: true
registry.npmmirror.com/which/2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which/-/which-2.0.2.tgz}
@ -3195,6 +3333,31 @@ packages:
isexe: registry.npmmirror.com/isexe/2.0.0
dev: true
registry.npmmirror.com/windicss-webpack-plugin/1.7.3:
resolution: {integrity: sha512-vESTMEUqzNlvOmnOCCxeqDkj1q2u69FfKMQHyTF9Y9tLJbWttEHgt+qSJZ3cYndUHRxbz06INanEyL08dQr79A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/windicss-webpack-plugin/-/windicss-webpack-plugin-1.7.3.tgz}
name: windicss-webpack-plugin
version: 1.7.3
dependencies:
'@windicss/plugin-utils': registry.npmmirror.com/@windicss/plugin-utils/1.8.4
debug: registry.npmmirror.com/debug/4.3.4
get-port: registry.npmmirror.com/get-port/6.1.2
loader-utils: registry.npmmirror.com/loader-utils/2.0.2
lodash: registry.npmmirror.com/lodash/4.17.21
pathe: registry.npmmirror.com/pathe/0.2.0
webpack-virtual-modules: registry.npmmirror.com/webpack-virtual-modules/0.4.3
windicss: registry.npmmirror.com/windicss/3.5.4
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/windicss/3.5.4:
resolution: {integrity: sha512-x2Iu0a69dtNiKHMkR886lx0WKbZI5GqvXyvGBCJ2VA6rcjKYjnzCA/Ljd6hNQBfqlkSum8J+qAVcCfLzQFI4rQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/windicss/-/windicss-3.5.4.tgz}
name: windicss
version: 3.5.4
engines: {node: '>= 12'}
hasBin: true
dev: true
registry.npmmirror.com/ws/8.7.0:
resolution: {integrity: sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ws/-/ws-8.7.0.tgz}
name: ws

View File

@ -1,5 +1,6 @@
<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import {onLaunch, onShow, onHide} from "@dcloudio/uni-app";
onLaunch(() => {
console.log("App Launch");
});
@ -10,4 +11,18 @@ onHide(() => {
console.log("App Hide");
});
</script>
<style></style>
<style lang="scss">
:not(not), ::before, ::after {
box-sizing: border-box;
}
/* 隐藏scroll-view的滚动条 */
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
</style>

View File

@ -1,5 +1,6 @@
import { createSSRApp } from "vue";
import App from "./App.vue";
import 'virtual:windi.css';
export function createApp() {
const app = createSSRApp(App);
return {

View File

@ -1,8 +1,8 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png" />
<view class="text-area">
<text class="title">{{ title }}</text>
<view class="text-area bg-rose-500 h-30rpx p-20rpx red" >
<text class="">{{ title }}</text>
</view>
</view>
</template>
@ -12,7 +12,10 @@ import { ref } from 'vue'
const title = ref('Hello')
</script>
<style>
<style lang="scss">
.red{
//color: green;
}
.content {
display: flex;
flex-direction: column;

View File

@ -1,7 +1,18 @@
import { defineConfig } from "vite";
import {defineConfig} from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import windicss from 'vite-plugin-windicss';
import MiniProgramTailwind from '@dcasia/mini-program-tailwind-webpack-plugin/rollup';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [uni()],
plugins: [
uni(),
windicss(),
MiniProgramTailwind({
// 是否开启自动转换至 rpx 单位值的功能
enableRpx: true,
// 设计稿的像素宽度值,该尺寸会影响 rpx 转换过程中的计算比率
designWidth: 350
}),
],
});

21
windi.config.ts Normal file
View File

@ -0,0 +1,21 @@
import {defineConfig} from 'vite-plugin-windicss';
// https://windicss.org/posts/attributify.html
export default defineConfig({
attributify: {
// prefix: ''
},
preflight: false,
prefixer: false,
extract: {
// 忽略部分文件夹
exclude: ['node_modules', '.git', 'dist', '.idea', '.vscode']
},
corePlugins: {
// 禁用掉在小程序环境中不可能用到的 plugins
container: false
},
alias: {},
plugins: [],
variants: {}
});