Files
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

206 lines
6.6 KiB
Vue
Raw Permalink 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.
<template>
<view class="kole-m-list" :class="listClass" role="list" :aria-live="items.length ? '' : 'polite'">
<text v-if="header" class="kole-m-list__header">{{ header }}</text>
<template v-if="items.length">
<view v-for="row in rows" :key="row.index" class="kole-m-list__wrap">
<view
v-if="row.item.static"
class="kole-m-list__item"
:class="{ 'is-disabled': row.item.disabled }"
role="listitem"
:aria-disabled="row.item.disabled ? 'true' : 'false'"
>
<text v-if="row.item.prefix" class="kole-m-list__prefix">{{ row.item.prefix }}</text>
<view class="kole-m-list__body">
<text class="kole-m-list__title">{{ row.item.title }}</text>
<text v-if="row.item.desc" class="kole-m-list__desc">{{ row.item.desc }}</text>
</view>
<view class="kole-m-list__suffix">
<text v-if="row.item.value" class="kole-m-list__value">{{ row.item.value }}</text>
<text v-if="row.item.arrow" class="kole-m-list__arrow">›</text>
</view>
</view>
<view
v-else
class="kole-m-list__item"
:class="{ 'is-disabled': row.item.disabled }"
:role="row.item.disabled ? '' : 'button'"
:aria-disabled="row.item.disabled ? 'true' : 'false'"
@tap="onSelect(row)"
>
<text v-if="row.item.prefix" class="kole-m-list__prefix">{{ row.item.prefix }}</text>
<view class="kole-m-list__body">
<text class="kole-m-list__title">{{ row.item.title }}</text>
<text v-if="row.item.desc" class="kole-m-list__desc">{{ row.item.desc }}</text>
</view>
<view class="kole-m-list__suffix">
<text v-if="row.item.value" class="kole-m-list__value">{{ row.item.value }}</text>
<text v-if="row.item.arrow" class="kole-m-list__arrow">›</text>
</view>
</view>
</view>
<slot></slot>
</template>
<!-- 状态 empty:空列表占位(宿主可换成自己的插槽内容) -->
<slot v-else name="empty">
<text class="kole-m-list__empty">{{ emptyText || '暂无数据' }}</text>
</slot>
<text v-if="footer" class="kole-m-list__footer">{{ footer }}</text>
</view>
</template>
<script setup>
/* uni-app 端 · 列表(移动端)— 规格 §24
跨端差异:小程序没有 ul/li/button 的列表语义,行一律用 view(标记 role="listitem" / "button"),
可点行用 @tap;分隔线画在包裹层 .kole-m-list__wrap 的上沿(与 H5 端同一策略 —— 行本身
既可能是纯展示层也可能是可点层,线挂在行下沿会在两种结构里对不上)。
尺寸用 rpx(88rpx = 375pt 下的 44px,故 default 行高 112rpx / compact 88rpx)。 */
import { computed } from 'vue';
const props = defineProps({
items: { type: Array, default: () => [] },
size: { type: String, default: 'default' },
border: { type: Boolean, default: true },
divider: { type: String, default: 'inset' },
header: { type: String, default: '' },
footer: { type: String, default: '' },
emptyText: { type: String, default: '' }
});
const emit = defineEmits(['select']);
const listClass = computed(() => [
props.size === 'compact' ? 'kole-m-list--compact' : '',
props.border ? 'kole-m-list--border' : '',
`kole-m-list--${props.divider}`
].filter(Boolean));
/* 行里带上原始下标:select 回传的是被点行在 items 里的下标 */
const rows = computed(() => (props.items || []).map((item, index) => ({ item: item || {}, index: index })));
function onSelect(row) {
if (!row || !row.item || row.item.disabled) return;
emit('select', row.index);
}
</script>
<style>
.kole-m-list {
--kole-m-list-row-height: 112rpx; /* default 行高(compact 88rpx) */
--kole-m-list-divider-inset: 32rpx; /* 分隔线左端缩进(= 页面留白) */
--kole-m-font-size-body: 32rpx;
--kole-m-font-size-label: 28rpx;
--kole-m-gutter: 32rpx;
box-sizing: border-box;
width: 100%;
background-color: var(--kole-color-card-bg);
color: var(--kole-color-text-body);
font-size: var(--kole-m-font-size-body);
}
.kole-m-list--compact {
--kole-m-list-row-height: 88rpx;
font-size: var(--kole-m-font-size-label);
}
.kole-m-list--inset { --kole-m-list-divider-inset: 32rpx; }
.kole-m-list--full { --kole-m-list-divider-inset: 0rpx; }
.kole-m-list__header,
.kole-m-list__footer {
display: block;
padding: 24rpx var(--kole-m-gutter) 16rpx;
background-color: var(--kole-color-page-bg);
color: var(--kole-color-text-secondary);
font-size: var(--kole-m-font-size-label);
}
.kole-m-list__footer { padding-top: 16rpx; padding-bottom: 24rpx; }
.kole-m-list__wrap { position: relative; }
/* 变体 border=true:相邻行之间一条 1rpx 分隔线 */
.kole-m-list--border .kole-m-list__wrap + .kole-m-list__wrap::after {
content: '';
position: absolute;
top: 0;
left: var(--kole-m-list-divider-inset);
right: 0;
height: 1rpx;
background-color: var(--kole-color-border);
}
.kole-m-list__item {
box-sizing: border-box;
display: flex;
align-items: center;
width: 100%;
min-height: var(--kole-m-list-row-height);
padding: 24rpx var(--kole-m-gutter);
background-color: var(--kole-color-card-bg);
color: var(--kole-color-text-body);
font-size: inherit;
}
/* 状态 active:按下反馈是整行背景变化(触屏不用 :hover) */
.kole-m-list__item:active { background-color: var(--kole-color-table-header-bg); }
.kole-m-list__item.is-disabled { color: var(--kole-color-text-disabled); }
.kole-m-list__prefix {
flex-shrink: 0;
margin-right: 24rpx;
color: var(--kole-color-text-secondary);
}
.kole-m-list__body { flex: 1; display: flex; flex-direction: column; }
.kole-m-list__title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: var(--kole-color-text-title);
}
.kole-m-list__desc {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: var(--kole-m-font-size-label);
color: var(--kole-color-text-secondary);
}
.kole-m-list__suffix {
flex-shrink: 0;
display: flex;
align-items: center;
max-width: 45%;
font-size: var(--kole-m-font-size-label);
color: var(--kole-color-text-secondary);
}
.kole-m-list__value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.kole-m-list__arrow {
flex-shrink: 0;
padding-left: 12rpx;
color: var(--kole-color-text-placeholder);
}
.kole-m-list__empty {
display: block;
padding: 80rpx var(--kole-m-gutter);
background-color: var(--kole-color-card-bg);
color: var(--kole-color-text-secondary);
font-size: var(--kole-m-font-size-label);
text-align: center;
}
</style>