fix(admin-vue): 外观专利数据库「同步时间」列宽 150→170 并同步表 min-width,防十九字符被 ellipsis 截断(客户 2026-11-12 反馈)
This commit is contained in:
@@ -217,7 +217,7 @@ onMounted(() => {
|
||||
<th style="width: 90px">价格</th>
|
||||
<th>标题</th>
|
||||
<th style="width: 130px">结论</th>
|
||||
<th style="width: 150px">同步时间</th>
|
||||
<th style="width: 170px">同步时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -392,8 +392,12 @@ h3 {
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
/* 同步时间列=`YYYY-MM-DD HH:mm:ss` 固定 19 字符,13.5px 下实测约 133px;全局 `* { box-sizing: border-box }`
|
||||
把 24px 左右内边距算进列宽,旧的 150px 只剩 126px 内容宽 ⇒ 末尾被 ellipsis 吃掉(客户 2026-11-12
|
||||
反馈「日期显示不全」)。170px 与店铺管理/跳过价格等页的时间列同值(内容宽 146px,留 13px 余量);
|
||||
表 min-width 同步 +20px,其余列的可用宽度与改前一致。 */
|
||||
.clean-table-scroll > table {
|
||||
min-width: 1040px;
|
||||
min-width: 1060px;
|
||||
}
|
||||
.table-scroll th,
|
||||
.table-scroll td {
|
||||
|
||||
@@ -146,6 +146,20 @@ describe('外观专利数据库页(明细表,2026-11-11 恢复「昨天那
|
||||
expect(headers).not.toContain('所属主管', '列名按客户口径叫「管理员」')
|
||||
})
|
||||
|
||||
/** 客户 2026-11-12 反馈「外观专利数据库的日期显示不全」:全局 `* { box-sizing: border-box }` 把左右 24px
|
||||
* 内边距算进列宽,旧的 150px 只剩 126px 内容宽,而 `YYYY-MM-DD HH:mm:ss` 十九字符在 13.5px 下实测约
|
||||
* 133px ⇒ 末尾被 ellipsis 吃掉(表格单元格是 nowrap + text-overflow: ellipsis)。判据钉列宽下限:
|
||||
* ≥160px 才有 ≥136px 内容宽放得下完整时间;回退到 150px 即红。 */
|
||||
it('同步时间列宽够放十九字符时间(列宽下限 160px,防 ellipsis 再截断)', async () => {
|
||||
const wrapper = await mountWith({ items: [item(1)], total: 1, page: 1, pageSize: 10 })
|
||||
const headers = wrapper.findAll('thead th')
|
||||
const dateHeader = headers[headers.length - 1]
|
||||
expect(dateHeader.text()).toBe('同步时间')
|
||||
const declared = Number.parseFloat(dateHeader.element.style.width)
|
||||
expect(Number.isFinite(declared), '同步时间列必须显式声明宽度(table-layout: fixed 下靠它定列宽)').toBe(true)
|
||||
expect(declared).toBeGreaterThanOrEqual(160, '150px − 24px 内边距 = 126px < 133px,时间会被截断')
|
||||
})
|
||||
|
||||
it('读不到主管的那一行管理员列展示 -(不猜名字)', async () => {
|
||||
const wrapper = await mountWith({ items: [item(1, { supervisorName: '' })], total: 1, page: 1, pageSize: 10 })
|
||||
expect(wrapper.findAll('tbody tr')[0].findAll('td')[1].text()).toBe('-')
|
||||
|
||||
Reference in New Issue
Block a user