mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 11:11:20 -08:00
build all packages
This commit is contained in:
1 parent
b909f2f498
commit
7341d53c5c
19 files changed
+178
-93
No files matched your search
@@ -1,10 +1,8 @@
|
||||
---
|
||||
title: 在控制栏添加按钮
|
||||
title: Add button to the controls
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
有时你需要在控制栏添加按钮,如开关按钮或者单选按钮等等,你甚至可以使用第三方的样式库如 `bootstrap`
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
@@ -17,7 +15,7 @@ var art = new Artplayer({
|
||||
position: 'right',
|
||||
html: '<button type="button">Click Me!</button>',
|
||||
click: function (_, event) {
|
||||
// 第二个参数是事件对象
|
||||
// The second parameter is an event object
|
||||
time += 1;
|
||||
event.target.innerText = 'You Click ' + time;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user