fix: 解决选择框异常压缩、新增绑定自动选择首个分组、以及弹窗自适应2K显示器比例
This commit is contained in:
@@ -308,7 +308,7 @@
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<!-- 选择上游分组弹窗 -->
|
<!-- 选择上游分组弹窗 -->
|
||||||
<el-dialog v-model="groupSelectVisible" title="选择上游分组" width="850px" destroy-on-close class="group-select-dialog custom-theme-dialog">
|
<el-dialog v-model="groupSelectVisible" title="选择上游分组" width="min(85vw, 1200px)" destroy-on-close class="group-select-dialog custom-theme-dialog">
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<div class="dialog-search-bar" style="margin-bottom: 16px;">
|
<div class="dialog-search-bar" style="margin-bottom: 16px;">
|
||||||
<el-input v-model="groupSearchQuery" placeholder="输入上游名称、分组名称、分组 ID、倍率进行过滤..." clearable class="custom-theme-search">
|
<el-input v-model="groupSearchQuery" placeholder="输入上游名称、分组名称、分组 ID、倍率进行过滤..." clearable class="custom-theme-search">
|
||||||
@@ -1173,6 +1173,12 @@ async function openBindingCreate(site?: WebsiteData | null, target?: WebsiteGrou
|
|||||||
if (target) {
|
if (target) {
|
||||||
bindingForm.value.target_group_id = target.id
|
bindingForm.value.target_group_id = target.id
|
||||||
bindingForm.value.target_group_name = target.name
|
bindingForm.value.target_group_name = target.name
|
||||||
|
} else {
|
||||||
|
const first = bindingWebsiteGroups.value[0]
|
||||||
|
if (first) {
|
||||||
|
bindingForm.value.target_group_id = first.id
|
||||||
|
bindingForm.value.target_group_name = first.name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sourceGroupKeys.value = []
|
sourceGroupKeys.value = []
|
||||||
bindingDrawer.value = true
|
bindingDrawer.value = true
|
||||||
@@ -1198,6 +1204,11 @@ async function onBindingWebsiteChange(value: number) {
|
|||||||
bindingForm.value.target_group_id = ''
|
bindingForm.value.target_group_id = ''
|
||||||
bindingForm.value.target_group_name = ''
|
bindingForm.value.target_group_name = ''
|
||||||
await loadBindingWebsiteGroups(value)
|
await loadBindingWebsiteGroups(value)
|
||||||
|
const first = bindingWebsiteGroups.value[0]
|
||||||
|
if (first) {
|
||||||
|
bindingForm.value.target_group_id = first.id
|
||||||
|
bindingForm.value.target_group_name = first.name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTargetGroupChange(value: string) {
|
function onTargetGroupChange(value: string) {
|
||||||
@@ -2006,6 +2017,7 @@ onMounted(loadAll)
|
|||||||
background: #271a16 !important;
|
background: #271a16 !important;
|
||||||
border: 1px solid #3e2821;
|
border: 1px solid #3e2821;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
width: min(85vw, 1200px) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-theme-dialog .el-dialog__header {
|
.custom-theme-dialog .el-dialog__header {
|
||||||
@@ -2043,24 +2055,40 @@ onMounted(loadAll)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Element Select Box Theme */
|
/* Element Select Box Theme */
|
||||||
|
.custom-select-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-theme-select {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
.custom-theme-select .el-select__wrapper {
|
.custom-theme-select .el-select__wrapper {
|
||||||
background: #160c0a !important;
|
background: #160c0a !important;
|
||||||
border: 1px solid #3e2821 !important;
|
border: 1px solid #3e2821 !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
width: 100% !important;
|
||||||
|
min-height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-theme-select .el-select__placeholder {
|
.custom-theme-select .el-select__placeholder {
|
||||||
color: #f5ecea !important;
|
color: #f5ecea !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-theme-select .el-select__selected-item {
|
||||||
|
color: #f5ecea !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* Layout for selectors dialog */
|
/* Layout for selectors dialog */
|
||||||
.group-selector-layout {
|
.group-selector-layout {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 180px 1fr 220px;
|
grid-template-columns: 200px 1fr 240px;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
height: 450px;
|
height: 55vh;
|
||||||
|
min-height: 450px;
|
||||||
|
max-height: 750px;
|
||||||
border: 1px solid #3e2821;
|
border: 1px solid #3e2821;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: #271a16;
|
background: #271a16;
|
||||||
|
|||||||
Reference in New Issue
Block a user