mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-20 10:55:43 +08:00
加强变量校验,重复和非法时自动重命名,优化变量管理,实时获取最新变量,不再进行增删操作
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
}"
|
||||
class="variable-dropdown prepend-btn"
|
||||
size="sm"
|
||||
v-if="variables.length"
|
||||
@click="variables = getCurrentVariables()"
|
||||
>
|
||||
<q-list class="variable-list">
|
||||
<q-item-label header class="variable-label">
|
||||
@@ -108,6 +108,15 @@
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<q-item>
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
>无可用变量,请先点击命令卡片输出变量按钮设置变量</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</template>
|
||||
@@ -176,13 +185,14 @@ export default defineComponent({
|
||||
|
||||
emits: ["update:modelValue"],
|
||||
setup() {
|
||||
const variables = inject("composerVariables", []);
|
||||
return { variables };
|
||||
const getCurrentVariables = inject("getCurrentVariables");
|
||||
return { getCurrentVariables };
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
selectedVariable: null,
|
||||
variables: [],
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user