mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 06:56:44 +08:00
更换贺报下载的方法10
This commit is contained in:
@@ -255,11 +255,12 @@
|
||||
@cancel="cancelChange"
|
||||
/>
|
||||
</van-popup>
|
||||
<div class="hebao" v-if="hebaoShow">
|
||||
<!-- <div class="hebao" > -->
|
||||
<generateImg
|
||||
v-if="hebaoShow"
|
||||
@child-colse="closeHebao"
|
||||
></generateImg>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<van-popup v-model="xiangqingShow" position="right" :style="{ width: '100%', height: '100%' }">
|
||||
<policyDetails
|
||||
v-if="xiangqingShow"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="contents">
|
||||
<div id="capture" ref="generateImg" style="height: 100vh; overflow: hidden">
|
||||
<img src="@/assets/images/list_img.png" alt="" />
|
||||
<div class="box">
|
||||
@@ -182,9 +182,9 @@ export default {
|
||||
console.log(2222);
|
||||
|
||||
// 使用 html2canvas 捕获图像,并等待其完成
|
||||
const canvas = await html2canvas(this.$refs.generateImg, {
|
||||
width: this.$refs.generateImg.offsetWidth,
|
||||
height: this.$refs.generateImg.offsetHeight,
|
||||
const canvas = await html2canvas(domElement, {
|
||||
width: domElement.offsetWidth,
|
||||
height: domElement.offsetHeight,
|
||||
backgroundColor: '#fff',
|
||||
scale: 1,
|
||||
dpi: 300
|
||||
@@ -255,6 +255,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contents {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
img {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user