默认命令只读保护

This commit is contained in:
fofolee 2022-04-09 16:40:55 +08:00
parent 94b19dce5d
commit 690553c9e8
3 changed files with 10 additions and 2 deletions

View File

@ -290,8 +290,6 @@ export default {
handleCardClick() {
//
if (this.cardStyle.code === 1) return this.runCommand();
if (!this.canCommandEdit)
return quickcommand.showMessageBox("默认命令不可编辑", "warning");
this.editCommand();
},
//

View File

@ -3,6 +3,7 @@
<!-- 命令设置栏 -->
<CommandMenu
ref="menu"
:canCommandSave="canCommandSave"
:quickcommandInfo="quickcommandInfo"
class="absolute-left shadow-10"
:style="{

View File

@ -21,6 +21,7 @@
<div>
<!-- 说明 -->
<q-input
:disable="!canCommandSave"
stack-label
label-color="primary"
borderless
@ -36,6 +37,7 @@
</q-input>
<!-- 匹配类型 -->
<q-select
:disable="!canCommandSave"
hide-dropdown-icon
stack-label
label-color="primary"
@ -72,6 +74,7 @@
</q-select>
<!-- 匹配规则 -->
<q-select
:disable="!canCommandSave"
hide-dropdown-icon
stack-label
label-color="primary"
@ -96,6 +99,7 @@
</template>
</q-select>
<q-input
:disable="!canCommandSave"
v-else
autogrow
borderless
@ -113,6 +117,7 @@
</q-input>
<!-- 标签 -->
<q-select
:disable="!canCommandSave"
hide-dropdown-icon
stack-label
label-color="primary"
@ -138,6 +143,7 @@
</q-select>
<!-- 特殊变量 -->
<q-select
:disable="!canCommandSave"
hide-dropdown-icon
stack-label
label-color="primary"
@ -174,6 +180,7 @@
>
<!-- 输出 -->
<q-select
:disable="!canCommandSave"
hide-dropdown-icon
stack-label
label-color="primary"
@ -206,6 +213,7 @@
</q-select>
<!-- 平台 -->
<q-select
:disable="!canCommandSave"
hide-dropdown-icon
stack-label
label-color="primary"
@ -261,6 +269,7 @@ export default {
},
props: {
quickcommandInfo: Object,
canCommandSave: Boolean,
},
mounted() {
window.CommandMenu = this;