a2ef06847a
Element 弹层 z-index 自 2000 递增,两站自绘浮层在 2600~3300(遮罩 3000、导出等待 3100、
更新门/铃铛面板 3200、铃铛日期面板 3300)。客户截图:去重数据汇总·新增导入 的分组下拉
点开什么都没有——选项面板被 .modal-mask(3000) 压在下面,不是数据为空(列表行分组列有值)。
- 后管 main.css:补 .el-popper{z-index:3500!important}(此前只抬过 ElMessage/消息盒,
下拉面板漏了;铃铛日期面板是单独打补丁 .bell-date-popper{3300},说明只做过点修)。
- 用户端 main.css:popper/message/message-box 三条一起补(该站一条都没有),
保持在同一个序里:popper 3500 < 消息 4000 < 消息盒 4100。
- 判据:后管 align-message-z-overlay.test.ts +1 支;用户端新增 element-overlay-layering.test.ts
4 支,钉的是顺序不变式(popper<消息<消息盒、popper 高于 3300 档)而不是魔数。
- 棘轮基线点名:align-message-z-overlay 3/3/3→4/4/4,totals 1868/463/665→1869/464/666。
读数:后管 node --test 1966 绿 / vitest 253 绿 / vue-tsc rc=0;用户端 1163 绿 / vitest 156 绿 /
vue-tsc rc=0;反向刀(两处 popper 改回 2000)各红 1 支,逐字节复原后复绿;
_push_gate.py --fast overall=pass(9.5/8.8/9.8/9.6)。
47 lines
2.6 KiB
TypeScript
47 lines
2.6 KiB
TypeScript
import test from 'node:test'
|
||
import assert from 'node:assert/strict'
|
||
import { readSource } from './helpers.ts'
|
||
|
||
// 维护修复:页面自定义 modal-mask(z-index:3000) / 导出等待遮罩(3100) 高于 Element 默认
|
||
// 弹层计数(自 2000 递增),遮罩弹窗内触发的 ElMessage 警告会被浮层挡住看不见——
|
||
// 已在整站层面把消息提示抬到 4000、消息盒确认弹窗抬到 4100,统一高于全部自定义浮层。
|
||
|
||
test('el_message_above_custom_overlays', () => {
|
||
const css = readSource('src/styles/main.css')
|
||
assert.match(
|
||
css,
|
||
/\.el-message\s*\{[^}]*z-index:\s*4000\s*!important/,
|
||
'消息提示需抬升到 4000 且 !important(覆盖 Element 实例内联层级)',
|
||
)
|
||
assert.match(
|
||
css,
|
||
/\.el-overlay\.is-message-box\s*\{[^}]*z-index:\s*4100\s*!important/,
|
||
'消息盒确认弹窗需抬升到 4100(z-index 落在 .el-overlay.is-message-box 内联样式)',
|
||
)
|
||
})
|
||
|
||
// 同一条根因的另一半:Element popper(el-select 下拉面板)同样自 2000 递增,弹窗内下拉点开时
|
||
// 面板落在 modal-mask(3000)/导出等待遮罩(3100) 之下 ⇒ 用户看到的是"点开什么都没有"。
|
||
// z-index 写在 popper 内联 style 上,缺 !important 就整条规则不生效(静默判绿)。
|
||
test('el_popper_above_custom_overlays', () => {
|
||
const css = readSource('src/styles/main.css')
|
||
const matched = css.match(/\.el-popper\s*\{[^}]*z-index:\s*(\d+)\s*!important/)
|
||
assert.ok(matched, '下拉面板层级需 .el-popper z-index … !important(不加 !important 覆盖不住内联层级)')
|
||
const popperZ = Number(matched[1])
|
||
assert.ok(popperZ > 3100, `下拉面板 z-index 需高于全部自定义浮层(遮罩 3000 / 导出等待 3100),当前 ${popperZ}`)
|
||
assert.ok(popperZ < 4000, `下拉面板 z-index 需低于 ElMessage(4000),否则提示会被下拉挡住,当前 ${popperZ}`)
|
||
})
|
||
|
||
test('dedupe_overlay_and_warning_kept', () => {
|
||
const page = readSource('src/pages/asin/DedupeRegistryPage.vue', true)
|
||
assert.match(page, /\.modal-mask\s*\{[^}]*z-index:\s*3000/, '页内遮罩仍为 3000,消息 4000 需保持在其上')
|
||
assert.match(page, /\.dedupe-export-wait-mask\s*\{[^}]*z-index:\s*3100/, '导出等待遮罩 3100 同样低于消息 4000')
|
||
assert.match(page, /请选择数据权限分组|请选择分组/, '导入/编辑未选分组需保留警告岔口')
|
||
})
|
||
|
||
test('records_preview_overlay_below_message', () => {
|
||
const page = readSource('src/pages/records/RecordsHistoryPage.vue')
|
||
assert.match(page, /\.modal-mask\s*\{[^}]*z-index:\s*3000/, '记录预览遮罩 3000 同样低于消息 4000')
|
||
})
|
||
|