chore(backlog): 记录 g332 完成
This commit is contained in:
+1
-1
@@ -3378,7 +3378,7 @@
|
||||
{
|
||||
"id": "g332",
|
||||
"domain": "tune",
|
||||
"status": "open",
|
||||
"status": "done",
|
||||
"title": "主题工具下沉:URL 参数 / 记忆 / 跟随系统三档只写一次",
|
||||
"motivation": "演示站自己写了二十行主题样板(读 ?theme= 参数、读 localStorage、判系统偏好、写 data-theme、落盘),任何接入方都得再抄一遍——抄漏「跟随系统」就永远停在默认亮色,抄漏「只记显式选择」则用户切过一次就再也不会跟着系统变。这类样板属于库该提供的能力,而不是使用说明里的一段示例。",
|
||||
"acceptance": "① 新增 theme(options) 工具(skin 包导出,走 --ua-* 令牌,不新增组件):优先级 URL 参数 > 本地记忆 > 跟随系统,mode='system' 时监听 prefers-color-scheme 并在变化时换色;② 返回 { mode, dark, set, toggle, dispose },dark 是可直接绑 switchButton 的布尔信号;③ 只有显式选择才落盘,system 档不写记忆;④ 演示站改用 theme({ storageKey: 'ua-demo-theme' }),删掉原先手写的样板且行为不变(?theme=dark 联动仍在);⑤ manifest 导出说明补齐,npm run check 全绿。",
|
||||
|
||||
Reference in New Issue
Block a user