fix(query-builder): fix query builder style not align (#3227)

This commit is contained in:
gimmyhehe 2025-04-07 10:00:19 +08:00 committed by GitHub
parent 358d642afb
commit 01ab6a8ee4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 48 additions and 4 deletions

View File

@ -171,6 +171,28 @@
flex: auto;
}
.custom-rule-value-editor {
display: flex;
width: 40%;
& > div {
width: 100%;
}
&_multi {
display: flex;
gap: 8px;
&-item {
width: 50%;
& > div {
width: 100%;
}
}
}
}
.rule-item--wrap {
display: flex;
padding: 0 10px;

View File

@ -167,6 +167,28 @@
flex: auto;
}
.custom-rule-value-editor {
display: flex;
width: 40%;
& > div {
width: 100%;
}
&_multi {
display: flex;
gap: 8px;
&-item {
width: 50%;
& > div {
width: 100%;
}
}
}
}
.rule-item--wrap {
display: flex;
padding: 0 10px;

View File

@ -1,5 +1,5 @@
<template>
<div v-if="!show" class="hide"></div>
<div v-if="!show" style="display: none"></div>
<span
v-else-if="['text', 'select'].includes(type) && ['between', 'notBetween'].includes(operator)"
:data-testid="testID"
@ -66,9 +66,9 @@
:events="{ change }"
></custom-input>
</span>
<span v-else-if="type === 'custom' && allProps.fieldData.component">
<div v-if="['between', 'notBetween'].includes(operator)">
<div v-for="(key, i) in ['from', 'to']" :key="key">
<span v-else-if="type === 'custom' && allProps.fieldData.component" class="custom-rule-value-editor">
<div v-if="['between', 'notBetween'].includes(operator)" class="custom-rule-value-editor_multi">
<div v-for="(key, i) in ['from', 'to']" :key="key" class="custom-rule-value-editor_multi-item">
<component
:is="allProps.fieldData.component"
v-bind="getProps(allProps.fieldData)"