mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
update validator
This commit is contained in:
1 parent
b5cde4d611
commit
d6e9643220
5 files changed
+8
-8
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { errorHandle } from '../utils';
|
||||
|
||||
function validElement(paths, value, type) {
|
||||
function validElement(value, type, paths) {
|
||||
return errorHandle(
|
||||
type === 'string' || value instanceof Element,
|
||||
`${paths.join('.')} require 'string' or 'Element' type`,
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
style: 'object',
|
||||
click: 'function',
|
||||
mounted: 'function',
|
||||
position: (paths, value) => {
|
||||
position: (value, type, paths) => {
|
||||
const position = ['top', 'left', 'right'];
|
||||
return errorHandle(
|
||||
position.includes(value),
|
||||
|
||||
Reference in new issue
Block a user