miniprogram-to-uniapp icon indicating copy to clipboard operation
miniprogram-to-uniapp copied to clipboard

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

Open DiamondYuan opened this issue 1 year ago • 1 comments

问题描述?

如果组件的 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 avatar Dec 04 '23 06:12 DiamondYuan

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

image

DiamondYuan avatar Dec 04 '23 06:12 DiamondYuan