mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 13:34:08 +08:00
样式微调,冗余代码清理
This commit is contained in:
parent
b4a14e2a9e
commit
e71d7081a8
@ -114,8 +114,8 @@ export default {
|
||||
// window类型的额外应用数量标签的宽度
|
||||
for (let i = 0; i < visibleTagCount; i++) {
|
||||
const cmd = this.cmds[i];
|
||||
if (cmd.type === 'window' && cmd.match.app.length > 1) {
|
||||
extraBadgesWidth += 31; // 额外应用数量标签的宽度
|
||||
if (cmd.type === "window" && cmd.match.app.length > 1) {
|
||||
extraBadgesWidth += 31; // 额外应用数量标签的宽度
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ export default {
|
||||
width += 1;
|
||||
}
|
||||
}
|
||||
return width * 6; // 假设每个英文字符宽度为6px
|
||||
return width * 6; // 假设每个英文字符宽度为6px
|
||||
},
|
||||
// 判断是否需要显示tooltip(文本是否溢出)
|
||||
needTooltip(cmd) {
|
||||
@ -182,8 +182,8 @@ export default {
|
||||
}
|
||||
|
||||
// 计算文本是否超出可用宽度
|
||||
const iconWidth = 20; // 图标宽度
|
||||
const paddingWidth = 16; // 内边距宽度
|
||||
const iconWidth = 20; // 图标宽度
|
||||
const paddingWidth = 16; // 内边距宽度
|
||||
const availableWidth = this.maxTagWidth - iconWidth - paddingWidth;
|
||||
|
||||
return this.getTextWidth(text) > availableWidth;
|
||||
|
@ -90,7 +90,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent, inject, provide, computed } from "vue";
|
||||
import { defineComponent, provide, computed } from "vue";
|
||||
import VariableInput from "components/composer/common/VariableInput.vue";
|
||||
import MultiParams from "components/composer/MultiParams.vue";
|
||||
import CommandHead from "components/composer/card/CommandHead.vue";
|
||||
|
@ -568,7 +568,6 @@ export default defineComponent({
|
||||
|
||||
.command-flow-container {
|
||||
padding: 8px;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
@ -576,10 +575,6 @@ export default defineComponent({
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.body--dark .command-flow-container {
|
||||
background-color: rgba(32, 32, 32, 0.8);
|
||||
}
|
||||
|
||||
/* 滑动淡出动画 */
|
||||
.slide-fade-enter-active,
|
||||
.slide-fade-leave-active {
|
||||
|
@ -203,12 +203,6 @@ export default defineComponent({
|
||||
(cmd) => cmd.value === this.command.value
|
||||
);
|
||||
},
|
||||
defaultOutputVariable() {
|
||||
return (
|
||||
this.currentSubCommand?.defaultOutputVariable ||
|
||||
this.command.defaultOutputVariable
|
||||
);
|
||||
},
|
||||
commandName() {
|
||||
return this.currentSubCommand.label || this.command.label;
|
||||
},
|
||||
@ -256,8 +250,7 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initOutputVars(value) {
|
||||
const outputVariable = value || this.defaultOutputVariable;
|
||||
initOutputVars(outputVariable) {
|
||||
// 初始化完整输出变量名
|
||||
if (!outputVariable) {
|
||||
this.simpleOutputVar = "";
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div class="composer-buttons">
|
||||
<div class="right-buttons">
|
||||
<q-btn icon="close" dense flat v-close-popup v-if="showCloseButton">
|
||||
<q-btn
|
||||
icon="close"
|
||||
dense
|
||||
flat
|
||||
v-if="showCloseButton"
|
||||
@click="$emit('action', 'close')"
|
||||
>
|
||||
<q-tooltip>退出可视化编排</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
|
@ -48,13 +48,16 @@ export default defineComponent({
|
||||
justify-content: center;
|
||||
border: 2px dashed #e0e0e0;
|
||||
border-radius: 4px;
|
||||
margin: 8px 0;
|
||||
transition: all 0.3s ease;
|
||||
flex: 1;
|
||||
user-select: none;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.drop-area:has(.add-area) {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.body--dark .drop-area {
|
||||
border-color: #676666;
|
||||
}
|
||||
@ -94,7 +97,7 @@ export default defineComponent({
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: grey
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.add-area {
|
||||
|
Loading…
x
Reference in New Issue
Block a user