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