mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
update isStringOrNumber
This commit is contained in:
1 parent
6b6fca8b74
commit
6d81287de9
3 files changed
+5
-4
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
getStyle,
|
||||
inverseClass,
|
||||
createElement,
|
||||
isStringOrNumber,
|
||||
} from './dom';
|
||||
import validator from 'option-validator';
|
||||
import { ComponentOption } from '../scheme';
|
||||
@@ -141,7 +142,7 @@ export default class Component {
|
||||
$value.innerText = $item.innerText;
|
||||
if (option.onSelect) {
|
||||
const result = await option.onSelect.call(this.art, find, $item, event);
|
||||
if (typeof result === 'string' || typeof result === 'number') {
|
||||
if (isStringOrNumber(result)) {
|
||||
$value.innerHTML = result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user