From ef2309bbb347facd32c0b00cb85f68480ed63843 Mon Sep 17 00:00:00 2001 From: chenjiajian <798095202@qq.com> Date: Mon, 21 Jan 2019 14:17:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(taro-h5):=20API=20createAnimation=20?= =?UTF-8?q?=E6=8C=82=E8=BD=BD=E5=88=B0=20Taro=20=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/native-api.md | 2 +- packages/taro-h5/src/api/api.md | 2 +- packages/taro-h5/src/native-api.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/native-api.md b/docs/native-api.md index ae8dc3e7e2f3..d9d2d375a0b9 100644 --- a/docs/native-api.md +++ b/docs/native-api.md @@ -2423,7 +2423,7 @@ const animation = Taro.createAnimation({ | API | 微信小程序 | H5 | ReactNative | | :-: | :-: | :-: | :-: | -| Taro.createAnimation | ✔️ | | | +| Taro.createAnimation | ✔️ | ✔️ | | ### 位置 diff --git a/packages/taro-h5/src/api/api.md b/packages/taro-h5/src/api/api.md index 9d0eb3c62b9f..e86e7eb4637d 100644 --- a/packages/taro-h5/src/api/api.md +++ b/packages/taro-h5/src/api/api.md @@ -378,7 +378,7 @@ #### 动画 -☑️ wx.createAnimation +✅ wx.createAnimation #### 位置 diff --git a/packages/taro-h5/src/native-api.js b/packages/taro-h5/src/native-api.js index 304af1a9cc18..e892c4e904ab 100644 --- a/packages/taro-h5/src/native-api.js +++ b/packages/taro-h5/src/native-api.js @@ -1,9 +1,10 @@ import { onAndSyncApis, noPromiseApis, otherApis, initPxTransform } from '@tarojs/taro' import { createSelectorQuery } from './api/createSelectorQuery' import request from './api/request' +import webSocket from './api/webSocket' +import createAnimation from './api/createAnimation' import * as storage from './api/storage' import * as interactive from './api/interactive' -import webSocket from './api/webSocket' import * as tabBar from './api/tabBar' import * as system from './api/system' import * as others from './api/others' @@ -33,6 +34,7 @@ export default function initNativeApi (taro) { processApis(taro) taro.request = request taro.createSelectorQuery = createSelectorQuery + taro.createAnimation = createAnimation taro.initPxTransform = initPxTransform.bind(taro) taro.pxTransform = pxTransform.bind(taro) taro.requirePlugin = function () {