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.

18 lines
371 B

3 years ago
/**
* 过滤对象的函数属性
* @param {Object} opts
*/
const mergeOptionsToData = (opts = {}) => {
const options = Object.assign({}, opts)
for (const key in options) {
if (options.hasOwnProperty(key) && typeof options[key] === 'function') {
delete options[key]
}
}
return options
}
export default mergeOptionsToData