Vue.component("node-schedule-action-box", { props: ["value", "v-actions"], data: function () { let actionConfig = this.value if (actionConfig == null) { actionConfig = { code: "", params: {} } } return { actions: this.vActions, currentAction: null, actionConfig: actionConfig } }, watch: { "actionConfig.code": function (actionCode) { if (actionCode.length == 0) { this.currentAction = null } else { this.currentAction = this.actions.$find(function (k, v) { return v.code == actionCode }) } this.actionConfig.params = {} } }, template: `
{{currentAction.description}}
接收通知的URL。