提交 c23e2750 authored 作者: 刘浪's avatar 刘浪
import React, { useMemo } from 'react';
import ReactEcharts from 'echarts-for-react';
export default function EchartsDiy(props){
const { json, uuid, option, value } = props;
const opt = useMemo(() => {
return (value && typeof value === 'object' && Object.keys(value).length) ? value : option;
}, [value, option]);
// console.log(opt);
if(!opt){
return null;
}
return (
<ReactEcharts
style={{ height: json.height || 500 }}
key={uuid}
option={opt}
notMerge={true}
lazyUpdate={true}
theme={'theme_name'}
onEvents={{}}
/>
)
}
...@@ -4,13 +4,19 @@ import { getInfo, transformApi } from '@/highOrderComponent/Service'; ...@@ -4,13 +4,19 @@ import { getInfo, transformApi } from '@/highOrderComponent/Service';
import urlTransform from '@/webPublic/zyd_public/request/urlTransform'; import urlTransform from '@/webPublic/zyd_public/request/urlTransform';
export function hrefWithToken(url, arg = {}) { export function hrefWithToken(url, arg = {
justOpenUrl: false,
params: {},
fileName: '导出',
method: 'GET',
ext: 'xlsx',
}) {
const { const {
justOpenUrl = false, justOpenUrl,
params = {}, params,
fileName = '', fileName,
method = 'GET', method,
ext = 'xlsx', ext,
} = arg; } = arg;
if (!getIsBei_Dian()) { if (!getIsBei_Dian()) {
if (url.indexOf('?') > -1) { if (url.indexOf('?') > -1) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论