如何动态修改属性在属性检查器里的样式?

例如我想通过p2的勾选与否来控制p1的显示


我这么写报错了~,球正确方法

大腿在哪里!

http://cocos.com/docs/creator/extension/extends-inspector.html

试试

properties: {
  p1: {
    ...
    visible () { return this.p2; }
  },
  p2: true,
}

请问是这样的写法么?这边这样写的话一直在报错

请指正!请指正!请指正!

 p2:{
            default:true,
            notify:function()
            {
              //  this.p1.visible = this.p2
            }
        },
         p1:{
            default:"",
            visible:function(){return this.p2},
            readonly:true,
        },

原来是这样写的。。。。我晕!