From 98eddebf306b501cd443187adbf641f2a8c71c13 Mon Sep 17 00:00:00 2001 From: UxieVerity <1351117103@qq.com> Date: Fri, 11 Jun 2021 17:01:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(components):=20=E6=96=B0=E5=A2=9E=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E6=9D=A1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/base-widgets/process/index.tsx | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/packages/base-widgets/process/index.tsx diff --git a/src/packages/base-widgets/process/index.tsx b/src/packages/base-widgets/process/index.tsx new file mode 100644 index 0000000..ba8f6fd --- /dev/null +++ b/src/packages/base-widgets/process/index.tsx @@ -0,0 +1,29 @@ +import { Progress } from 'vant' +import { + createEditorColorProp, + createEditorSwitchProp, + createEditorInputProp, + createEditorInputNumberProp +} from '@/visual-editor/visual-editor.props' +import { VisualEditorComponent } from '@/visual-editor/visual-editor.utils' + +export default { + key: 'divider', + moduleName: 'baseWidgets', + label: '进度条', + preview: () => , + render: ({ props }) => { + return + }, + props: { + percentage: createEditorInputNumberProp({ label: '进度百分比', defaultValue: 50 }), + strokeWidth: createEditorInputNumberProp({ label: '线条粗细', defaultValue: 5 }), + inactive: createEditorSwitchProp({ label: '是否置灰', defaultValue: false }), + color: createEditorColorProp('进度条颜色', '#1989fa'), + trackColor: createEditorColorProp('轨道颜色', '#e5e5e5'), + pivotText: createEditorInputProp({ label: '进度文字内容' }), + pivotColor: createEditorColorProp('进度文字背景色', '#1989fa'), + textColor: createEditorColorProp('进度文字颜色', '#ffffff'), + showPivot: createEditorSwitchProp({ label: '是否显示进度文字', defaultValue: true }) + } +} as VisualEditorComponent