bt-inspector.js 408 B

123456789101112131415161718
  1. Vue.component('foobar-inspector', {
  2. template: `
  3. <ui-button v-on:click="openBTEditor">编辑</ui-button>
  4. `,
  5. props: {
  6. target: {
  7. twoWay: true,
  8. type: Object,
  9. },
  10. },
  11. methods: {
  12. openBTEditor:function(){
  13. Editor.Ipc.sendToMain('behaviortree-editor:re-open-by-comp',{uuid:this.target.__scriptAsset.value.uuid,name:this.target.name.value});
  14. }
  15. }
  16. });