Vue.component("http-firewall-provider-selector", { props: ["v-type", "v-providers"], data: function () { let providers = this.vProviders if (providers == null) { providers = [] } return { listType: this.vType, providers: providers } }, methods: { addProvider: function () { let selectedProviderIds = this.providers.map(function (provider) { return provider.id }) let that = this teaweb.popup("/servers/server/settings/waf/ipadmin/selectProvidersPopup?type=" + this.listType + "&selectedProviderIds=" + selectedProviderIds.join(","), { width: "50em", height: "26em", callback: function (resp) { that.providers = resp.data.selectedProviders that.$forceUpdate() that.notifyChange() } }) }, removeProvider: function (index) { this.providers.$remove(index) this.notifyChange() }, resetProviders: function () { this.providers = [] this.notifyChange() }, notifyChange: function () { this.$emit("change", { "providers": this.providers }) } }, template: `
暂时没有选择允许封禁的运营商。
{{provider.name}}
 
` })