Subscribe on changes!

Maybe it's a bug about types

avatar
Jun 24th 2022

Vue version

3.2.37

Link to minimal reproduction

https://codesandbox.io/s/serene-maxwell-cgck12?file=/src/Demo.vue

Steps to reproduce

https://github.com/TuSimple/naive-ui/blob/049431b22d7af1e956a88028e8d9ad79ec31e4f9/src/drawer/src/Drawer.tsx#L52

zhCN: 我在写一个组件的 props 时,希望获得的参数是 Boolean'transparent' 字符串,上面的链接是我的类型定义,Link to minimal reproduction 中的链接是我在使用这个 props 时控制台的报错,我想知道这是我使用的问题吗?如果是,我该如何定义这种类型?

enUS: When I write props for a component, the parameters I want to get are Boolean and 'transparent' strings. The above link is my type definition. The link in Link to minimal reproduction is an error on the console when I use props. Do I want to know if this is the problem I use? If so, how do I define this type?

What is expected?

No warn.

What is actually happening?

Have warn in console.

System Info

No response

Any additional comments?

No response

avatar
Jun 25th 2022

No, it's not. Hint: have a closer look at DrawerBodyWrapper.tsx' props