Vue.component("node-region-selector", { props: ["v-region"], data: function () { return { selectedRegion: this.vRegion } }, methods: { selectRegion: function () { let that = this teaweb.popup("/clusters/regions/selectPopup?clusterId=" + this.vClusterId, { callback: function (resp) { that.selectedRegion = resp.data.region } }) }, addRegion: function () { let that = this teaweb.popup("/clusters/regions/createPopup?clusterId=" + this.vClusterId, { callback: function (resp) { that.selectedRegion = resp.data.region } }) }, removeRegion: function () { this.selectedRegion = null } }, template: `
{{selectedRegion.name}}  
[选择区域]   [添加区域]
` })