We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用: @antv/s2-react | 1.18.0
antd 3.15.2
react 16.12.0
表单类型: StrategySheet
接口请求结果,放入组件中,左列信息和头行信息都有,但是具体数值信息没有,是版本问题吗?我直接写死数据是能正常显示。如图
` import React,{useState,useRef} from 'react'; import { connect } from 'umi'; import { useFetchData } from 'be-pms-plus'; import { SheetComponent, SheetComponentOptions} from '@antv/s2-react'; import type { S2DataConfig } from '@antv/s2'; import { Form } from 'antd'; import { getFlSaleStaReport } from '@/services/report.ts'; import '@antv/s2-react/dist/style.min.css'; import './style.less'
export const Xstjrb:React.FC=(props:any) => { const s2Ref = useRef(null); const [params,setParams]=useState({}); const [data] = useFetchData( () => getFlSaleStaReport({ apartmentIdList: [2], queryTime: "2024-07-24" }), [], [params], );
const s2Options: SheetComponentOptions = { width: 2100, height: 880, cornerText: '指标层级', hierarchyType: 'customTree', style: { cellCfg: { width:10, valuesCfg: { // 非必填: 指定原始字段, 用于 导出和 tooltip 展示 originalValueField: 'originalValues', // 非必填: 是否显示原始值 showOriginalValue: true, }, }, }, };
const sheetData:S2DataConfig=data; return (
export default connect(({ global }) => ({ apartments: global.apartments, permissionList: global.permissionList, }))(Xstjrb);
`
麻烦看下,谢谢!
The text was updated successfully, but these errors were encountered:
刚试了 antd 4.24.16,s2/react: 1.47.0 react 16.13.1 也是这样 囧?
Sorry, something went wrong.
需要赋初始值: { "data": [], "meta": [], "fields": {} } 否则,不能渲染具体内容值信息
No branches or pull requests
🏷 Version
使用:
@antv/s2-react | 1.18.0
antd 3.15.2
react 16.12.0
表单类型: StrategySheet
接口请求结果,放入组件中,左列信息和头行信息都有,但是具体数值信息没有,是版本问题吗?我直接写死数据是能正常显示。如图
`
import React,{useState,useRef} from 'react';
import { connect } from 'umi';
import { useFetchData } from 'be-pms-plus';
import { SheetComponent, SheetComponentOptions} from '@antv/s2-react';
import type { S2DataConfig } from '@antv/s2';
import { Form } from 'antd';
import { getFlSaleStaReport } from '@/services/report.ts';
import '@antv/s2-react/dist/style.min.css';
import './style.less'
export const Xstjrb:React.FC=(props:any) => {
const s2Ref = useRef(null);
const [params,setParams]=useState({});
const [data] = useFetchData(
() => getFlSaleStaReport({
apartmentIdList: [2],
queryTime: "2024-07-24"
}),
[],
[params],
);
const sheetData:S2DataConfig=data;
return (
<SheetComponent
ref={s2Ref}
// dataCfg={val4}
dataCfg={sheetData}
options={s2Options}
sheetType="strategy"
/>
};
export default connect(({ global }) => ({
apartments: global.apartments,
permissionList: global.permissionList,
}))(Xstjrb);
`
麻烦看下,谢谢!
The text was updated successfully, but these errors were encountered: