Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
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: `<div>
<input type="hidden" name="actionJSON" :value="JSON.stringify(actionConfig)"/>
<div>
<div>
<select class="ui dropdown auto-width" v-model="actionConfig.code">
<option value="">[选择动作]</option>
<option v-for="action in actions" :value="action.code">{{action.name}}</option>
</select>
</div>
<p class="comment" v-if="currentAction != null">{{currentAction.description}}</p>
<div v-if="actionConfig.code == 'webHook'">
<input type="text" placeholder="https://..." v-model="actionConfig.params.url"/>
<p class="comment">接收通知的URL。</p>
</div>
</div>
</div>`
})