mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-10-28 03:25:02 +08:00
refactor: simplify render function
This commit is contained in:
@ -307,9 +307,11 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const attrs = { ...this.nonEventAttrs, ...this.nativeListeners };
|
return h(TAG_NAME, {
|
||||||
attrs.ref = "root";
|
...this.nonEventAttrs,
|
||||||
attrs.class = attrs.class ? ["echarts"].concat(attrs.class) : "echarts";
|
...this.nativeListeners,
|
||||||
return h(TAG_NAME, attrs);
|
ref: "root",
|
||||||
|
class: ["echarts", ...(this.nonEventAttrs.class || [])]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user