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