mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 18:41:20 -08:00
refactor: Remove unused loadImg function in Artplayer
This commit is contained in:
1 parent
27f161be40
commit
17b2268ce0
2 files changed
-10
No files matched your search
@@ -53,7 +53,6 @@ console.info(art.template.$video);
|
|||||||
|
|
||||||
- `proxy` 方法用于代理 `DOM` 事件
|
- `proxy` 方法用于代理 `DOM` 事件
|
||||||
- `hover` 方法用于代理自定义的 `hover` 事件
|
- `hover` 方法用于代理自定义的 `hover` 事件
|
||||||
- `loadImg` 方法用于监听图片的 `load` 加载事件
|
|
||||||
|
|
||||||
<div className="run-code">▶ Run Code</div>
|
<div className="run-code">▶ Run Code</div>
|
||||||
|
|
||||||
@@ -74,10 +73,6 @@ art.events.hover(container, (event) => {
|
|||||||
}, (event) => {
|
}, (event) => {
|
||||||
console.info('mouseleave', event);
|
console.info('mouseleave', event);
|
||||||
});
|
});
|
||||||
|
|
||||||
art.events.loadImg('/assets/sample/poster.jpg').then(img => {
|
|
||||||
console.info('loadImg', img);
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
|
|
||||||
:::warning 提示
|
:::warning 提示
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ Manages all `DOM` events in the player, which is essentially a proxy for `addEve
|
|||||||
|
|
||||||
- The `proxy` method is used to proxy `DOM` events
|
- The `proxy` method is used to proxy `DOM` events
|
||||||
- The `hover` method is used to proxy custom `hover` events
|
- The `hover` method is used to proxy custom `hover` events
|
||||||
- The `loadImg` method is used to listen for the `load` event of images
|
|
||||||
|
|
||||||
<div className="run-code">▶ Run Code</div>
|
<div className="run-code">▶ Run Code</div>
|
||||||
|
|
||||||
@@ -73,10 +72,6 @@ art.events.hover(container, (event) => {
|
|||||||
}, (event) => {
|
}, (event) => {
|
||||||
console.info('mouseleave', event);
|
console.info('mouseleave', event);
|
||||||
});
|
});
|
||||||
|
|
||||||
art.events.loadImg('/assets/sample/poster.jpg').then(img => {
|
|
||||||
console.info('loadImg', img);
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
:::warning Warning
|
:::warning Warning
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user