如何动态改变组件属性类型?

比如 
const CompType = cc.Enum({
  TYPE1: 1,
  TYPE2: 2
})
cc.Class({
  name: 'Comp',
  extends: cc.Component,
  properties: {
    compType: {
      type: CompType,
      default: 1
    },
    propAccordingToCompType: {
      type: ????
      default: null
    }
  }
})

当compType选1或2时,propAccordingToCompType的类型随之改变。
然后在cc中可以有不同的界面