如何让继承自cc.Button的可编辑字段不显示

我们想自定义一个KdToggle, 继承自cc.Toggle, 目的是想让未选中状态时显示另外一个图片.
但是 这么做发现有很多cc.Button的字段 也显示在了 creator的properties面板里面, 如何让这些字段隐藏呢 ,看 Toggle组件是继承自cc.Button的,但本身是不会显示cc.Button的那些字段的.

以button的interactable属性举例,在你的组件里就应该这样写
interactable:{
default: false,
override: true,
visible: false
}

http://www.cocos.com/docs/creator/scripting/reference/class.html

你自己试试看行不行

这样写报错
Can not declare KdToggle.interactable, it is already defined in the prototype of KdToggle
at Object.cc.errorID (/Applications/CocosCreator.app/Contents/Resources/engine/CCDebugger.js:332:22)
at defineProp (/Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/platform/CCClass.js:132:20)
at declareProperties (/Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/platform/CCClass.js:691:17)
at Object.CCClass [as Class] (/Applications/CocosCreator.app/Contents/Resources/engine/cocos2d/core/platform/CCClass.js:816:9)
at Object.require.KdToggle (assets/script/kdui/control/KdToggle.js:1)
at s (…/…/…/…/…/…/…/…/…/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/browser-pack/_prelude.js:1)
at e (…/…/…/…/…/…/…/…/…/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/browser-pack/_prelude.js:1)
at file:///Users/shishaoguang/work/Kingdom/kingdom/client/kingdom/library/bundle.project.js?020:1:451

我看 cc.Toggle是继承自cc.Button的, 但是他却没有出现cc.Button相关的字段 是怎么做到的呢

需要自定义 inspector,这个 inspector 的定制可以弄成一个插件