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.
17 lines
371 B
17 lines
371 B
/** |
|
* 过滤对象的函数属性 |
|
* @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
|
|
|