提交 50fdc05c authored 作者: tb53863844's avatar tb53863844

开发

上级 49950574
......@@ -55,13 +55,10 @@ export default class ZdyTable extends Component {
} = this.props;
if (isPreview || isChild) {
this.setState({
...this.state,
this.initExcel({ datas: this.props.datas, trees: this.props.trees },()=>this.setState({ ...this.state,
...this.props,
isReady: true,
formConfig: { ...this.state.formConfig, style: this.props.style },
},()=> this.initExcel({ datas: this.props.datas, trees: this.props.trees }));
formConfig: { ...this.state.formConfig, style: this.props.style }, isReady: true,}));
return;
}
......@@ -358,18 +355,21 @@ initExcel = (configs, callback) => {
const tr = configs.trees[key]
this.childExcel(sheetData, configs.datas, tr)
}
const hfInstance = HyperFormula.buildFromSheets(sheetData, {});
this.hfInstance = hfInstance
console.log( this.hfInstance,"yyyyyyyyyyyyyy")
if (callback) callback()
}
getCellValue = (i, j, currentTitle) => {
let hfInstance = this.props.hfInstance||this.hfInstance
console.log( this.props.hfInstance,this.hfInstance,"xxxxxxxxxxxxxxx")
let hfInstance = this.props.hfInstance?this.props.hfInstance:this.hfInstance
if (hfInstance && currentTitle) {
let x = hfInstance.getCellValue({ col: j, row: i, sheet: hfInstance.getSheetId(currentTitle) })
if (x && x.value != null) {
x = x.value
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论