File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed
core/core-frontend/src/custom-component/v-query Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -914,7 +914,8 @@ const autoStyle = computed(() => {
914
914
position : relative ;
915
915
--ed-font-size-base : v- bind(boxWidth);
916
916
917
- :deep(.ed-select-v2 .ed-select-v2__selection .ed-tag ) {
917
+ :deep(.ed-select-v2 .ed-select-v2__selection .ed-tag ),
918
+ :deep(.select-trigger .ed-select__tags .ed-tag ) {
918
919
background-color : v- bind(tagColor);
919
920
}
920
921
Original file line number Diff line number Diff line change @@ -638,6 +638,14 @@ onMounted(() => {
638
638
Boolean (document .querySelector (' .datav-preview' ))
639
639
})
640
640
641
+ const tagWidth = computed (() => {
642
+ return Math .min (getCustomWidth () / 3 , 40 ) + ' px'
643
+ })
644
+
645
+ const tagTextWidth = computed (() => {
646
+ return Math .min (getCustomWidth () / 3 , 50 ) - 25 + ' px'
647
+ })
648
+
641
649
defineExpose ({
642
650
displayTypeChange ,
643
651
mult ,
@@ -730,3 +738,15 @@ defineExpose({
730
738
}
731
739
}
732
740
</style >
741
+
742
+ <style lang="less" scoped>
743
+ :deep(.ed-select-v2__selection ) {
744
+ .ed-tag {
745
+ max-width : v- bind(tagWidth);
746
+ }
747
+
748
+ .ed-select__tags-text {
749
+ max-width : v- bind(tagTextWidth) !important ;
750
+ }
751
+ }
752
+ </style >
Original file line number Diff line number Diff line change @@ -135,6 +135,18 @@ const init = () => {
135
135
getTreeOption ()
136
136
}
137
137
138
+ const tagWidth = computed (() => {
139
+ return Math .min (getCustomWidth () / 3 , 50 ) + ' px'
140
+ })
141
+
142
+ const tagsWidth = computed (() => {
143
+ return getCustomWidth () - 40 + ' px'
144
+ })
145
+
146
+ const tagTextWidth = computed (() => {
147
+ return Math .min (getCustomWidth () / 3 , 50 ) - 25 + ' px'
148
+ })
149
+
138
150
const showOrHide = ref (true )
139
151
const queryConditionWidth = inject (' com-width' , Function , true )
140
152
const isConfirmSearch = inject (' is-confirm-search' , Function , true )
@@ -314,4 +326,15 @@ const selectStyle = computed(() => {
314
326
:deep(.ed-select-tags-wrapper ) {
315
327
display : inline-flex !important ;
316
328
}
329
+
330
+ :deep(.ed-select__tags ) {
331
+ max-width : v- bind(tagsWidth) !important ;
332
+ .ed-tag {
333
+ max-width : v- bind(tagWidth);
334
+ }
335
+
336
+ .ed-select__tags-text {
337
+ max-width : v- bind(tagTextWidth) !important ;
338
+ }
339
+ }
317
340
</style >
You can’t perform that action at this time.
0 commit comments