智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/00/006648ce0d504fe43c12a7ebcf5...

22 lines
545 B

const SOURCE_TYPES = ['album', 'camera']
export const chooseVideo = {
sourceType: {
type: Array,
required: false,
default: SOURCE_TYPES,
validator (sourceType, params) {
const length = sourceType.length
if (!length) {
params.sourceType = SOURCE_TYPES
} else {
for (let i = 0; i < length; i++) {
if (typeof sourceType[i] !== 'string' || !~SOURCE_TYPES.indexOf(sourceType[i])) {
params.sourceType = SOURCE_TYPES
break
}
}
}
}
}
}