ソースを参照

fix: notify文档修改

Ymm0008 3 年 前
コミット
6ec8da36fc

+ 3 - 0
src/packages/__VUE/layout/doc.en-US.md

@@ -20,6 +20,9 @@ app.use(Col);
 
 
 ### Basic Usage
+
+The Layout component provides a 24-column grid, by adding the span attribute on Col to set the percentage of the width of the column. The offset attribute can set the offset width of the column, and the calculation method is the same as span.
+
 :::demo
 ```html
 <template>

+ 3 - 0
src/packages/__VUE/layout/doc.md

@@ -18,6 +18,9 @@ app.use(Col);
 
 
 ### 基础用法
+
+Layout 组件提供 24列栅格,通过在 Col 上添加 span 属性设置列所占的宽度百分比。 offset 属性可以设置列的偏移宽度,计算方式与 span 相同。
+
 :::demo
 ```html
 <template>

+ 3 - 0
src/packages/__VUE/layout/doc.taro.md

@@ -18,6 +18,9 @@ app.use(Col);
 
 
 ### 基础用法
+
+Layout 组件提供 24列栅格,通过在 Col 上添加 span 属性设置列所占的宽度百分比。 offset 属性可以设置列的偏移宽度,计算方式与 span 相同。
+
 :::demo
 ```html
 <template>

+ 2 - 1
src/packages/__VUE/notify/doc.en-US.md

@@ -163,12 +163,13 @@ export default {
     
 | Attribute  | Description                                              | Type          | Default  |
 |------------|----------------------------------------------------------|---------------|----------|
-| type       | Display Type(primary,success ,danger,warning)      | String        | 'danger' |
+| type       | The information type of the prompt, the optional values are `primary` `success` `danger` `warning`      | String        | `danger` |
 | message    | Display copy, support line feed through \n              | Boolean       | false    |
 | duration   | Display duration (ms),value is 0 ,notify not disappear | Number        | 3000     |
 | color      | Font Color                                               | String        | -        |
 | background | Background color                                         | String        | -        |
 | class-name | Custom class name                                        | String/Number | 1        |
+| position | custom position, optional values are `top` `bottom` `left` `right` `center` | String | `top` |
 
 > Component call is supported after version 'v3.1.20'.
 

+ 9 - 9
src/packages/__VUE/notify/doc.md

@@ -155,20 +155,20 @@ export default {
     
 | 字段       | 说明                                                  | 类型          | 默认值   |
 |------------|-------------------------------------------------------|---------------|----------|
-| type       | 提示的信息类型(primary,success  ,danger,warning) | String        | 'danger' |
-| message    | 展示文案,支持通过\n换行                              | Boolean       | false    |
-| duration   | 展示时长(ms),值为 0 时,notify 不会消失              | Number        | 3000     |
-| color      | 字体颜色                                              | String        | 空       |
-| background | 背景颜色                                              | String        | 空       |
-| class-name | 自定义类名                                            | String/Number | 1        |
-| position | 自定义位置                                           | String | 'top'        |
+| type       | 提示的信息类型,可选值为`primary` `success` `danger` `warning` | string        | `danger` |
+| message    | 展示文案,支持通过\n换行                              | boolean       | `false`    |
+| duration   | 展示时长(ms),值为 0 时,notify 不会消失              | number        | `3000`     |
+| color      | 字体颜色                                              | string        | `''`     |
+| background | 背景颜色                                              | string        | `''`       |
+| class-name | 自定义类名                                            | string\/number | `1`        |
+| position | 自定义位置,可选值为 `top` `bottom` `left` `right` `center`              | string | `top`        |
 
 ### Events
 
 | 事件名 | 说明         | 回调参数 |
 |--------|--------------|----------|
-| click  | 点击事件回调 | |
-| closed | 关闭事件回调 |        |
+| click  | 点击事件回调 | `-`|
+| closed | 关闭事件回调 | `-`       |
 
 ## 主题定制
 

+ 7 - 6
src/packages/__VUE/notify/doc.taro.md

@@ -105,12 +105,13 @@ export default {
     
 | 字段       | 说明                                                  | 类型    | 默认值   |
 |------------|-------------------------------------------------------|---------|----------|
-| type       | 提示的信息类型(primary,success  ,danger,warning) | String  | 'danger' |
-| message    | 展示文案,支持通过\n换行                              | Boolean | false    |
-| duration   | 展示时长(ms),值为 0 时,notify 不会消失              | String  | 3000     |
-| color      | 字体颜色                                              | String  | 空       |
-| background | 背景颜色                                              | String  | 空       |
-| class-name | 自定义类名                                            | String  |          |
+| type       | 提示的信息类型,可选值为`primary` `success` `danger` `warning` | String        | `danger` |
+| message    | 展示文案,支持通过\n换行                              | Boolean       | false    |
+| duration   | 展示时长(ms),值为 0 时,notify 不会消失              | Number        | 3000     |
+| color      | 字体颜色                                              | String        | 空       |
+| background | 背景颜色                                              | String        | 空       |
+| class-name | 自定义类名                                            | String/Number | 1        |
+| position | 自定义位置,可选值为 `top` `bottom` `left` `right` `center`              | String | `top`        |
 
 ### Events
 

+ 2 - 1
src/packages/__VUE/notify/index.ts

@@ -9,7 +9,7 @@ const defaultOptions = {
   background: undefined,
   duration: 3000,
   className: '',
-  // onClosed: null,
+  onClose: Function,
   // onClick: null,
   // onOpened: null,
   // textTimer: null,
@@ -84,6 +84,7 @@ const mountNotify = (opts: TDOptions) => {
       opts.teleport = `#notify-${opts.id}`;
       onMounted(() => {
         setTimeout(() => {
+          opts.onClose && opts.onClose();
           document.body.removeChild(root);
         }, opts.duration);
       });

+ 2 - 2
src/packages/__VUE/signature/doc.taro.md

@@ -1,8 +1,8 @@
 #  Signature 签名
 
 ### 介绍
-    
-    基于Canvas的签名组件。
+
+基于Canvas的签名组件。默认竖屏模式使用,如使用横屏模式,请开发者自行设置旋转角度或者宽高。
     
 ### 安装