Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properties 如果直接写默认值,转换后会出现 Right-hand side of 'instanceof' is not an object 的报错 #166

Open
DiamondYuan opened this issue Dec 4, 2023 · 1 comment

Comments

@DiamondYuan
Copy link

DiamondYuan commented Dec 4, 2023

问题描述?

如果组件的 properties 写了错误的语法,是否应该报错,提示用户改成正确的写法。

  properties: {
    color: 'red',
   }

重现步骤

  1. git clone [email protected]:DiamondYuan/wtu-demos.git
  2. cd wtu-demos && git checkout issue-01
  3. wtu -i wtu-demos

期望的结果

  1. 报错提示
  properties: {
    color: 'red',
   }

转换为

color: {
  type: String,
  value: 'red'
}
@DiamondYuan
Copy link
Author

目前的报错很难看出问题出在哪里

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant