diff --git a/src/pages/exchangepage/template/main.js b/src/pages/exchangepage/template/main.js index d9061027..800b25c3 100644 --- a/src/pages/exchangepage/template/main.js +++ b/src/pages/exchangepage/template/main.js @@ -240,7 +240,7 @@ export default class mytemplate extends React.Component{ onPreview(row){ let rowdata={}; let exchangedata={} - this.setState({moudleData:row}); + this.setState({moudleData:row,showPage:1}); rowdata.model=row.access_conf.land; rowdata.product_list=row.access_conf.product_list; rowdata.product_detail=row.access_conf.product_detail; @@ -277,7 +277,6 @@ export default class mytemplate extends React.Component{ sessionStorage.setItem("isSort",0) sessionStorage.setItem('mouldType',1); sessionStorage.setItem('pageChange',0); - // let link = window.location.href.replace(window.location.hash,"#/edittemplate"); // window.open(link, "_blank") window.location.href= "/#/edittemplate" diff --git a/src/pages/exchangepage/template/preview.js b/src/pages/exchangepage/template/preview.js index a9ae919c..83d31b80 100644 --- a/src/pages/exchangepage/template/preview.js +++ b/src/pages/exchangepage/template/preview.js @@ -20,7 +20,14 @@ export default class acclist extends React.Component{ } } componentDidMount(e){ - + let center = document.getElementById("preview-center") + let img = document.getElementById("preview-center-img") + // center.style.height = img.scrollHeight + "px"; + let imgHeight=this.refs; + // img.onload = function (e) { + // center.style.height = img.clientHeight + "px"; + // }offsetHeight + console.log(29,imgHeight); } exchangeBtn(){ @@ -56,7 +63,7 @@ export default class acclist extends React.Component{ propsData.model.top_image?: } -