Fix bug to get wrapped component prop name list
This commit is contained in:
parent
5c43374588
commit
cb383df517
3 changed files with 14 additions and 2 deletions
10
src/services/component_utils/component_utils.js
Normal file
10
src/services/component_utils/component_utils.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import isFunction from 'lodash/isFunction'
|
||||
|
||||
const getComponentOptions = (Component) => (isFunction(Component)) ? Component.options : Component
|
||||
|
||||
const getComponentProps = (Component) => getComponentOptions(Component).props
|
||||
|
||||
export {
|
||||
getComponentOptions,
|
||||
getComponentProps
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue