提交 883e0247 编写于 作者: O Ovilia

feat(tooltip): use non-html tooltip when document is not defined

上级 1581dda5
......@@ -46,7 +46,10 @@ export default echarts.extendComponentModel({
displayMode: 'single', // 'single' | 'multipleByCoordSys'
useHtml: true,
useHtml: 'auto', // 'auto', true, or false
// 'auto': use html by default, and use non-html if `document` is not defined
// true: use html for tooltip
// false: use canvas, svg, and etc. for tooltip
// 位置 {Array} | {Function}
// position: null
......
......@@ -51,7 +51,9 @@ export default echarts.extendComponentView({
var tooltip = ecModel.get('tooltip');
this._isRich = false;
if (tooltip.length && tooltip[0].useHtml === false) {
if (tooltip.length && (tooltip[0].useHtml === false // force using non-html
|| tooltip[0].useHtml === 'auto' && !document)) // auto using non-html when no `document`
{
this._isRich = true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册