未验证 提交 f0d22048 编写于 作者: O Ovilia 提交者: GitHub

fix: use a clearer warning message when initing dom without size #10478 (#10509)

上级 ad5f939d
......@@ -1996,7 +1996,10 @@ export function init(dom, theme, opts) {
|| (!dom.clientHeight && (!opts || opts.height == null))
)
) {
console.warn('Can\'t get dom width or height');
console.warn('Can\'t get DOM width or height. Please check '
+ 'dom.clientWidth and dom.clientHeight. They should not be 0.'
+ 'For example, you may need to call this in the callback '
+ 'of window.onload.');
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册