mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2026-03-05 04:40:35 +08:00
完善选项列表切换不同类型时的选项处理逻辑
This commit is contained in:
@@ -5,12 +5,15 @@
|
||||
<div
|
||||
v-for="key in optionsKeys"
|
||||
:key="key.value"
|
||||
:class="['col', optionsKeys.length > 1 ? 'q-pr-sm' : '']"
|
||||
:class="[
|
||||
key.width ? `col-${key.width}` : 'col',
|
||||
optionsKeys.length > 1 ? 'q-pr-sm' : '',
|
||||
]"
|
||||
>
|
||||
<VariableInput
|
||||
:model-value="item[key.value]"
|
||||
:label="key.label"
|
||||
:icon="icon || 'code'"
|
||||
:no-icon="true"
|
||||
@update:model-value="
|
||||
(val) => updateItemKeyValue(index, key.value, val)
|
||||
"
|
||||
@@ -155,6 +158,7 @@ export default defineComponent({
|
||||
return {
|
||||
value: key.value || key,
|
||||
label: key.label || key,
|
||||
width: key.width,
|
||||
};
|
||||
}) || []
|
||||
);
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
</q-btn-dropdown>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon :name="icon || 'code'" />
|
||||
<q-icon v-if="!noIcon" :name="icon || 'code'" />
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
@@ -187,6 +187,7 @@ export default defineComponent({
|
||||
},
|
||||
label: String,
|
||||
icon: String,
|
||||
noIcon: Boolean,
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
|
||||
Reference in New Issue
Block a user