smartmeter-app/uni_modules/lime-echart/components/l-echart/nvue.js
2023-12-05 16:45:28 +08:00

35 lines
689 B
JavaScript

export class Echarts {
constructor(webview) {
this.webview = webview
this.options = null
}
setOption() {
this.options = arguments
this.webview.evalJs(`setOption(${JSON.stringify(arguments)})`);
}
getOption() {
return this.options
}
showLoading() {
this.webview.evalJs(`showLoading(${JSON.stringify(arguments)})`);
}
hideLoading() {
this.webview.evalJs(`hideLoading()`);
}
clear() {
this.webview.evalJs(`clear()`);
}
dispose() {
this.webview.evalJs(`dispose()`);
}
resize(size) {
if(size) {
this.webview.evalJs(`resize(${size})`);
} else {
this.webview.evalJs(`resize()`);
}
}
on(type, ...args) {
console.warn('nvue 暂不支持事件')
}
}