taro-ui icon indicating copy to clipboard operation
taro-ui copied to clipboard

AtSwipeAction组件文档参数不全

Open whiteGreat opened this issue 3 years ago • 2 comments

问题描述 AtSwipeAction源码类型定义maxDistance,areaWidth为必填项,但在官方文档并未标明此项参数默认示例信息,且areaWidth值后缀为px在未知宽度情况下无法友好使用

复现步骤

使用时不填写这两个参数maxDistance,areaWidth

<AtSwipeAction
    isOpened={false}
    onOpened={() => {
	    console.log("1");
    }}
    onClosed={() => {
	    console.log("1");
    }}
    key={item.id}
    options={[
	    {
		    text: "删除",
		    style: {
			    width: "100px",
			    backgroundColor: "#6190E8",
		    },
		    className: `${bem("action")}`,
	    },
    ]}
    maxDistance={100}
    areaWidth={100}
>
</AtSwipeAction>

期望行为 文档参数补全

报错信息

image image

系统信息

"taro-ui": "^3.1.0-beta.2"

补充信息

whiteGreat avatar Jul 08 '22 08:07 whiteGreat

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

taro-ui-bot[bot] avatar Jul 08 '22 08:07 taro-ui-bot[bot]

你好,解决了吗?我也遇到这个问题了

Keysyun avatar May 13 '23 14:05 Keysyun