Repository navigation
Conversation
lnuxe
requested review from
anlyyao,
betavs,
jarmywang,
jin0209,
novlan1 and
zydemail
as code owners
November 16, 2026 09:06
calcMonths returned early for switchMode 'none' after setting months only, so currentMonth stayed at its initial empty object. Opening the panel could not locate the selected range whenever minDate/maxDate spanned a long period. Derive currentMonth in that branch too, keeping the existing behaviour of not touching the month switch buttons. fix Tencent#4718
Review feedback: keep one unit test file per component instead of adding a new file per scenario. The scrollIntoView case now lives in index.test.js under its own describe block, and scroll-into-view.test.js is gone. No behaviour change.
The popup enter animation keeps the dialog container inside a scale/translate composited layer. Native input placeholders complete their first layout against that intermediate transform state and end up vertically offset (issue Tencent#4551). Promote the dialog content and nested input to their own composited layer so the placeholder layout is computed from the settled geometry.
小程序真机环境不支持 Unicode 属性转义(\p{L}\p{N}\p{P}\p{S}),
chat-markdown 在非 APP 端引用的 npm/marked/index.js 内含
unicodeAlphaNumeric:/[\p{L}\p{N}]/u 等正则,模拟器(V8/JS Core 新版)
可解析,真机基础库解析直接抛
Invalid regular expression: /[\p{L}\p{N}]/u: Invalid property name。
与已有的 npm/marked/uniapp.js(APP 端专用)保持一致,将属性转义
替换为等价 ASCII 字符类:
- [\p{L}\p{N}] -> [A-Za-z0-9]
- [\p{P}\p{S}] 与 [\s\p{P}\p{S}] -> ASCII 标点符号类
(含 \s,与 uniapp.js 逐字符一致)
真机与模拟器均不再解析失败,CJK 加粗/标题/列表/链接等
markdown 词法分析行为不变。
H5 端图标字体(font-family: t)此前没有预加载:首个 t-icon-* 渲染进 DOM 后浏览器才发起 t.woff 请求,请求返回前图标显示为 占位方块(tofu),首次访问或弱网时中间态肉眼可见(issue Tencent#4710)。 新增 font-preload.ts:模块加载阶段通过 FontFace API 主动触发 字体加载,与 icon.less 的 @font-face 指向同一 URL,浏览器复用 同一请求不重复下载;幂等(缓存 Promise),失败静默回退到原有 CSS 触发路径。小程序/APP 端无 document.fonts,直接跳过。 icon.vue 引入该模块并在顶层调用 ensureIconFontLoaded(), 使字体请求提前到 bundle 求值阶段,早于首屏组件渲染。
lnuxe
force-pushed
the
fix/icon-font-preload-4710
branch
from
November 17, 2026 02:04
c314c93 to
87b88a2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 类型
相关 Issue
Fixes #4710
修改说明
问题
H5 端图标字体(font-family: t)没有预加载:页面首屏渲染时,组件已把 t-icon-* 字形文本画进 DOM,此时浏览器才第一次发起 t.woff 字体请求;请求返回前图标渲染为占位方块(tofu),返回后才变成正确图形。首次访问(无缓存)或弱网时中间态肉眼可见。
根因
icon.less 的 @font-face 只有 CSS 声明,浏览器按「首次需要使用该字体绘制」才发起下载;而 Vue bundle 求值 → 组件挂载 → DOM 绘制发生在字体请求之前,形成「先画方块、后换图标」的窗口。
修复
新增 packages/uniapp-components/icon/font-preload.ts:
验证
Node + FontFace stub 冒烟测试(issue #4710 场景):
自检