样式微调,冗余代码清理

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

View File

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

View File

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

View File

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

View File

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

View File

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