diff --git a/spug_web/src/pages/schedule/Step1.js b/spug_web/src/pages/schedule/Step1.js index 368a18f..516533c 100644 --- a/spug_web/src/pages/schedule/Step1.js +++ b/spug_web/src/pages/schedule/Step1.js @@ -11,7 +11,6 @@ export default observer(function () { const [form] = Form.useForm(); const [showTmp, setShowTmp] = useState(false); const [command, setCommand] = useState(store.record.command || ''); - const [interpreter, setInterpreter] = useState(store.record.interpreter || 'sh'); function handleAddZone() { let type; @@ -44,6 +43,12 @@ export default observer(function () { Object.assign(store.record, form.getFieldsValue(), {command: cleanCommand(command)}) } + function handleSelect(tpl) { + const {interpreter, body} = tpl; + setCommand(body) + form.setFieldsValue({interpreter}) + } + let modePlaceholder; switch (store.record.rst_notify.mode) { case '0': @@ -80,13 +85,18 @@ export default observer(function () {