Skip to content

Commit 90f8160

Browse files
perf: tag style
1 parent c3fe1a1 commit 90f8160

File tree

6 files changed

+38
-22
lines changed

6 files changed

+38
-22
lines changed

ui/src/components/dynamics-form/constructor/items/UploadInputConstructor.vue

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,35 @@
4545
},
4646
]"
4747
>
48-
<div class="gap-2" style="display: flex">
48+
<el-space wrap :size="6" class="mt-4">
4949
<el-tag
5050
v-for="tag in formValue.accept"
5151
:key="tag"
5252
closable
5353
:disable-transitions="false"
5454
@close="handleClose(tag)"
55+
type="info"
56+
effect="plain"
57+
class="upload-file-tag"
5558
>
5659
{{ tag }}
5760
</el-tag>
5861
<el-input
5962
v-if="inputVisible"
6063
ref="InputRef"
6164
v-model="inputValue"
62-
class="w-20"
6365
size="small"
6466
@keyup.enter="handleInputConfirm"
6567
@blur="handleInputConfirm"
68+
:style="{
69+
'--el-input-border-radius': '4px',
70+
}"
6671
/>
6772
<el-button v-else class="button-new-tag" size="small" @click="showInput">
68-
+ {{ $t('common.fileUpload.addExtensions') }}
73+
<AppIcon iconName="app-add-outlined" class="mr-4"></AppIcon
74+
>{{ $t('common.fileUpload.addExtensions') }}
6975
</el-button>
70-
</div>
76+
</el-space>
7177
</el-form-item>
7278
</template>
7379
<script setup lang="ts">
@@ -146,8 +152,4 @@ onMounted(() => {
146152
}
147153
})
148154
</script>
149-
<style lang="scss" scoped>
150-
.gap-2 {
151-
gap: 0.5rem;
152-
}
153-
</style>
155+
<style lang="scss" scoped></style>

ui/src/components/resource-authorization-drawer/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
width="160"
105105
>
106106
<template #default="{ row }">
107-
<TagGroup class="cursor" style="width: fit-content" :tags="row.role_name" />
107+
<TagGroup class="cursor" :tags="row.role_name" />
108108
</template>
109109
</el-table-column>
110110
<el-table-column :label="$t('common.operation')" align="left" width="340">

ui/src/components/tag-group/index.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,11 @@ const props = defineProps<{
3939

4040
<style lang="scss" scoped>
4141
.tag-group {
42-
:deep(.el-tag__content) {
43-
width: 100%;
44-
}
4542
/* tag超出省略号 */
4643
.tag-ellipsis {
4744
box-sizing: border-box;
4845
max-width: 130px;
49-
.el-tag__content {
46+
:deep(.el-tag__content) {
5047
overflow: hidden;
5148
white-space: nowrap;
5249
text-overflow: ellipsis;

ui/src/styles/component.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,3 +357,21 @@
357357
display: none;
358358
}
359359
}
360+
361+
// 添加标签样式
362+
.upload-file-tag {
363+
height: 24px !important;
364+
padding: 0 6px !important;
365+
font-size: 14px !important;
366+
}
367+
.button-new-tag {
368+
color: var(--app-input-color-placeholder);
369+
border: 1px dashed var(--el-button-border-color);
370+
padding: 5px 6px !important;
371+
font-size: 14px !important;
372+
&:hover {
373+
background: var(--app-layout-bg-color);
374+
color: var(--app-input-color-placeholder);
375+
border: 1px dashed var(--el-button-border-color);
376+
}
377+
}

ui/src/views/system/user-manage/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@
168168
<template #reference>
169169
<TagGroup
170170
class="cursor"
171-
style="width: fit-content"
172171
:tags="row.role_name"
173172
tooltipDisabled
174173
/>

ui/src/workflow/nodes/base-node/component/FileUploadSettingDialog.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,16 @@
179179
}}
180180
</el-text>
181181
</p>
182-
<el-space wrap :size="2" class="mt-4">
182+
<el-space wrap :size="6" class="mt-4">
183183
<el-tag
184184
v-for="tag in form_data.otherExtensions"
185185
:key="tag"
186186
closable
187187
:disable-transitions="false"
188188
@close="handleClose(tag)"
189189
type="info"
190-
class="mr-4"
191190
effect="plain"
192-
style="
193-
--el-tag-border-radius: 4px;
194-
--el-tag-border-color: var(--el-border-color);
195-
"
191+
class="upload-file-tag"
196192
>
197193
{{ tag }}
198194
</el-tag>
@@ -203,9 +199,13 @@
203199
size="small"
204200
@keyup.enter="handleInputConfirm"
205201
@blur="handleInputConfirm"
202+
:style="{
203+
'--el-input-border-radius': '4px',
204+
}"
206205
/>
207206
<el-button v-else class="button-new-tag" size="small" @click.stop="showInput">
208-
+ {{ $t('common.fileUpload.addExtensions') }}
207+
<AppIcon iconName="app-add-outlined" class="mr-4"></AppIcon>
208+
{{ $t('common.fileUpload.addExtensions') }}
209209
</el-button>
210210
</el-space>
211211
</div>

0 commit comments

Comments
 (0)