Skip to content

Commit 01ab6a8

Browse files
authored
fix(query-builder): fix query builder style not align (#3227)
1 parent 358d642 commit 01ab6a8

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

packages/theme-saas/src/query-builder/index.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,28 @@
171171
flex: auto;
172172
}
173173

174+
.custom-rule-value-editor {
175+
display: flex;
176+
width: 40%;
177+
178+
& > div {
179+
width: 100%;
180+
}
181+
182+
&_multi {
183+
display: flex;
184+
gap: 8px;
185+
186+
&-item {
187+
width: 50%;
188+
189+
& > div {
190+
width: 100%;
191+
}
192+
}
193+
}
194+
}
195+
174196
.rule-item--wrap {
175197
display: flex;
176198
padding: 0 10px;

packages/theme/src/query-builder/index.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,28 @@
167167
flex: auto;
168168
}
169169

170+
.custom-rule-value-editor {
171+
display: flex;
172+
width: 40%;
173+
174+
& > div {
175+
width: 100%;
176+
}
177+
178+
&_multi {
179+
display: flex;
180+
gap: 8px;
181+
182+
&-item {
183+
width: 50%;
184+
185+
& > div {
186+
width: 100%;
187+
}
188+
}
189+
}
190+
}
191+
170192
.rule-item--wrap {
171193
display: flex;
172194
padding: 0 10px;

packages/vue/src/query-builder/src/components/ValueEditor.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div v-if="!show" class="hide"></div>
2+
<div v-if="!show" style="display: none"></div>
33
<span
44
v-else-if="['text', 'select'].includes(type) && ['between', 'notBetween'].includes(operator)"
55
:data-testid="testID"
@@ -66,9 +66,9 @@
6666
:events="{ change }"
6767
></custom-input>
6868
</span>
69-
<span v-else-if="type === 'custom' && allProps.fieldData.component">
70-
<div v-if="['between', 'notBetween'].includes(operator)">
71-
<div v-for="(key, i) in ['from', 'to']" :key="key">
69+
<span v-else-if="type === 'custom' && allProps.fieldData.component" class="custom-rule-value-editor">
70+
<div v-if="['between', 'notBetween'].includes(operator)" class="custom-rule-value-editor_multi">
71+
<div v-for="(key, i) in ['from', 'to']" :key="key" class="custom-rule-value-editor_multi-item">
7272
<component
7373
:is="allProps.fieldData.component"
7474
v-bind="getProps(allProps.fieldData)"

0 commit comments

Comments
 (0)