Props失效,书写规范
2020-02-12 本文已影响0人
E1FANG
在组件里接收父组件传的iconPosition,

在父组件用驼峰式命名并赋值

打印出来发现iconPosition为undefined

将驼峰式改为icon-position

子组件得到right

在组件里接收父组件传的iconPosition,
在父组件用驼峰式命名并赋值
打印出来发现iconPosition为undefined
将驼峰式改为icon-position
子组件得到right