且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将纸张切换按钮绑定到Polymer中的布尔值

更新时间:2022-05-23 03:09:14

问题在于您的阵列。所有 isActive 对象都用引号括起来,这使它们成为一个字符串。

The problem is with your array. All of the isActive objects are wrapped in quotes which makes them a string.

你想让它们成为一个布尔值所以删除引号:

You want to make them a boolean so remove the quotes:

{
  firstName: 'Pedro',
  lastName: 'Vargas',
  email: 'pedro@mail.com',
  phone: '(222) 212 12 12',
  gender: 'Masculino',
  isActive: true
}