数学计算添加进制转换

This commit is contained in:
fofolee
2025-01-10 19:35:02 +08:00
parent 5e70c4c9a0
commit dc7a2c9049
5 changed files with 70 additions and 204 deletions

View File

@@ -148,6 +148,8 @@ export default defineComponent({
}
},
runCommand() {
if (!this.localCommand.code)
return quickcommand.showMessageBox("请检查参数是否正确", "info");
// 创建一个带临时变量的命令副本
const tempCommand = {
...this.localCommand,

View File

@@ -1,21 +1,32 @@
<template>
<div class="button-group">
<div
v-for="opt in options"
:key="opt.value"
:class="['button-item', { active: modelValue === opt.value }]"
@click="$emit('update:modelValue', opt.value)"
>
{{ opt.label }}
<component
:is="!!label ? 'BorderLabel' : 'div'"
:label="label"
:icon="icon"
:model-value="isCollapse"
>
<div class="button-group">
<div
v-for="opt in options"
:key="opt.value"
:class="['button-item', { active: modelValue === opt.value }]"
@click="$emit('update:modelValue', opt.value)"
>
{{ opt.label }}
</div>
</div>
</div>
</component>
</template>
<script>
import { defineComponent } from "vue";
import BorderLabel from "./BorderLabel.vue";
export default defineComponent({
name: "ButtonGroup",
components: {
BorderLabel,
},
props: {
modelValue: {
required: true,
@@ -24,6 +35,18 @@ export default defineComponent({
type: Array,
required: true,
},
label: {
type: String,
default: "",
},
icon: {
type: String,
default: "",
},
isCollapse: {
type: Boolean,
default: false,
},
},
emits: ["update:modelValue"],
});