Vue.component("http-request-cond-view", { props: ["v-cond"], data: function () { return { cond: this.vCond, components: window.REQUEST_COND_COMPONENTS } }, methods: { 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 }, updateConds: function (conds, simpleCond) { for (let k in simpleCond) { if (simpleCond.hasOwnProperty(k)) { this.cond[k] = simpleCond[k] } } }, notifyChange: function () { } }, template: `
{{cond.param}} {{cond.operator}} {{typeName(cond)}}: {{cond.value}}
` })