mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-18 09:57:23 +08:00
OutPutEditor添加键入建议变量名功能,并加入重名检测
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<OperationCard
|
||||
v-if="hasSubCommands"
|
||||
:model-value="funcName"
|
||||
@update:model-value="funcName = $event"
|
||||
@update:model-value="updateFuncName"
|
||||
:options="localCommand.subCommands"
|
||||
/>
|
||||
<ParamInput :configs="localConfig" :values="argvs" @update="updateArgv" />
|
||||
@@ -204,6 +204,15 @@ export default defineComponent({
|
||||
width: `calc(${columnWidth}% - var(--grid-gap))`,
|
||||
};
|
||||
},
|
||||
updateFuncName(value) {
|
||||
this.funcName = value;
|
||||
// 如果切换了子命令,更新输出变量
|
||||
const selectSubCommand = this.getSelectSubCommand(value);
|
||||
if (!selectSubCommand) return;
|
||||
const newModelValue = { ...this.modelValue, value: value };
|
||||
delete newModelValue.outputVariable;
|
||||
this.$emit("update:modelValue", newModelValue);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const argvs = this.modelValue.argvs || this.defaultArgvs;
|
||||
|
||||
Reference in New Issue
Block a user