diff --git a/packages/vant/src/signature/README.md b/packages/vant/src/signature/README.md index ad83cd59b..294b0bc30 100644 --- a/packages/vant/src/signature/README.md +++ b/packages/vant/src/signature/README.md @@ -59,7 +59,7 @@ Use `pen-color` prop to set the color of the brush stroke. ``` -### LineWidth +### Line Width Use `line-width` prop to set the width of the line. @@ -67,6 +67,14 @@ Use `line-width` prop to set the width of the line. ``` +### Background Color + +Use `background-color` prop to set the color of the background. + +```html + +``` + ## API ### Props diff --git a/packages/vant/src/signature/README.zh-CN.md b/packages/vant/src/signature/README.zh-CN.md index 2e1509dd6..373136406 100644 --- a/packages/vant/src/signature/README.zh-CN.md +++ b/packages/vant/src/signature/README.zh-CN.md @@ -67,6 +67,14 @@ export default { ``` +### 自定义背景颜色 + +通过 `background-color` 来自定义背景颜色。 + +```html + +``` + ## API ### Props diff --git a/packages/vant/src/signature/demo/index.vue b/packages/vant/src/signature/demo/index.vue index 3c38b4ebb..b23ccc479 100644 --- a/packages/vant/src/signature/demo/index.vue +++ b/packages/vant/src/signature/demo/index.vue @@ -7,14 +7,14 @@ import { showToast } from '../../toast'; const t = useTranslate({ 'zh-CN': { - basic: '基础用法', penColor: '自定义颜色', lineWidth: '自定义线宽', + backgroundColor: '自定义背景颜色', }, 'en-US': { - basic: 'basic', - penColor: 'penColor', - lineWidth: 'lineWidth', + penColor: 'Pen Color', + lineWidth: 'Line Width', + backgroundColor: 'Background Color', }, }); @@ -28,7 +28,7 @@ const onClear = () => showToast('clear'); diff --git a/packages/vant/src/signature/test/__snapshots__/demo-ssr.spec.ts.snap b/packages/vant/src/signature/test/__snapshots__/demo-ssr.spec.ts.snap index 057aa0e44..092bba3eb 100644 --- a/packages/vant/src/signature/test/__snapshots__/demo-ssr.spec.ts.snap +++ b/packages/vant/src/signature/test/__snapshots__/demo-ssr.spec.ts.snap @@ -107,4 +107,39 @@ exports[`should render demo and match snapshot 1`] = ` +
+ +
+
+ + +
+ +
+
`; diff --git a/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap index 16bccdf72..7dd4b7849 100644 --- a/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap @@ -91,4 +91,34 @@ exports[`should render demo and match snapshot 1`] = ` +
+
+
+ + +
+ +
+
`;