Skip to content

Commit 173ba37

Browse files
committed
fix(dd): 兼容 Taro 3.3.8+ 版本
1 parent a17b81b commit 173ba37

14 files changed

+30
-49
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
.DS_Store
44
yarn.lock
55
package-lock.json
6+
types

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## v0.1.0
2+
3+
### Bug Fixes
4+
5+
- 兼容 Taro 3.3.8+ 版本
6+
7+
## v0.0.5
8+
9+
### Bug Fixes
10+
11+
- 兼容 Taro 3.1 & 3.2 版本

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
Taro 插件。用于支持编译为钉钉小程序。
44

5+
## 版本要求
6+
7+
### Taro 3.3.8+
8+
9+
请使用本插件的 `~0.1.0` 版本
10+
11+
### Taro 3.1 & 3.2
12+
13+
请使用本插件的 `~0.0.5` 版本
14+
515
## 使用
616

717
#### 1. 配置插件

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
"url": "https://github.com/NervJS/taro-plugin-platform-alipay-dd/issues"
2828
},
2929
"peerDependencies": {
30-
"@tarojs/service": "~3.1.0",
31-
"@tarojs/shared": "~3.1.0",
32-
"@tarojs/plugin-platform-alipay": "~3.1.0"
30+
"@tarojs/shared": "^3.3.8",
31+
"@tarojs/plugin-platform-alipay": "^3.3.8"
3332
},
3433
"devDependencies": {
34+
"@tarojs/service": "^3.3.0",
3535
"rollup": "^2.29.0",
3636
"rollup-plugin-typescript2": "^0.27.3",
3737
"typescript": "^4.0.3"

rollup.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const cwd = __dirname
55
const base = {
66
external: [
77
'@tarojs/shared',
8-
'@tarojs/service',
9-
'@tarojs/plugin-platform-alipay/dist/runtime-utils'
8+
'@tarojs/plugin-platform-alipay/dist/runtime-utils',
9+
'@tarojs/plugin-platform-alipay/dist/components-react'
1010
],
1111
plugins: [typescript({
1212
useTsconfigDeclarationDir: true

src/apis-list.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
export const syncApis = new Set([
2-
'previewFileInDingTalk',
3-
])
4-
51
export const asyncApis = new Set([
62
'editPicture',
73
'enableLeaveConfirm',

src/apis.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import { processApis } from '@tarojs/shared'
22
import {
3-
noPromiseApis,
43
needPromiseApis,
54
handleSyncApis,
65
transformMeta,
6+
modifyApis,
77
modifyAsyncResult,
88
request
99
} from '@tarojs/plugin-platform-alipay/dist/runtime-utils'
10-
import { syncApis, asyncApis } from './apis-list'
10+
import { asyncApis } from './apis-list'
1111

1212
declare const dd: any
1313

1414
export function initNativeApi (taro) {
1515
processApis(taro, dd, {
16-
noPromiseApis: new Set([...noPromiseApis, ...syncApis]),
1716
needPromiseApis: new Set([...needPromiseApis, ...asyncApis]),
1817
handleSyncApis,
1918
transformMeta,
19+
modifyApis,
2020
modifyAsyncResult,
2121
request
2222
})

types/apis-list.d.ts

-2
This file was deleted.

types/apis.d.ts

-1
This file was deleted.

types/components-react.d.ts

-2
This file was deleted.

types/components.d.ts

-9
This file was deleted.

types/index.d.ts

-3
This file was deleted.

types/program.d.ts

-19
This file was deleted.

types/runtime.d.ts

-1
This file was deleted.

0 commit comments

Comments
 (0)