UNPKG

1.3 kBTypeScriptView Raw
1import { ComponentType } from 'react'
2import { StandardProps } from './common'
3interface MovableAreaProps extends StandardProps {
4 /** 当里面的 movable-view 设置为支持双指缩放时,设置此值可将缩放手势生效区域修改为整个 movable-area
5 * @default false
6 * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony_hybrid
7 */
8 scaleArea?: boolean
9}
10/** movable-view 的可移动区域
11 * @classification viewContainer
12 * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony_hybrid
13 * @example_react
14 * ```tsx
15 * class App extends Components {
16 * render () {
17 * return (
18 * <MovableArea style='height: 200px; width: 200px; background: red;'>
19 * <MovableView style='height: 50px; width: 50px; background: blue;' direction='all'>旅行的意义</MovableView>
20 * </MovableArea>
21 * )
22 * }
23 * }
24 * ```
25 * @example_vue
26 * ```html
27 * <movable-area style='height: 200px; width: 200px; background: red;'>
28 * <movable-view style='height: 50px; width: 50px; background: blue;' direction='all'>在路上</movable-view>
29 * </movable-area>
30 * ```
31 * @see https://developers.weixin.qq.com/miniprogram/dev/component/movable-area.html
32 */
33declare const MovableArea: ComponentType<MovableAreaProps>
34export { MovableArea, MovableAreaProps }