mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
update
This commit is contained in:
1 parent
28d9ad2eaa
commit
af97602cfa
5 files changed
+53
-32
No files matched your search
@@ -115,19 +115,18 @@ export default class Component {
|
||||
proxy($list, 'click', (event) => {
|
||||
const path = event.composedPath() || [];
|
||||
const $item = path.find((item) => hasClass(item, 'art-selector-item'));
|
||||
if ($item) {
|
||||
const index = Number($item.dataset.index);
|
||||
const find = option.selector[index] || {};
|
||||
$value.innerText = $item.innerText;
|
||||
if (option.onSelect) {
|
||||
const result = option.onSelect.call(this.art, find);
|
||||
if (typeof result === 'string') {
|
||||
$value.innerHTML = result;
|
||||
}
|
||||
if (!$item) return;
|
||||
const index = Number($item.dataset.index);
|
||||
const find = option.selector[index] || {};
|
||||
$value.innerText = $item.innerText;
|
||||
if (option.onSelect) {
|
||||
const result = option.onSelect.call(this.art, find, $item);
|
||||
if (typeof result === 'string') {
|
||||
$value.innerHTML = result;
|
||||
}
|
||||
setLeft();
|
||||
this.art.emit('selector', find);
|
||||
}
|
||||
setLeft();
|
||||
this.art.emit('selector', find, $item);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user