diff --git a/packages/artplayer-document/docs/en/Advance.md b/packages/artplayer-document/docs/en/Advance.md index 8ae4d6f6e..74a35578e 100644 --- a/packages/artplayer-document/docs/en/Advance.md +++ b/packages/artplayer-document/docs/en/Advance.md @@ -738,46 +738,6 @@ art.on('ready', () => { }); ``` -### add - -- Type: `Function` - -Method `add` can dynamically add a setting items - -| Property | Type | Description | -| --------- | ------------------- | ------------------------------------------------------------- | -| `disable` | `Boolean` | Whether to disable the component | -| `name` | `String` | The unique name of the component, used to mark the class name | -| `index` | `Number` | Component index, priority for display | -| `html` | `String`、`Element` | DOM element of the component | -| `style` | `Object` | Component style object | -| `click` | `Function` | Component click event | -| `mounted` | `Function` | Triggered after the component is mounted | -| `tooltip` | `String` | Prompt text of the component | - -
▶ Run Code
- -```js -var art = new Artplayer({ - container: '.artplayer-app', - url: '/assets/sample/video.mp4', - setting: true, - autoSize: true, -}); - -art.on('ready', () => { - art.seek = 20; - art.setting.show = true; - art.setting.add({ - html: 'Custom setting', - click: function () { - console.info('You click on custom settings'); - art.setting.show = false; - }, - }); -}); -``` - ## plugins - Type: `Object` diff --git a/packages/artplayer-document/docs/zh-cn/Advance.md b/packages/artplayer-document/docs/zh-cn/Advance.md index 5931c8fcb..64e8d3abc 100644 --- a/packages/artplayer-document/docs/zh-cn/Advance.md +++ b/packages/artplayer-document/docs/zh-cn/Advance.md @@ -730,46 +730,6 @@ art.on('ready', () => { }); ``` -### add - -- 类型: `Function` - -方法 `add` 可以动态添加设置项 - -| 属性 | 类型 | 描述 | -| --------- | ------------------- | -------------------------- | -| `disable` | `Boolean` | 是否禁用组件 | -| `name` | `String` | 组件唯一名称,用于标记类名 | -| `index` | `Number` | 组件索引,用于显示的优先级 | -| `html` | `String`、`Element` | 组件的 DOM 元素 | -| `style` | `Object` | 组件样式对象 | -| `click` | `Function` | 组件点击事件 | -| `mounted` | `Function` | 组件挂载后触发 | -| `tooltip` | `String` | 组件的提示文本 | - -
▶ Run Code
- -```js -var art = new Artplayer({ - container: '.artplayer-app', - url: '/assets/sample/video.mp4', - setting: true, - autoSize: true, -}); - -art.on('ready', () => { - art.seek = 20; - art.setting.show = true; - art.setting.add({ - html: '自定义设置', - click: function () { - console.info('你点击了自定义设置'); - art.setting.show = false; - }, - }); -}); -``` - ## plugins - 类型: `Object`