fix(admin): 统一后台筛选控件高度与对齐
This commit is contained in:
@@ -14,10 +14,10 @@ defineProps<{
|
||||
|
||||
<template>
|
||||
<div class="batch-delete-actions">
|
||||
<button class="btn btn-danger" type="button" :disabled="batch.disabled || !batch.count" @click="batch.submit">
|
||||
<button class="btn btn-danger batch-delete-button" type="button" :disabled="batch.disabled || !batch.count" @click="batch.submit">
|
||||
{{ batch.progress ? `正在${batch.verb} ${batch.progress}` : `批量${batch.verb}(${batch.count})` }}
|
||||
</button>
|
||||
<button v-if="batch.count" class="btn btn-sm" type="button" :disabled="batch.disabled" @click="batch.clearSelection">清除勾选</button>
|
||||
<button v-if="batch.count" class="btn btn-sm batch-clear-button" type="button" :disabled="batch.disabled" @click="batch.clearSelection">清除勾选</button>
|
||||
<details v-if="batch.result?.failures.length" class="batch-delete-failures">
|
||||
<summary>查看失败原因({{ batch.result.failures.length }} 条)</summary>
|
||||
<ul>
|
||||
@@ -28,8 +28,21 @@ defineProps<{
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.batch-delete-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.batch-delete-actions .btn-danger { color: #fff; background: #b35f6a; border-color: #b35f6a; }
|
||||
.batch-delete-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
|
||||
.batch-delete-actions button {
|
||||
min-height: 34px;
|
||||
padding: 5px 12px;
|
||||
border: 1px solid var(--admin-border);
|
||||
border-radius: 9px;
|
||||
background: #fff;
|
||||
color: var(--admin-text);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.batch-delete-actions .batch-delete-button { color: #fff; background: #b35f6a; border-color: #b35f6a; }
|
||||
.batch-delete-button:hover:not(:disabled) { background: #a34f5b; }
|
||||
.batch-clear-button:hover:not(:disabled) { background: #edf5fb; }
|
||||
.batch-delete-actions button:focus-visible { outline: 2px solid var(--admin-primary); outline-offset: 2px; }
|
||||
.batch-delete-actions button:disabled { cursor: not-allowed; opacity: 0.55; }
|
||||
.batch-delete-failures { max-width: 520px; color: #9f3845; overflow-wrap: anywhere; }
|
||||
.batch-delete-failures ul { max-height: 180px; overflow: auto; margin: 4px 0; padding-left: 20px; }
|
||||
|
||||
@@ -171,17 +171,17 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<div class="form-row invalid-filter-row">
|
||||
<div class="form-group" style="min-width: 200px">
|
||||
<label>ASIN</label>
|
||||
<input v-model="filter.dataValue" type="text" placeholder="输入 ASIN" @keyup.enter="apply" />
|
||||
<div class="form-group">
|
||||
<label for="invalid-asin-filter">ASIN</label>
|
||||
<input id="invalid-asin-filter" v-model="filter.dataValue" type="text" placeholder="输入 ASIN" @keyup.enter="apply" />
|
||||
</div>
|
||||
<div class="form-group" style="min-width: 200px">
|
||||
<label>品牌</label>
|
||||
<input v-model="filter.brand" type="text" placeholder="输入品牌" @keyup.enter="apply" />
|
||||
<div class="form-group">
|
||||
<label for="invalid-brand-filter">品牌</label>
|
||||
<input id="invalid-brand-filter" v-model="filter.brand" type="text" placeholder="输入品牌" @keyup.enter="apply" />
|
||||
</div>
|
||||
<div class="form-group" style="min-width: 180px">
|
||||
<label>分组</label>
|
||||
<el-select v-model="filter.groupId" class="admin-filter" filterable clearable placeholder="全部分组">
|
||||
<div class="form-group">
|
||||
<label for="invalid-group-filter">分组</label>
|
||||
<el-select id="invalid-group-filter" v-model="filter.groupId" class="admin-filter" filterable clearable placeholder="全部分组">
|
||||
<el-option v-for="group in groupOptions" :key="group.id" :label="group.groupName" :value="group.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -293,7 +293,7 @@ h3 {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-row {
|
||||
display: flex;
|
||||
@@ -308,6 +308,11 @@ h3 {
|
||||
gap: 7px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.invalid-filter-row > .form-group {
|
||||
flex: 0 1 190px;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
.form-group label {
|
||||
color: #5b6f83;
|
||||
font-size: 12.5px;
|
||||
|
||||
@@ -336,7 +336,7 @@ onMounted(loadTree)
|
||||
<section class="panel-box">
|
||||
<div class="category-head">
|
||||
<h3>商品类目</h3>
|
||||
<div class="category-head-tools">
|
||||
<div class="category-head-tools admin-header-controls">
|
||||
<input v-model="keyword" type="text" placeholder="搜索类目名称、编码或备注" class="category-keyword" @keyup.enter="apply" />
|
||||
<button class="btn btn-sm" type="button" @click="apply">搜索</button>
|
||||
<button class="btn btn-sm btn-secondary" type="button" @click="reset">清空</button>
|
||||
|
||||
@@ -229,7 +229,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="dh-head">
|
||||
<h3>版本列表</h3>
|
||||
<div class="dh-head-tools">
|
||||
<div class="dh-head-tools admin-header-controls">
|
||||
<input v-model="versionKeyword" type="text" placeholder="搜索版本号" class="dh-keyword" />
|
||||
<button class="btn" type="button" @click="uploadVisible = true">上传新版本</button>
|
||||
</div>
|
||||
|
||||
@@ -162,7 +162,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="version-head">
|
||||
<h3>版本列表</h3>
|
||||
<div class="version-head-tools">
|
||||
<div class="version-head-tools admin-header-controls">
|
||||
<input v-model="versionKeyword" type="text" placeholder="搜索版本号" class="version-keyword" />
|
||||
<button class="btn btn-danger" type="button" :disabled="!selectedCount" @click="removeSelected">删除选中{{ selectedCount ? `(${selectedCount})` : '' }}</button>
|
||||
<button class="btn" type="button" @click="openUpload">上传新版本</button>
|
||||
|
||||
@@ -214,7 +214,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="tutorial-head">
|
||||
<h3>教程包列表</h3>
|
||||
<div class="tutorial-head-tools">
|
||||
<div class="tutorial-head-tools admin-header-controls">
|
||||
<input v-model="keyword" type="text" placeholder="搜索文件名" class="tutorial-keyword" />
|
||||
<button class="btn btn-danger" type="button" :disabled="!selectedCount" @click="removeSelected">删除选中{{ selectedCount ? `(${selectedCount})` : '' }}</button>
|
||||
<button class="btn" type="button" @click="openUpload">上传教程包</button>
|
||||
|
||||
@@ -170,7 +170,7 @@ onMounted(load)
|
||||
<section class="panel-box">
|
||||
<div class="workbench-head">
|
||||
<h3>客户端包列表</h3>
|
||||
<div class="workbench-head-tools">
|
||||
<div class="workbench-head-tools admin-header-controls">
|
||||
<input v-model="keyword" type="text" placeholder="搜索版本号或文件名" class="workbench-keyword" />
|
||||
<button class="btn btn-danger" type="button" :disabled="!selectedCount" @click="removeSelected">删除选中{{ selectedCount ? `(${selectedCount})` : '' }}</button>
|
||||
<button class="btn" type="button" @click="openUpload">上传客户端包</button>
|
||||
|
||||
@@ -219,12 +219,12 @@ button, input, textarea, select { font: inherit; }
|
||||
background: #f8fbfd;
|
||||
box-shadow: 0 0 0 1px #cbd9e6 inset;
|
||||
}
|
||||
.el-select.admin-filter .el-select__wrapper:hover {
|
||||
.el-select.admin-filter .el-select__wrapper:hover:not(.is-disabled, .is-focused) {
|
||||
box-shadow: 0 0 0 1px #9fb7cd inset;
|
||||
}
|
||||
.el-select.admin-filter.is-focused .el-select__wrapper {
|
||||
.el-select.admin-filter .el-select__wrapper.is-focused {
|
||||
background: #ffffff;
|
||||
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
|
||||
box-shadow: 0 0 0 1px var(--admin-primary) inset, 0 0 0 3px rgba(95, 133, 173, 0.16);
|
||||
}
|
||||
|
||||
/* 列表密度统一收口;带壳层作用域的选择器覆盖各页 scoped 旧皮肤,不影响弹窗编辑表单。 */
|
||||
@@ -242,9 +242,15 @@ button, input, textarea, select { font: inherit; }
|
||||
flex: 1 1 140px; min-width: 0; max-width: 220px;
|
||||
}
|
||||
.admin-shell .admin-content :is(.form-row, .clean-filter-row, .dedupe-filter-row, .dedupe-filter-date-row, .jd-filter-row) .form-group { gap: 4px; }
|
||||
.admin-shell .admin-content :is(.panel-box, .form-box) .form-group input:not([type="checkbox"]):not([type="radio"]),
|
||||
/* 只给原生字段的外框定尺寸,不穿透下拉/级联组件的内部输入。 */
|
||||
.admin-shell .admin-content :is(.panel-box, .form-box) .form-group > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
|
||||
.admin-shell .admin-content .price-range-row > input,
|
||||
.admin-shell .admin-content .admin-header-controls > input,
|
||||
.admin-shell .admin-content .jd-group-locked { min-height: 34px; padding: 5px 10px; }
|
||||
.admin-shell .admin-content .el-select.admin-filter .el-select__wrapper { min-height: 34px; padding: 4px 10px; }
|
||||
.admin-shell .admin-content .admin-header-controls { min-width: 0; flex-wrap: wrap; gap: 8px; }
|
||||
.admin-shell .admin-content .admin-header-controls > input { max-width: 100%; }
|
||||
.admin-shell .admin-content .admin-header-controls > .btn,
|
||||
.admin-shell .admin-content :is(.panel-box, .form-box) .btn:not(.btn-sm) { min-height: 34px; padding: 5px 12px; }
|
||||
.admin-shell .admin-content :is(.clean-filter-actions, .dedupe-filter-actions, .jd-filter-actions) { flex-wrap: wrap; gap: 6px; }
|
||||
.admin-shell .admin-content .jd-filter-row > .el-select.admin-filter { width: 170px; }
|
||||
|
||||
Reference in New Issue
Block a user