mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-16 08:04:18 +08:00
使用通用组件构造控制流程命令,规范配置文件字段命名
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="multi-params">
|
||||
<OperationCard
|
||||
v-if="hasFunctionSelector"
|
||||
v-if="hasSubCommands"
|
||||
:model-value="funcName"
|
||||
@update:model-value="funcName = $event"
|
||||
:options="localCommand.functionSelector"
|
||||
:options="localCommand.subCommands"
|
||||
/>
|
||||
<ParamInput :configs="localConfig" :values="argvs" @update="updateArgv" />
|
||||
</div>
|
||||
@@ -91,13 +91,13 @@ export default defineComponent({
|
||||
this.modelValue.argvs || this.parseCodeToArgvs(this.modelValue.code)
|
||||
);
|
||||
},
|
||||
hasFunctionSelector() {
|
||||
return !!this.localCommand.functionSelector;
|
||||
hasSubCommands() {
|
||||
return !!this.localCommand.subCommands;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getSelectFunction(funcName = this.funcName) {
|
||||
return this.modelValue.functionSelector?.find(
|
||||
return this.modelValue.subCommands?.find(
|
||||
(item) => item.value === funcName
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user