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

开发

上级 49950574
...@@ -55,13 +55,10 @@ export default class ZdyTable extends Component { ...@@ -55,13 +55,10 @@ export default class ZdyTable extends Component {
} = this.props; } = this.props;
if (isPreview || isChild) { if (isPreview || isChild) {
this.setState({ this.initExcel({ datas: this.props.datas, trees: this.props.trees },()=>this.setState({ ...this.state,
...this.state,
...this.props, ...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; return;
} }
...@@ -362,14 +359,17 @@ initExcel = (configs, callback) => { ...@@ -362,14 +359,17 @@ initExcel = (configs, callback) => {
const hfInstance = HyperFormula.buildFromSheets(sheetData, {}); const hfInstance = HyperFormula.buildFromSheets(sheetData, {});
this.hfInstance = hfInstance this.hfInstance = hfInstance
console.log( this.hfInstance,"yyyyyyyyyyyyyy")
if (callback) callback() if (callback) callback()
} }
getCellValue = (i, j, currentTitle) => { 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) { if (hfInstance && currentTitle) {
let x = hfInstance.getCellValue({ col: j, row: i, sheet: hfInstance.getSheetId(currentTitle) }) let x = hfInstance.getCellValue({ col: j, row: i, sheet: hfInstance.getSheetId(currentTitle) })
if (x && x.value != null) { if (x && x.value != null) {
x = x.value x = x.value
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论