Files
aurora-admin/frameworks-mobile/Table.html
T
aurora-admin f1fbfc2ddb
Regression / regression (push) Canceled after 0s
feat(品牌标识): 几何 K 图标(favicon/顶栏标记/theme-color) + 并行会话成果入库
## 品牌标识(本次会话)

起因:品牌此前没有任何图形标识 —— 唯一 favicon 是内联 data-URI 里的字母「A」,
那是 v2.0.0「Aurora Admin → Kole UI」改名漏掉的一处(PC 顶栏也是「A」,
移动端站已是「K」;移动端文档站则完全没有 favicon)。

- 几何:24 网格三个互不接触的笔画(竖 + 两斜),圆头描边;
  描边 2.25 → 16px 标签页尺寸下正好 1.5px = 规范原文「描边1.5px」
- 取色分两套(刻意):favicon 硬编码品牌蓝/白(渲染在浏览器标签栏,不继承 kole-dark);
  顶栏标记走 currentColor(实测暗色下自动转 rgb(20,22,28))
- 新增 theme-color 双条(light #FFFFFF / dark #1C1F26,取 --kole-color-card-bg)
- 修 site/app.js hero 标语 KOLE ADMIN → KOLE UI(改名变形残留)
- 移动端 7 个模板补 favicon(此前计数 0)

验收:门禁 9 条全 OK(site-routing/site-routes/mobile-docs/mobile-site/isolation/
theme/nav/i18n/icons);PC 回归 1464/1464 · 移动端 807/807,各连跑 8 次一致;
两端 favicon 405 字节逐字节一致;PC 站控制台错误 1→0。

## 并行会话成果(本次一并入库)

- 图标系统:2576 图标(TDesign/Element Plus,MIT)+ 11 端注入 + 5 个构建门禁工具
  + IconPreview 预览页 + ICON-SPEC.md 冻结规格
- 移动端平台:47 组件 × 6 端 + 文档站 53 页 + 隔离门禁
- PC 组件:103 个大后台组件 / 组件11 批次
- uni-app:PC 端试点 + 移动端端实现 + 真实编译验证

## 工程

- .gitignore 补 .scratch/ 与 .zcode-preexisting-*.txt(会话中间产物,实测 9.1MB,不入库)
- CHANGELOG 补品牌标识条目
- ROADMAP 登 S8-P4(品牌标识任务包 + og:image/apple-touch-icon 未做部分)
2026-09-21 10:05:48 +08:00

256 lines
14 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>Kole UI Mobile · Table(H5)</title>
<link rel="stylesheet" href="../.design_library/kole-ui-mobile/colors_and_type.css">
<link rel="stylesheet" href="Table.css">
<style>
body { margin: 0; background: var(--kole-color-page-bg); font-family: var(--kole-font-family); color: var(--kole-color-text-body); }
/* 关键:.demo 与各演示块都写 min-width: 0,否则内部表格的 min-width 会把页面顶宽 */
.demo { max-width: 375px; margin: 0 auto; padding: var(--kole-m-gutter) 0; }
.demo-block { min-width: 0; }
.demo-label { margin: 0; padding: var(--kole-space-12) var(--kole-m-gutter) var(--kole-space-8);
font-size: var(--kole-m-font-size-label); color: var(--kole-color-text-secondary); }
.demo-pad { min-width: 0; padding: 0 0 var(--kole-space-8); background: var(--kole-color-card-bg);
border-block: 1px solid var(--kole-color-border); }
/* 横向滚动的提示条:说明「这里可以左右滑」,不是组件的一部分 */
.demo-hint { margin: 0; padding: var(--kole-space-8) var(--kole-m-gutter) 0;
font-size: var(--kole-m-font-size-caption); color: var(--kole-color-text-secondary); }
.demo-block[hidden] { display: none; }
</style>
</head>
<body>
<div class="demo">
<section class="demo-block" data-demo="scroll">
<p class="demo-label">横向滚动(列多时在表格自己的容器里左右滑;页面整体不横向溢出)</p>
<div class="demo-pad" data-assert="table-scroll">
<p class="demo-hint">← 左右滑动查看全部 6 列 →</p>
<div class="kole-m-table kole-m-table--bordered" id="tb-scroll"
style="--kole-m-table-min-width: 560px" data-assert="table-scroll-wide">
<div class="kole-m-table__viewport" id="tb-scroll-viewport">
<table class="kole-m-table__inner">
<caption class="kole-m-table__caption">近 3 日订单</caption>
<thead class="kole-m-table__head">
<tr class="kole-m-table__row">
<th class="kole-m-table__head-cell kole-m-table__head-cell--start" scope="col">订单号</th>
<th class="kole-m-table__head-cell kole-m-table__head-cell--start" scope="col">客户</th>
<th class="kole-m-table__head-cell" scope="col">状态</th>
<th class="kole-m-table__head-cell kole-m-table__head-cell--number" scope="col">金额</th>
<th class="kole-m-table__head-cell" scope="col">下单时间</th>
<th class="kole-m-table__head-cell kole-m-table__head-cell--end" scope="col">操作</th>
</tr>
</thead>
<tbody>
<tr class="kole-m-table__row">
<td class="kole-m-table__cell kole-m-table__cell--start">SO-2026-0920-001</td>
<td class="kole-m-table__cell kole-m-table__cell--start">王小明</td>
<td class="kole-m-table__cell">待发货</td>
<td class="kole-m-table__cell kole-m-table__cell--number">¥ 1,280.00</td>
<td class="kole-m-table__cell">09-20 09:12</td>
<td class="kole-m-table__cell kole-m-table__cell--end">查看</td>
</tr>
<tr class="kole-m-table__row">
<td class="kole-m-table__cell kole-m-table__cell--start">SO-2026-0920-002</td>
<td class="kole-m-table__cell kole-m-table__cell--start">李小红</td>
<td class="kole-m-table__cell">已发货</td>
<td class="kole-m-table__cell kole-m-table__cell--number">¥ 368.50</td>
<td class="kole-m-table__cell">09-20 10:35</td>
<td class="kole-m-table__cell kole-m-table__cell--end">查看</td>
</tr>
<tr class="kole-m-table__row">
<td class="kole-m-table__cell kole-m-table__cell--start">SO-2026-0920-003</td>
<td class="kole-m-table__cell kole-m-table__cell--start">赵大力</td>
<td class="kole-m-table__cell">已完成</td>
<td class="kole-m-table__cell kole-m-table__cell--number">¥ 5,600.00</td>
<td class="kole-m-table__cell">09-20 14:08</td>
<td class="kole-m-table__cell kole-m-table__cell--end">查看</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section class="demo-block" data-demo="clickable">
<p class="demo-label">表头固定 + 列对齐 + 行点击(点整行选中该行;数字列等宽右对齐,便于按位对比)</p>
<div class="demo-pad" data-assert="table-clickable">
<div class="kole-m-table kole-m-table--clickable kole-m-table--stripe kole-m-table--bordered" id="tb-clickable"
data-selected="" data-assert="table-clickable-grid">
<div class="kole-m-table__viewport">
<table class="kole-m-table__inner">
<thead class="kole-m-table__head">
<tr class="kole-m-table__row">
<th class="kole-m-table__head-cell kole-m-table__head-cell--start" scope="col">商品</th>
<th class="kole-m-table__head-cell" scope="col">仓库</th>
<th class="kole-m-table__head-cell kole-m-table__head-cell--number" scope="col">库存</th>
<th class="kole-m-table__head-cell kole-m-table__head-cell--number" scope="col">单价</th>
</tr>
</thead>
<tbody>
<tr class="kole-m-table__row" data-row="sku-1" tabindex="0" role="row" aria-selected="false"
data-behavior="click-sets-attr:#tb-clickable|data-selected|sku-1">
<td class="kole-m-table__cell kole-m-table__cell--start">有机棉 T 恤</td>
<td class="kole-m-table__cell">杭州仓</td>
<td class="kole-m-table__cell kole-m-table__cell--number">1,240</td>
<td class="kole-m-table__cell kole-m-table__cell--number">¥ 89.00</td>
</tr>
<tr class="kole-m-table__row" data-row="sku-2" tabindex="0" role="row" aria-selected="false">
<td class="kole-m-table__cell kole-m-table__cell--start">轻薄羽绒服</td>
<td class="kole-m-table__cell">广州仓</td>
<td class="kole-m-table__cell kole-m-table__cell--number">86</td>
<td class="kole-m-table__cell kole-m-table__cell--number">¥ 459.00</td>
</tr>
<tr class="kole-m-table__row is-selected" data-row="sku-3" tabindex="0" role="row" aria-selected="true">
<td class="kole-m-table__cell kole-m-table__cell--start">帆布托特包</td>
<td class="kole-m-table__cell">杭州仓</td>
<td class="kole-m-table__cell kole-m-table__cell--number">512</td>
<td class="kole-m-table__cell kole-m-table__cell--number">¥ 129.00</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section class="demo-block" data-demo="card">
<p class="demo-label">卡片模式(mode=card:小屏上把每行摊成键值对,彻底不需要横向滚动)</p>
<div class="demo-pad" data-assert="table-card">
<div class="kole-m-table kole-m-table--card" id="tb-card">
<div class="kole-m-table__viewport">
<table class="kole-m-table__inner">
<thead class="kole-m-table__head">
<tr class="kole-m-table__row">
<th class="kole-m-table__head-cell" scope="col">客户</th>
<th class="kole-m-table__head-cell" scope="col">等级</th>
<th class="kole-m-table__head-cell" scope="col">本月消费</th>
</tr>
</thead>
<tbody>
<tr class="kole-m-table__row">
<td class="kole-m-table__cell" data-label="客户">王小明</td>
<td class="kole-m-table__cell" data-label="等级">黄金</td>
<td class="kole-m-table__cell" data-label="本月消费">¥ 1,280.00</td>
</tr>
<tr class="kole-m-table__row">
<td class="kole-m-table__cell" data-label="客户">李小红</td>
<td class="kole-m-table__cell" data-label="等级">白银</td>
<td class="kole-m-table__cell" data-label="本月消费">¥ 368.50</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section class="demo-block" data-demo="empty">
<p class="demo-label">空态(没有数据时显示占位文案;列宽语义不变,不会把容器撑宽)</p>
<div class="demo-pad" data-assert="table-empty">
<div class="kole-m-table" id="tb-empty" data-empty="true">
<div class="kole-m-table__viewport">
<table class="kole-m-table__inner">
<thead class="kole-m-table__head">
<tr class="kole-m-table__row">
<th class="kole-m-table__head-cell kole-m-table__head-cell--start" scope="col">订单号</th>
<th class="kole-m-table__head-cell" scope="col">状态</th>
<th class="kole-m-table__head-cell kole-m-table__head-cell--number" scope="col">金额</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<p class="kole-m-table__empty" role="status" aria-live="polite">当前筛选条件下没有订单</p>
</div>
</div>
</section>
<section class="demo-block" data-demo="states">
<p class="demo-label">禁用行与省略列(禁用行置灰不响应;长文本列单行省略,完整值在 title 里)</p>
<div class="demo-pad" data-assert="table-states">
<div class="kole-m-table kole-m-table--bordered" id="tb-states">
<div class="kole-m-table__viewport">
<table class="kole-m-table__inner">
<thead class="kole-m-table__head">
<tr class="kole-m-table__row">
<th class="kole-m-table__head-cell kole-m-table__head-cell--start" scope="col">收货地址</th>
<th class="kole-m-table__head-cell" scope="col">配送</th>
</tr>
</thead>
<tbody>
<tr class="kole-m-table__row">
<td class="kole-m-table__cell kole-m-table__cell--start kole-m-table__cell--ellipsis"
title="浙江省杭州市西湖区文三路 100 号 1 幢 1801 室">浙江省杭州市西湖区文三路 100 号 1 幢 1801 室</td>
<td class="kole-m-table__cell">顺丰</td>
</tr>
<tr class="kole-m-table__row is-disabled" aria-disabled="true">
<td class="kole-m-table__cell kole-m-table__cell--start">广东省深圳市南山区科技园南区</td>
<td class="kole-m-table__cell">暂不可达</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
<script>
/* 演示页交互:点整行即选中(同表互斥),选中态写 is-selected 与 data-selected。
横向滚动由 .kole-m-table__viewport 自己承担 —— 页面整体不横向溢出。
每块各自独立:状态只落在本块 DOM 上。 */
(function () {
Array.prototype.forEach.call(document.querySelectorAll('.kole-m-table--clickable'), function (root) {
root.addEventListener('click', function (e) {
var row = e.target.closest ? e.target.closest('.kole-m-table__row') : null;
if (!row || !root.contains(row) || row.classList.contains('is-disabled')) return;
if (row.getAttribute('aria-disabled') === 'true') return;
Array.prototype.forEach.call(root.querySelectorAll('.kole-m-table__row'), function (r) {
var on = r === row;
r.classList.toggle('is-selected', on);
r.setAttribute('aria-selected', on ? 'true' : 'false');
});
root.setAttribute('data-selected', row.getAttribute('data-row') || '');
});
/* 键盘路径:聚焦后按回车 / 空格选中该行(整行点击不能是唯一的交互路径) */
root.addEventListener('keydown', function (e) {
if (e.key !== 'Enter' && e.key !== ' ' && e.key !== 'Spacebar') return;
var row = e.target.closest ? e.target.closest('.kole-m-table__row') : null;
if (!row || !root.contains(row) || row.classList.contains('is-disabled')) return;
e.preventDefault();
Array.prototype.forEach.call(root.querySelectorAll('.kole-m-table__row'), function (r) {
var on = r === row;
r.classList.toggle('is-selected', on);
r.setAttribute('aria-selected', on ? 'true' : 'false');
});
root.setAttribute('data-selected', row.getAttribute('data-row') || '');
});
});
})();
</script>
<script>
/* ?demo=<id> → 只显示该演示块(文档站按块预览用;无参数时全部显示,测试与回归走无参数路径) */
(function () {
var id = new URLSearchParams(location.search).get('demo');
if (!id) return;
var blocks = Array.prototype.slice.call(document.querySelectorAll('.demo-block'));
var hit = false;
blocks.forEach(function (b) {
var on = b.getAttribute('data-demo') === id;
if (on) hit = true;
b.hidden = !on;
});
if (!hit) { blocks.forEach(function (b) { b.hidden = false; }); return; }
document.body.classList.add('demo-single');
blocks.forEach(function (b) {
var label = b.querySelector('.demo-label');
if (label && !b.hidden) label.hidden = true;
});
})();
</script>
</body>
</html>