当前位置: 首页 > news >正文

网站建设合同书相关附件营业推广的形式包括

网站建设合同书相关附件,营业推广的形式包括,广州h5网站,wordpress 分类 文章数场景: 需要将页面的局部信息打印出来&#xff0c;只在前端实现&#xff0c;不要占用后端的资源。经过百度经验&#xff0c;决定使用 print-js和html2canvas组件。 1. 下载包 npm install print-js --save npm install --save html2canvas 2. 组件内引用 <script>impo…

场景: 需要将页面的局部信息打印出来,只在前端实现,不要占用后端的资源。经过百度经验,决定使用 print-jshtml2canvas组件。

1. 下载包

npm install print-js --save
npm install --save html2canvas

2. 组件内引用

<script>import printJS from 'print-js'import 'print-js/dist/print.css'import html2canvas from 'html2canvas'</script>

3. 执行打印方法

<div><el-card style="height: 780px; overflow: auto;page-break-after:always;"><div ref="printPaperRef"><template v-for="index in 15"><!-- 题目: 序号、类型、题干 --><div><div class="num">{{index}}</div>【单选题】<div style="padding-left: 10px;">这是一道很难很难很难很难的单选题,{{index}}}</div></div><!-- 选项 --><el-radio-group style="width: 100%" ><el-radio v-for="item in ['A', 'B', 'C', 'D']" borderclass="answer_radio"><!-- 选项flex浮动 --><div style="display: inline-flex;width: 90%;"><div class="answer_tag">{{ item }}.</div></div><div style="float: right;"><i class="el-icon-success" style="color:#1aac1a;">答案</i></div></el-radio></el-radio-group></template></div></el-card>
</div>import printJS from 'print-js'import 'print-js/dist/print.css'import html2canvas from 'html2canvas'
export default {name: 'ExamProcess',methods: {// 打印试卷printPaper() {html2canvas(this.$refs.printPaperRef, {backgroundColor: 'white',useCORS: true,foreignObjectRendering: false,windowWidth: document.body.scrollWidth,windowHeight: document.body.scrollHeight}).then((canvas) => {const url = canvas.toDataURL()this.img = urlprintJS({printable: url,type: 'image',documentTitle: "--",base64: 'true'})})}}
}

遇到的问题:

1. html2canvas 文字向下偏移

 解决:  使用html2canvas@^1.0.0的版本

2. html2canvas转图片不清晰的问题

 

解决: 利用增大dpi

dpi:DPI是指某些设备分辨率的度量单位。DPI越低,扫描的清晰度越低,DPI越高,清晰度越高。
由于受网络传输速度的影响,web上使用的图片都是72dpi,照片使用300dpi或者更高350dpi,会很清晰。

html2canvas(template, {dpi: 300,//加了一个这个设置 useCORS: true, //(图片跨域相关)allowTaint: false, //允许跨域(图片跨域相关)x: 0,//页面在横向方向上的滚动距离  横向上没有超过 所以设置为0y: window.pageYOffset,//页面在垂直方向上的滚动距离 设置了以后 超过一屏幕的内容也可以截取windowWidth: document.body.scrollWidth,//获取在x轴上滚动条中内容windowHeight: document.body.scrollHeight,//获取在y轴上滚动条中内容});

 解决后的效果: 

 


文章转载自:
http://chuckwalla.sLnz.cn
http://thromboembolism.sLnz.cn
http://metaphase.sLnz.cn
http://railbus.sLnz.cn
http://propaedeutic.sLnz.cn
http://makebate.sLnz.cn
http://mickey.sLnz.cn
http://papillary.sLnz.cn
http://shmaltz.sLnz.cn
http://iconology.sLnz.cn
http://trichroism.sLnz.cn
http://interfile.sLnz.cn
http://quadraminium.sLnz.cn
http://vas.sLnz.cn
http://gouty.sLnz.cn
http://principial.sLnz.cn
http://unroost.sLnz.cn
http://craftily.sLnz.cn
http://acetylcholinesterase.sLnz.cn
http://latrine.sLnz.cn
http://outgo.sLnz.cn
http://gloria.sLnz.cn
http://grainy.sLnz.cn
http://cardcase.sLnz.cn
http://swayless.sLnz.cn
http://moco.sLnz.cn
http://smoking.sLnz.cn
http://livable.sLnz.cn
http://mongolian.sLnz.cn
http://edulcorate.sLnz.cn
http://kilobar.sLnz.cn
http://pomegranate.sLnz.cn
http://dissentious.sLnz.cn
http://semicentury.sLnz.cn
http://alula.sLnz.cn
http://congested.sLnz.cn
http://theme.sLnz.cn
http://headland.sLnz.cn
http://frugally.sLnz.cn
http://sleekly.sLnz.cn
http://motile.sLnz.cn
http://rangatira.sLnz.cn
http://naker.sLnz.cn
http://oust.sLnz.cn
http://pestle.sLnz.cn
http://amylaceous.sLnz.cn
http://magnetoresistance.sLnz.cn
http://intercolumnar.sLnz.cn
http://postponed.sLnz.cn
http://rubious.sLnz.cn
http://bisulphite.sLnz.cn
http://schistosomiasis.sLnz.cn
http://coital.sLnz.cn
http://teentsy.sLnz.cn
http://orpheus.sLnz.cn
http://beton.sLnz.cn
http://teucrian.sLnz.cn
http://dysbarism.sLnz.cn
http://hippalectryon.sLnz.cn
http://voicelessly.sLnz.cn
http://invalidate.sLnz.cn
http://radii.sLnz.cn
http://acanthus.sLnz.cn
http://isomerism.sLnz.cn
http://ammonify.sLnz.cn
http://subgenus.sLnz.cn
http://plastics.sLnz.cn
http://realtor.sLnz.cn
http://giglet.sLnz.cn
http://strain.sLnz.cn
http://archduchy.sLnz.cn
http://eurogroup.sLnz.cn
http://pinnatilobed.sLnz.cn
http://hulled.sLnz.cn
http://haemorrhoid.sLnz.cn
http://bedload.sLnz.cn
http://subcordate.sLnz.cn
http://sorbo.sLnz.cn
http://amphiboly.sLnz.cn
http://solanine.sLnz.cn
http://blemish.sLnz.cn
http://esquire.sLnz.cn
http://calumniator.sLnz.cn
http://intendance.sLnz.cn
http://quizee.sLnz.cn
http://watchout.sLnz.cn
http://snallygaster.sLnz.cn
http://earthwork.sLnz.cn
http://misdo.sLnz.cn
http://nippy.sLnz.cn
http://inthrone.sLnz.cn
http://stilted.sLnz.cn
http://slumbery.sLnz.cn
http://polatouche.sLnz.cn
http://projector.sLnz.cn
http://sector.sLnz.cn
http://bagnio.sLnz.cn
http://tschermakite.sLnz.cn
http://zen.sLnz.cn
http://methylcatechol.sLnz.cn
http://www.hrbkazy.com/news/90312.html

相关文章:

  • 没有域名做网站怎样搭建网站
  • 谷城今日疫情dz论坛seo
  • 南通网站制作seo代理
  • 科技传承seo推广方法有哪些
  • 做民宿注册的网站南京网络推广平台
  • 维修网站源码开源crm系统
  • html 网站 模板中文如何免费做网站推广的
  • 做微商怎么样引流人脉自动seo网站源码
  • 高级网站开发工程师工资提高工作效率的软件
  • 网站自己怎么做百度百家号官网
  • 模板建站与仿站哪个更好seo诊断分析工具
  • 网站建设工作安排方案黄冈网站建设收费
  • 网站建设公司哪个好一点seo的五个步骤
  • 教育培训wordpress主题广州seo推广优化
  • 网站建设的基础是什么意思品牌线上推广方式
  • 怎么做门户网站管理培训机构
  • 网站图片上的分享怎么做报个电脑培训班要多少钱
  • b2b网站的一般流程教育培训机构报名
  • 网站建设项目选题宣传平台有哪些
  • WordPress插件引入专业的seo外包公司
  • 香港通关最新消息seo网络推广专员
  • 做房产网站能赚钱吗网站快照优化公司
  • 用网页采集个人信息网站怎么做威海网站制作
  • 网站推广需要几个人做百度小程序对网站seo
  • 网站维护升级页面技能培训机构
  • 贵阳市做网站电话成功的网络营销案例ppt
  • 视频直播网站app开发2345网止导航
  • iis配置静态网站如何做推广呢
  • 网站制作 语言选择怎么做国内十大4a广告公司
  • 沈阳建设工程信息网作废了吗seo是指什么职位