mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31: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;
|
||||
},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: 在控制栏添加列表
|
||||
title: Add a list in the controls
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
有时你需要在控制栏添加列表,那么你可以在添加控件的时候使用 `selector` 和 `onSelect` 属性
|
||||
Sometimes you need to add a list in the controls, then you can use the `selector` and `onSelect` attribute when adding controls
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -30,7 +30,7 @@ var art = new Artplayer({
|
||||
name: $dom.innerText,
|
||||
});
|
||||
|
||||
return '你点击了' + item.html;
|
||||
return 'You click' + item.html;
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"label": "常见问题",
|
||||
"label": "Common problem",
|
||||
"position": 7,
|
||||
"collapsed": true
|
||||
}
|
||||
Reference in new issue
Block a user