Merge branch 'base' into i18n

This commit is contained in:
菲鸽 2024-04-12 15:13:18 +08:00
commit c40f533a28
2 changed files with 10 additions and 0 deletions

View File

@ -117,6 +117,7 @@
"@uni-helper/vite-plugin-uni-manifest": "^0.2.3", "@uni-helper/vite-plugin-uni-manifest": "^0.2.3",
"@uni-helper/vite-plugin-uni-pages": "^0.2.15", "@uni-helper/vite-plugin-uni-pages": "^0.2.15",
"@uni-helper/vite-plugin-uni-platform": "^0.0.4", "@uni-helper/vite-plugin-uni-platform": "^0.0.4",
"@unocss/preset-legacy-compat": "^0.59.1",
"@vue/runtime-core": "^3.3.13", "@vue/runtime-core": "^3.3.13",
"@vue/tsconfig": "^0.1.3", "@vue/tsconfig": "^0.1.3",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",

View File

@ -15,6 +15,9 @@ import {
transformerAttributify, transformerAttributify,
} from 'unocss-applet' } from 'unocss-applet'
// @see https://unocss.dev/presets/legacy-compat
import presetLegacyCompat from '@unocss/preset-legacy-compat'
const isH5 = process.env?.UNI_PLATFORM === 'h5' const isH5 = process.env?.UNI_PLATFORM === 'h5'
const isMp = process.env?.UNI_PLATFORM?.startsWith('mp') ?? false const isMp = process.env?.UNI_PLATFORM?.startsWith('mp') ?? false
@ -44,6 +47,12 @@ export default defineConfig({
'vertical-align': 'middle', 'vertical-align': 'middle',
}, },
}), }),
// 将颜色函数 (rgb()和hsl()) 从空格分隔转换为逗号分隔更好的兼容性app端example
// `rgb(255 0 0)` -> `rgb(255, 0, 0)`
// `rgba(255 0 0 / 0.5)` -> `rgba(255, 0, 0, 0.5)`
presetLegacyCompat({
commaStyleColorFunction: true,
}) as Preset,
], ],
/** /**
* *