fix(unocss): 处理unocss在小程序中报错
This commit is contained in:
parent
d17e8fa76d
commit
3c6321ad88
@ -35,5 +35,12 @@ module.exports = {
|
|||||||
ignoreUnits: ['rpx'],
|
ignoreUnits: ['rpx'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
// 处理小程序page标签不认识的问题
|
||||||
|
'selector-type-no-unknown': [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
ignoreTypes: ['page'],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||||
"@typescript-eslint/parser": "^6.15.0",
|
"@typescript-eslint/parser": "^6.15.0",
|
||||||
"@uni-helper/uni-app-types": "^0.5.12",
|
"@uni-helper/uni-app-types": "^0.5.12",
|
||||||
|
"@uni-helper/unocss-preset-uni": "^0.2.5",
|
||||||
"@vue/runtime-core": "^3.2.45",
|
"@vue/runtime-core": "^3.2.45",
|
||||||
"@vue/tsconfig": "^0.1.3",
|
"@vue/tsconfig": "^0.1.3",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
|
888
pnpm-lock.yaml
generated
888
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,15 +2,17 @@
|
|||||||
import {
|
import {
|
||||||
defineConfig,
|
defineConfig,
|
||||||
presetAttributify,
|
presetAttributify,
|
||||||
presetUno,
|
|
||||||
presetIcons,
|
presetIcons,
|
||||||
transformerDirectives,
|
transformerDirectives,
|
||||||
transformerVariantGroup,
|
transformerVariantGroup,
|
||||||
} from 'unocss'
|
} from 'unocss'
|
||||||
|
|
||||||
|
import { presetUni } from '@uni-helper/unocss-preset-uni'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
presets: [
|
presets: [
|
||||||
presetUno(),
|
// @ts-expect-error 类型兼容性
|
||||||
|
presetUni(),
|
||||||
// 支持css class属性化,eg: `<button bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600" text="sm white">attributify Button</button>`
|
// 支持css class属性化,eg: `<button bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600" text="sm white">attributify Button</button>`
|
||||||
presetAttributify(),
|
presetAttributify(),
|
||||||
// 支持图标,需要搭配图标库,eg: @iconify-json/carbon, 使用 `<button class="i-carbon-sun dark:i-carbon-moon" />`
|
// 支持图标,需要搭配图标库,eg: @iconify-json/carbon, 使用 `<button class="i-carbon-sun dark:i-carbon-moon" />`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user