From 64afa8a707c2e9bfb17717b9ba590eee543f9c15 Mon Sep 17 00:00:00 2001 From: DiamondYuan Date: Fri, 28 Dec 2018 22:12:44 +0800 Subject: [PATCH] fix: fix type of animation in MovableViewProps --- packages/taro-components/types/MovableView.d.ts | 13 +++++++++++-- packages/taro-components/types/common.d.ts | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/taro-components/types/MovableView.d.ts b/packages/taro-components/types/MovableView.d.ts index 512614c5ceb7..c32372a0e924 100644 --- a/packages/taro-components/types/MovableView.d.ts +++ b/packages/taro-components/types/MovableView.d.ts @@ -1,5 +1,5 @@ import { ComponentType } from 'react' -import { StandardProps, BaseEventFunction, TouchEventFunction } from './common' +import { StandardProps, BaseEventFunction, TouchEventFunction, Omit } from './common' interface MovableAreaProps extends StandardProps { @@ -12,7 +12,7 @@ interface MovableAreaProps extends StandardProps { } -interface MovableViewProps extends StandardProps { +interface MovableViewProps extends Omit { /** * movable-view的移动方向,属性值有`all`、`vertical`、`horizontal`、`none` @@ -94,6 +94,15 @@ interface MovableViewProps extends StandardProps { */ scaleValue?: number, + /** + * 是否使用动画 + * + * 基础库: 2.1.0 + * + * 默认值:`true` + */ + animation?: boolean; + /** * 拖动过程中触发的事件,event.detail = `{x: x, y: y, source: source}`,其中source表示产生移动的原因,值可为touch(拖动)、touch-out-of-bounds(超出移动范围)、out-of-bounds(超出移动范围后的回弹)、friction(惯性)和空字符串(setData) * diff --git a/packages/taro-components/types/common.d.ts b/packages/taro-components/types/common.d.ts index 8f4ea146fc0f..638c07307822 100644 --- a/packages/taro-components/types/common.d.ts +++ b/packages/taro-components/types/common.d.ts @@ -1,5 +1,7 @@ import { CSSProperties } from 'react'; +export type Omit = Pick; + export interface StandardProps extends EventProps { /** * 组件的唯一标示, 保持整个页面唯一