From b21891653f93555278364d68467dee8ca794fb60 Mon Sep 17 00:00:00 2001 From: eiinu Date: Thu, 21 Dec 2023 16:07:56 +0800 Subject: [PATCH] chore(watermark): split demo --- .../src/exhibition/pages/watermark/basic.vue | 22 ++++ .../src/exhibition/pages/watermark/index.vue | 93 ++++---------- .../src/exhibition/pages/watermark/multi.vue | 10 ++ .../src/exhibition/pages/watermark/part.vue | 10 ++ src/packages/__VUE/watermark/demo.vue | 90 -------------- src/packages/__VUE/watermark/demo/basic.vue | 22 ++++ src/packages/__VUE/watermark/demo/index.vue | 31 +++++ src/packages/__VUE/watermark/demo/multi.vue | 10 ++ src/packages/__VUE/watermark/demo/part.vue | 10 ++ src/packages/__VUE/watermark/doc.en-US.md | 109 +---------------- src/packages/__VUE/watermark/doc.md | 113 ++---------------- src/packages/__VUE/watermark/doc.taro.md | 113 ++---------------- 12 files changed, 160 insertions(+), 473 deletions(-) create mode 100644 packages/nutui-taro-demo/src/exhibition/pages/watermark/basic.vue create mode 100644 packages/nutui-taro-demo/src/exhibition/pages/watermark/multi.vue create mode 100644 packages/nutui-taro-demo/src/exhibition/pages/watermark/part.vue delete mode 100644 src/packages/__VUE/watermark/demo.vue create mode 100644 src/packages/__VUE/watermark/demo/basic.vue create mode 100644 src/packages/__VUE/watermark/demo/index.vue create mode 100644 src/packages/__VUE/watermark/demo/multi.vue create mode 100644 src/packages/__VUE/watermark/demo/part.vue diff --git a/packages/nutui-taro-demo/src/exhibition/pages/watermark/basic.vue b/packages/nutui-taro-demo/src/exhibition/pages/watermark/basic.vue new file mode 100644 index 0000000000..6a3fcb7517 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/watermark/basic.vue @@ -0,0 +1,22 @@ + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/watermark/index.vue b/packages/nutui-taro-demo/src/exhibition/pages/watermark/index.vue index 9247054689..d6a9526b8b 100644 --- a/packages/nutui-taro-demo/src/exhibition/pages/watermark/index.vue +++ b/packages/nutui-taro-demo/src/exhibition/pages/watermark/index.vue @@ -1,72 +1,31 @@ - +}); + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/watermark/multi.vue b/packages/nutui-taro-demo/src/exhibition/pages/watermark/multi.vue new file mode 100644 index 0000000000..01ae3782b0 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/watermark/multi.vue @@ -0,0 +1,10 @@ + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/watermark/part.vue b/packages/nutui-taro-demo/src/exhibition/pages/watermark/part.vue new file mode 100644 index 0000000000..610afb2561 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/watermark/part.vue @@ -0,0 +1,10 @@ + + diff --git a/src/packages/__VUE/watermark/demo.vue b/src/packages/__VUE/watermark/demo.vue deleted file mode 100644 index af8c5c0523..0000000000 --- a/src/packages/__VUE/watermark/demo.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - diff --git a/src/packages/__VUE/watermark/demo/basic.vue b/src/packages/__VUE/watermark/demo/basic.vue new file mode 100644 index 0000000000..fa56e2ef60 --- /dev/null +++ b/src/packages/__VUE/watermark/demo/basic.vue @@ -0,0 +1,22 @@ + + diff --git a/src/packages/__VUE/watermark/demo/index.vue b/src/packages/__VUE/watermark/demo/index.vue new file mode 100644 index 0000000000..909889cf47 --- /dev/null +++ b/src/packages/__VUE/watermark/demo/index.vue @@ -0,0 +1,31 @@ + + diff --git a/src/packages/__VUE/watermark/demo/multi.vue b/src/packages/__VUE/watermark/demo/multi.vue new file mode 100644 index 0000000000..01ae3782b0 --- /dev/null +++ b/src/packages/__VUE/watermark/demo/multi.vue @@ -0,0 +1,10 @@ + diff --git a/src/packages/__VUE/watermark/demo/part.vue b/src/packages/__VUE/watermark/demo/part.vue new file mode 100644 index 0000000000..610afb2561 --- /dev/null +++ b/src/packages/__VUE/watermark/demo/part.vue @@ -0,0 +1,10 @@ + + diff --git a/src/packages/__VUE/watermark/doc.en-US.md b/src/packages/__VUE/watermark/doc.en-US.md index 0226dfd995..6f140fc99a 100644 --- a/src/packages/__VUE/watermark/doc.en-US.md +++ b/src/packages/__VUE/watermark/doc.en-US.md @@ -14,116 +14,17 @@ app.use(Watermark); ### Basic Usage -:::demo - -```vue - - - -``` - -::: +> demo: watermark basic ### Part Usage -:::demo - -```vue - - - -``` - -::: +> demo: watermark part -### Multiline Watermark +### Multiline Watermark v4.2.5 The content attribute is passed into a string array, showing a multi-line watermark -:::demo - -```vue - - - -``` - -::: +> demo: watermark multi ## API @@ -138,7 +39,7 @@ The content attribute is passed into a string array, showing a multi-line waterm | image-width | Width of image | number | `120` | | image-height | Height of image | number | `64` | | z-index | Z-index of the appended watermark element | number | `2000` | -| content | Watermark text content | string | string[] | - | +| content | Watermark text content | string \| string[] | - | | font-color | Watermark text color | string | `rgba(0, 0, 0, .15)` | | font-size | Watermark text font size | string \| number | `16` | | gap-x | Horizontal spacing between watermarks | number | `24` | diff --git a/src/packages/__VUE/watermark/doc.md b/src/packages/__VUE/watermark/doc.md index 9b729a424d..d47d0f48a2 100644 --- a/src/packages/__VUE/watermark/doc.md +++ b/src/packages/__VUE/watermark/doc.md @@ -16,116 +16,17 @@ app.use(Watermark); ### 基础用法 -:::demo - -```vue - - - -``` - -::: +> demo: watermark basic ### 局部用法 -:::demo - -```vue - - - -``` +> demo: watermark part -::: - -### 多行水印 - -content属性传入string数组,展示的则是多行水印 - -:::demo - -```vue - - - -``` +### 多行水印 v4.2.5 + +`content` 属性支持传入 `string[]` 类型,展示多行水印 -::: +> demo: watermark multi ## API @@ -140,7 +41,7 @@ content属性传入string数组,展示的则是多行水印 | image-width | 图片宽度 | number | `120` | | image-height | 图片高度 | number | `64` | | z-index | 追加的水印元素的 z-index | number | `2000` | -| content | 水印文字内容 | string | string[] | - | +| content | 水印文字内容 | string \| string[] | - | | font-color | 水印文字颜色 | string | `rgba(0, 0, 0, .15)` | | font-size | 文字大小 | string \| number | `16` | | gap-x | 水印之间的水平间距 | number | `24` | diff --git a/src/packages/__VUE/watermark/doc.taro.md b/src/packages/__VUE/watermark/doc.taro.md index fcbaf473a9..f5b41790f3 100644 --- a/src/packages/__VUE/watermark/doc.taro.md +++ b/src/packages/__VUE/watermark/doc.taro.md @@ -16,116 +16,17 @@ app.use(Watermark); ### 基础用法 -:::demo - -```vue - - - -``` - -::: +> demo: watermark basic exhibition ### 局部用法 -:::demo - -```vue - - - -``` +> demo: watermark part exhibition -::: - -### 多行水印 - -content属性传入string数组,展示的则是多行水印 - -:::demo - -```vue - - - -``` +### 多行水印 v4.2.5 + +`content` 属性支持传入 `string[]` 类型,展示多行水印 -::: +> demo: watermark multi exhibition ## API @@ -140,7 +41,7 @@ content属性传入string数组,展示的则是多行水印 | image-width | 图片宽度 | number | `120` | | image-height | 图片高度 | number | `64` | | z-index | 追加的水印元素的 z-index | number | `2000` | -| content | 水印文字内容 | string | - | +| content | 水印文字内容 | string \| string[] | - | | font-color | 水印文字颜色 | string | `rgba(0, 0, 0, .15)` | | font-size | 文字大小 | string \| number | `16` | | gap-x | 水印之间的水平间距 | number | `24` |