mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-10-11 08:03:28 +08:00
数学计算添加进制转换
This commit is contained in:
@@ -148,6 +148,8 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
runCommand() {
|
||||
if (!this.localCommand.code)
|
||||
return quickcommand.showMessageBox("请检查参数是否正确", "info");
|
||||
// 创建一个带临时变量的命令副本
|
||||
const tempCommand = {
|
||||
...this.localCommand,
|
||||
|
@@ -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"],
|
||||
});
|
||||
|
Reference in New Issue
Block a user