根据数据类型返回清空后的数据对象
const data = { key: '8899797', nested: { ll: '123', deep: { nestedKey: 'nestedValue' } } }; const emptyValue = useEmptyObject(data) // const emptyValue = { // key: '', // nested: { // ll: '', // deep: { // nestedKey: '' // } // } // }; Copy
const data = { key: '8899797', nested: { ll: '123', deep: { nestedKey: 'nestedValue' } } }; const emptyValue = useEmptyObject(data) // const emptyValue = { // key: '', // nested: { // ll: '', // deep: { // nestedKey: '' // } // } // };
Optional
需要设置的默认值
根据数据类型返回清空后的数据对象
Example