chore(mobile-h5): add existing H5 app sources to the monorepo
Track the weighbridge mobile-h5 codebase (excluding node_modules, dist, and local .env) so subsequent adaptation tasks can evolve it in-repo. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f8f9c0ceff
commit
a4b13fa2bc
91 files changed
+15791
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// ECharts 插件(移动端简化版本,如果不需要图表功能可以返回空对象)
|
||||
// 注意:如果项目不需要 echarts,可以安装:npm install echarts
|
||||
// 或者移除所有使用 echarts 的代码
|
||||
|
||||
let echartsInstance: any = null
|
||||
|
||||
// 动态导入 echarts(如果已安装)
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
echartsInstance = require('echarts')
|
||||
} catch {
|
||||
// echarts 未安装,返回一个空对象
|
||||
echartsInstance = {
|
||||
init: () => ({
|
||||
setOption: () => {},
|
||||
resize: () => {},
|
||||
dispose: () => {}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default echartsInstance
|
||||
|
||||
Reference in new issue
Block a user