From b112273db1acbb06c5081b1b24ee896c478ad670 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Tue, 25 Jan 2022 20:22:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=A7=88=E8=B0=83=E6=95=B4=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangepage/template/main.js | 3 +- src/pages/exchangepage/template/preview.js | 11 +++- src/pages/exchangepage/template/preview.less | 15 +++++ yarn.lock | 68 +++++++++++++++++++- 4 files changed, 92 insertions(+), 5 deletions(-) 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?: } -