From 88713aa4b33b762b23d894f3cadcb006d3efb651 Mon Sep 17 00:00:00 2001 From: sailei <826196460@qq.com> Date: Fri, 8 Dec 2023 14:43:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Progress=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BA=8B=E4=BB=B6=E5=8A=A8=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh-CN/components/progress.md | 9 +++++++++ .../renderers/__snapshots__/Progress.test.tsx.snap | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/zh-CN/components/progress.md b/docs/zh-CN/components/progress.md index b4c055c2d..c3563534c 100755 --- a/docs/zh-CN/components/progress.md +++ b/docs/zh-CN/components/progress.md @@ -316,3 +316,12 @@ List 的内容、Card 卡片的内容配置同上 | strokeWidth | `number` | line 类型为`10`,circle、dashboard 类型为`6` | 进度条线宽度 | | gapDegree | `number` | `75` | 仪表盘缺角角度,可取值 0 ~ 295 | | gapPosition | `string` | `bottom` | 仪表盘进度条缺口位置,可选`top bottom left right` | + +## 动作表 + +当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。 + +| 动作名称 | 动作配置 | 说明 | +| -------- | ------------------------------------ | ------------------------------------------------------ | +| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 | +| setValue | `value: string` \| `number` 更新的值 | 更新数据 | diff --git a/packages/amis/__tests__/renderers/__snapshots__/Progress.test.tsx.snap b/packages/amis/__tests__/renderers/__snapshots__/Progress.test.tsx.snap index be694f879..08590e785 100644 --- a/packages/amis/__tests__/renderers/__snapshots__/Progress.test.tsx.snap +++ b/packages/amis/__tests__/renderers/__snapshots__/Progress.test.tsx.snap @@ -258,7 +258,7 @@ exports[`Renderer:Progress with mode 2`] = ` r="46" stroke-linecap="round" stroke-width="8" - style="stroke-dasharray: 208.7413785385218px 289.02652413026095; stroke-dashoffset: 79.14689627386784; transform: rotate(230deg); transform-origin: 0 0; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s; fill-opacity: 0; transition-duration: 0s, 0s;" + style="stroke-dasharray: 208.7413785385218px 289.02652413026095; stroke-dashoffset: 81.23431005925306; transform: rotate(230deg); transform-origin: 0 0; transition: stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s; fill-opacity: 0; transition-duration: 0s, 0s;" /> - 64% + 63%