Browse Source

docs(video): edit docs

Drjingfubo 3 years ago
parent
commit
f096877604
2 changed files with 42 additions and 23 deletions
  1. 20 10
      src/packages/__VUE/video/doc.en-US.md
  2. 22 13
      src/packages/__VUE/video/doc.md

+ 20 - 10
src/packages/__VUE/video/doc.en-US.md

@@ -247,16 +247,26 @@ export default {
 
 | Attribute           | Description                                                                        | Type    | Default  |
 |---------------------|------------------------------------------------------------------------------------|---------|----------|
-| source              | Video url and type settings                                                        | object  | -        |
-| options             | Control video playback properties                                                  | object  | `required` |
-| options.autoplay    | Auto play                                                                          | boolean | `false`    |
-| options.poster      | Poster settings                                                                    | string  | -        |
-| options.loop        | Poster loop                                                                        | boolean | `false`    |
-| options.controls    | Show operation control                                                             | boolean | `true`     |
-| options.muted       | Mute                                                                               | boolean | `false`    |
-| options.volume      | Volume control                                                                     | number  | `0.5`      |
-| options.disabled    | Disable operation (e.g. background image of circular playback, prohibit operation) | boolean | `false`    |
-| options.playsinline | Whether to set as inline playback element (solve Android compatibility problem)    | boolean | `false`    |
+| source              | Video url and type settings                                                        | VideoSource  | {}        |
+| options             | Control video playback properties                                                  | VideoOptions  | {} |
+
+
+### VideoSource 数据结构
+| 键名                | 说明                                       | 类型    | 
+| ------------------- | ------------------------------------------ | ------- | 
+| src    | Video Src                              | boolean | 
+| type      | Video Type                          | string  | 
+### VideoOptions 数据结构
+| key           | Description   | Type    | Default  |
+| ------------------- | ------------------------------------------ | ------- | 
+| autoplay    | Auto play  | boolean | `false`    |
+| poster      | Poster settings   | string  | -        |
+| loop        | Poster loop      | boolean | `false`    |
+| controls    | Show operation control  | boolean | `true`     |
+| muted       | Mute       | boolean | `false`    |
+| volume      | Volume control   | number  | `0.5`      |
+| disabled    | Disable operation (e.g. background image of circular playback, prohibit operation) | boolean | `false`    |
+| playsinline | Whether to set as inline playback element (solve Android compatibility problem)    | boolean | `false`    |
 
 ### Events
 

+ 22 - 13
src/packages/__VUE/video/doc.md

@@ -248,22 +248,31 @@ export default {
 
 | 参数                | 说明                                       | 类型    | 默认值   |
 | ------------------- | ------------------------------------------ | ------- | -------- |
-| source             | 视频地址和类型设置                         | object   | -        |
-| options             | 控制视频播放属性                           | object  | `required` |
-| options.autoplay    | 是否自动播放                               | boolean | `false`    |
-| options.poster      | 海报设置                                   | string  | -        |
-| options.loop        | 是否循环播放                               | boolean | `false`    |
-| options.controls    | 是否展示操作栏                             | boolean | `true`     |
-| options.muted       | 是否静音                                   | boolean | `false`    |
-| options.volume      | 音量控制                                   | number  | `0.5`      |
-| options.disabled    | 禁用操作(如循环播放的背景图,禁止操作)   | boolean | `false`    |
-| options.playsinline | 是否设置为行内播放元素(解决安卓兼容问题) | boolean | `false`    |
+| source             | 视频地址和类型设置                         | VideoSource   | {} |
+| options             | 控制视频播放属性                           | VideoOptions  | {} |
+
+### VideoSource 数据结构
+| 键名                | 说明                                       | 类型    | 
+| ------------------- | ------------------------------------------ | ------- | 
+| src    | 视频链接                              | boolean | 
+| type      | 视频类型                                   | string  | 
+### VideoOptions 数据结构
+| 键名                | 说明                                       | 类型    | 默认值   |
+| ------------------- | ------------------------------------------ | ------- | -------- |
+| autoplay    | 是否自动播放                               | boolean | `false`    |
+| poster      | 海报设置                                   | string  | -        |
+| loop        | 是否循环播放                               | boolean | `false`    |
+| controls    | 是否展示操作栏                             | boolean | `true`     |
+| muted       | 是否静音                                   | boolean | `false`    |
+| volume      | 音量控制                                   | number  | `0.5`      |
+| disabled    | 禁用操作(如循环播放的背景图,禁止操作)   | boolean | `false`    |
+| playsinline | 是否设置为行内播放元素(解决安卓兼容问题) | boolean | `false`    |
 
 ### Events
 
 | 事件名 | 说明         | 回调参数 |
 | -------- | ------------ | -------- |
-| play     | 播放         | --       |
-| pause    | 暂停         | --       |
-| playend  | 播放完成回调 | --       |
+| play     | 播放         | videoElm      |
+| pause    | 暂停         | videoElm       |
+| playend  | 播放完成回调 | videoElm       |
 | time  | 播放时触发(current为当前播放时间,total为总时间)|  (current:string,total:string)  |