我有这样的代码:
const rtf = new Intl.RelativeTimeFormat('en', { style: 'short', numeric: "auto" });在 Safari/605.1.15 中触发错误:
TypeError: undefined is not a constructor (evaluating 'new Intl.RelativeTimeFormat('en', { style: 'short', numeric: "auto" })')现代 JS 中的一个如何解决 Intl API 可能不存在的事实?
蝴蝶刀刀
子衿沉夜
随时随地看视频慕课网APP
相关分类