Skip to content

Commit b7dae95

Browse files
committed
Merge branch 'master' of https://github.com/didi/mpx
2 parents 629c46c + 167e809 commit b7dae95

70 files changed

Lines changed: 2529 additions & 307 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs-vitepress/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const sidebar: ExtendedSidebar = {
118118
{ text: '跨端样式', link: '/guide/rn/style' },
119119
{ text: '应用能力', link: '/guide/rn/application-api' },
120120
{ text: '混合编写 RN', link: '/guide/rn/hybrid-with-react-native' },
121+
{ text: '使用原子类', link: '/guide/rn/rn-unocss' }
121122
],
122123
},
123124
{

docs-vitepress/api/compile.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ module.exports = defineConfig({
18801880

18811881
## MpxUnocssBase
18821882

1883-
Mpx 内置的 unocss preset,继承自 `@unocss/preset-uno`,并额外提供小程序原子类的预设样式,安装示例如下:
1883+
Mpx 内置的 unocss preset,继承自 `@unocss/preset-wind3`,并额外提供小程序原子类的预设样式,安装示例如下:
18841884

18851885
```bash
18861886
npm install -D @mpxjs/unocss-base
@@ -1891,11 +1891,11 @@ yarn add -D @mpxjs/unocss-base
18911891
使用示例如下:
18921892

18931893
```js
1894-
// uno.config.js
1895-
const { defineConfig } = require('unocss')
1896-
const presetMpx = require('@mpxjs/unocss-base')
1894+
// uno.config.mjs
1895+
import { defineConfig } from 'unocss'
1896+
import presetMpx from '@mpxjs/unocss-base'
18971897

1898-
module.exports = defineConfig({
1898+
export default defineConfig({
18991899
presets: [
19001900
presetMpx({
19011901
// ...
@@ -1914,10 +1914,10 @@ yarn add -D @mpxjs/unocss-base
19141914
同比换算1rem = 37.5rpx适配小程序
19151915
```js
19161916
// uno.config.js
1917-
const { defineConfig } = require('unocss')
1918-
const presetMpx = require('@mpxjs/unocss-base')
1917+
import { defineConfig } from 'unocss'
1918+
import presetMpx from '@mpxjs/unocss-base'
19191919

1920-
module.exports = defineConfig({
1920+
export default defineConfig({
19211921
presets: [
19221922
presetMpx({
19231923
baseFontSize: 37.5
@@ -1932,10 +1932,10 @@ yarn add -D @mpxjs/unocss-base
19321932
是否生成预设样式
19331933
```js
19341934
// uno.config.js
1935-
const { defineConfig } = require('unocss')
1936-
const presetMpx = require('@mpxjs/unocss-base')
1935+
import { defineConfig } from 'unocss'
1936+
import presetMpx from '@mpxjs/unocss-base'
19371937

1938-
module.exports = defineConfig({
1938+
export default defineConfig({
19391939
presets: [
19401940
presetMpx({
19411941
preflight: true

0 commit comments

Comments
 (0)