Vue.component("http-request-conds-tbody", { props: ["v-cond-groups"], data: function () { let groups = this.vCondGroups if (groups == null) { groups = [] } return { groups: groups, components: window.REQUEST_COND_COMPONENTS } }, methods: { addGroup: function () { let that = this teaweb.popup("/servers/server/settings/conds/addGroupPopup", { height: "30em", callback: function (resp) { that.groups.push(resp.data.group) } }) }, updateGroup: function (groupIndex, group) { window.UPDATING_COND_GROUP = group let that = this teaweb.popup("/servers/server/settings/conds/addGroupPopup", { height: "30em", callback: function (resp) { Vue.set(that.groups, groupIndex, resp.data.group) } }) }, removeGroup: function (groupIndex) { let that = this teaweb.confirm("确定要删除这一组条件吗?", function () { that.groups.$remove(groupIndex) }) }, typeName: function (cond) { let c = this.components.$find(function (k, v) { return v.type == cond.type }) if (c != null) { return c.name; } return cond.param + " " + cond.operator } }, template: `