Skip to content

Commit

Permalink
Merge branch 'feat-style-md' of github.com:didi/mpx into feat-style-md
Browse files Browse the repository at this point in the history
  • Loading branch information
wenwenhua committed Jan 2, 2025
2 parents c423761 + ca1fab6 commit 8193383
Show file tree
Hide file tree
Showing 85 changed files with 1,657 additions and 1,265 deletions.
2 changes: 1 addition & 1 deletion docs-vuepress/api/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ mode 为 Mpx 编译的目标平台, 目前支持的有微信小程序(wx)\支
// 项目 package.json
{
"script": {
"build:cross": "mpx-cli-service build:mp --targets=wx,ali"
"build:cross": "mpx-cli-service build --targets=wx,ali"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs-vuepress/guide/advance/platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ new MpxwebpackPlugin({
// 项目 package.json
{
"script": {
"build:cross": "mpx-cli-service build:mp --targets=wx,ali"
"build:cross": "mpx-cli-service build --targets=wx,ali"
}
}
```
Expand Down
4 changes: 3 additions & 1 deletion docs-vuepress/guide/basic/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
npm i -g @mpxjs/cli
```

> @mpxjs/cli文档 https://github.com/mpx-ecology/mpx-cli
## 创建项目安装依赖

在当前目录下创建mpx项目。
Expand All @@ -29,7 +31,7 @@ npm install
## 编译构建

使用npm script执行mpx的编译构建,在开发模式下我们执行watch命令,将项目源码构建输出到`dist/${平台目录}`下,并且监听源码的改动进行重新编译。
使用npm script执行mpx的编译构建,在开发模式下我们执行serve命令,将项目源码构建输出到`dist/${平台目录}`下,并且监听源码的改动进行重新编译。

```shell
npm run serve
Expand Down
2 changes: 1 addition & 1 deletion docs-vuepress/guide/platform/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ new MpxwebpackPlugin({
// 项目 package.json
{
"script": {
"build:cross": "mpx-cli-service build:mp --targets=wx,ali,ios,android"
"build:cross": "mpx-cli-service build --targets=wx,ali,ios,android"
}
}
```
Expand Down
33 changes: 31 additions & 2 deletions docs-vuepress/guide/platform/rn.md
Original file line number Diff line number Diff line change
Expand Up @@ -1000,15 +1000,44 @@ text-shadow: 1rpx 3rpx 0 #2E0C02;
| ---- | ---- | ---- |
| entryPagePath | 支持 | |
| pages | 支持 | 无 |
| window | 子属性部分支持 | 参考下面window配置部分 |
| tabbar | 暂未支持 | 无 |
| networkTimeout | 支持 | 无 |
| subpackages | 支持 | 分包在RN下暂未进行拆包处理,仅能正常打包在一起,分包能力待后续支持 |
| usingComponents | 支持 | |
| vw | 支持 | 无 |

#### 路由能力

##### window配置
app里面的window配置,参考[微信内window配置说明](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#window)
| 配置项 | 支持情况 | 特殊说明 |
| ---- | ---- | ---- |
| navigationBarBackgroundColor | 支持 | |
| navigationBarTextStyle | 支持 | 无 |
| navigationStyle | 支持 | 无 |
| backgroundColor | 支持 | 无 |

#### 页面配置
页面配置内可配置页面级别的属性,参考[微信页面配置说明](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/page.html)
| 配置项 | 支持情况 | 特殊说明 |
| ---- | ---- | ---- |
| navigationBarBackgroundColor | 支持 | |
| navigationBarTextStyle | 支持 | 无 |
| navigationStyle | 支持 | 无 |
| backgroundColor | 支持 | 无 |
| usingComponents | 支持 | 无 |
| disableScroll | 不支持 | RN下默认页面不支持滚动,如需滚动需要使用可滚动的元素包裹 |

#### 状态管理
##### pinia
暂未支持
##### store
已支持
#### i18n
支持
#### 原子类能力
开发中,暂未支持
#### 依赖注入(Provide/Inject)
开发中,暂未支持

### 环境API

Expand Down
4 changes: 2 additions & 2 deletions examples/mpx-webview/H5/webviewbridge.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions packages/api-proxy/@types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ export const createVideoContext: WechatMiniprogram.Wx['createVideoContext']
export const onWindowResize: WechatMiniprogram.Wx['onWindowResize']
export const offWindowResize: WechatMiniprogram.Wx['offWindowResize']
export const createAnimation: WechatMiniprogram.Wx['createAnimation']
export const hideHomeButton: WechatMiniprogram.Wx['hideHomeButton']
export const getSetting: WechatMiniprogram.Wx['getSetting']
export const openSetting: WechatMiniprogram.Wx['openSetting']
export const enableAlertBeforeUnload: WechatMiniprogram.Wx['enableAlertBeforeUnload']
export const disableAlertBeforeUnload: WechatMiniprogram.Wx['disableAlertBeforeUnload']
export const getMenuButtonBoundingClientRect: WechatMiniprogram.Wx['getMenuButtonBoundingClientRect']
export const getImageInfo: WechatMiniprogram.Wx['getImageInfo']
export const vibrateShort: WechatMiniprogram.Wx['vibrateShort']
export const vibrateLong: WechatMiniprogram.Wx['vibrateLong']
export const getExtConfig: WechatMiniprogram.Wx['getExtConfig']
export const getExtConfigSync: WechatMiniprogram.Wx['getExtConfigSync']
export const openLocation: WechatMiniprogram.Wx['openLocation']
export const chooseLocation: WechatMiniprogram.Wx['chooseLocation']

declare const install: (...args: any) => any

Expand Down
Loading

0 comments on commit 8193383

Please sign in to comment.