样式微调,冗余代码清理

This commit is contained in:
fofolee 2025-02-12 15:16:30 +08:00
parent b4a14e2a9e
commit e71d7081a8
6 changed files with 19 additions and 22 deletions

View File

@ -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;

View File

@ -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";

View File

@ -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 {

View File

@ -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 = "";

View File

@ -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

View File

@ -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 {