feat(index): 新版本更新通知(What's New)弹窗
- 复用 ui-modal(position:center) + ui-btn,不新建组件,风格统一且自动跟随暗黑 - config.js 新增 releaseNotes 数组(每条一行短句),复用已有 version 字段 - 首页 _checkUpdateNote() 在 onShow 检测 storage 版本 vs config.version, 不一致则居中弹通知并写回 storage 防重复;onCloseUpdateNote 关闭 - 绿色渐变徽章 + sparkleWhite 图标 + 版本标题 + 要点列表 + 知道了按钮 - 纯通知不重启应用;发版时改 version 同步更新 releaseNotes 即可
This commit is contained in:
@@ -446,3 +446,72 @@
|
||||
0%, 100% { transform: scale(1); }
|
||||
50% { transform: scale(1.02); }
|
||||
}
|
||||
|
||||
/* ===== 新版本更新通知(What's New) ===== */
|
||||
/* slot 内容由页面 wxss 控制;ui-modal--center 的 body 已居中且用 --card-bg,
|
||||
这里只管内部排版。徽章用负 margin 上探出卡片顶,制造浮动感。 */
|
||||
.update-note {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.update-note__badge {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 50%;
|
||||
margin: -76rpx auto 18rpx;
|
||||
background: linear-gradient(135deg, #4CAF50, #81C784);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 8rpx 20rpx rgba(76, 175, 80, 0.35);
|
||||
}
|
||||
|
||||
.update-note__icon {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
}
|
||||
|
||||
.update-note__title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.update-note__date {
|
||||
font-size: 24rpx;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.update-note__list {
|
||||
width: 100%;
|
||||
margin: 26rpx 0 4rpx;
|
||||
text-align: left;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.update-note__item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.update-note__dot {
|
||||
color: var(--primary);
|
||||
font-weight: 700;
|
||||
margin-right: 12rpx;
|
||||
line-height: 1.5;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.update-note__text {
|
||||
flex: 1;
|
||||
font-size: 27rpx;
|
||||
color: var(--text);
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user