打印插件 hiprint 使用、回单打印PDF保存本地、将列表数据打印成pdf文件保存到本地

news2024/11/18 23:22:11

文章底部有个人公众号:热爱技术的小郑。主要分享开发知识、有兴趣的可以关注一手。

前言

最近做了一个回单打印的功能、核心功能是、渲染出来的回单列表,用户可以浏览回单数据。可以同时勾选多个要打印的回单数据。将回单打印成pdf文件、同时下载保存到本地。核心就是将回单打印到本地

效果展示

我将这个功能从项目中抽取出来了一个案例、演示预览和打印功能。核心就是调用这个打印的方法。你只关心传入要打印的模板和要打印的数据就可以了。

pdf打印

项目中实现的效果展示
用那个网站做出来的模板、添加相应的数据到代码中。直接调用打印方法就可以。一下是一些假数据

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

前提

这里是官网、可以设置要打印的模板。设置好要打印的模板、然后导出json数据、复制到项目代码中。具体使用过程请看官网介绍

官网:http://hiprint.io/demo
在这里插入图片描述

过程

我这里直接给出完整的该打印插件、你只需要将该插件放到项目中,直接调用就行。具体如何调用、下文会说明。插件代码链接:我放在评论区置顶位置了

将插件代码放入项目中后,需要在项目中安装一些依赖。

cnpm install --save-dev jquery@3.3.1
cnpm install jquery-minicolors --save-dev
cnpm install bootstrap@3.4.1
cnpm install rgbcolor stackblur-canvas

提示:安装插件后,如果报jquery未定义的错误。就需要在配置文件中进行修改配置。具体如何配置,参考这篇博客:成功解决:jQuery is not defined

注意引用的地址、确保引入的地址正确。
在这里插入图片描述

拼接好的数据直接调用打印方法即可。

在这里插入图片描述

项目代码案例

这里是给出来如何使用插件进行数据的预览和打印、直接移入项目中,数据使用真实的数据就可以了。实现的效果如视频所示、这里将测试数据由三个改成一个。三个数据导致代码太长了。

<template>
  <div>
    <el-button type="primary" @click="testDoAndDownload"> 打印 </el-button>
    <el-button type="primary" @click="PreviewData"> 预览 </el-button>
    <div
      class="carousel"
      style="margin: 0px auto; text-align: center; height: 650px; width: 1000px"
    >
      <el-carousel :interval="125000" arrow="always" height="650">
        <el-carousel-item
          v-for="pdfInfo in printResults"
          :key="pdfInfo.page"
          v-show="pdfInfo.isSucceed"
        >
          <div
            v-if="pdfInfo.htmlData"
            v-html="pdfInfo.htmlData"
            style="margin: 0px auto; text-align: center"
          ></div>
        </el-carousel-item>
      </el-carousel>
    </div>
  </div>
</template>

<script>
import "jquery";
import "jquery-minicolors";
import "../../../static/print/plugin/hiprint/polyfill.min.js";
import "../../../static/print/plugin/hiprint/plugins/JsBarcode.all.min.js";
import "../../../static/print/plugin/hiprint/plugins/jquery.hiwprint.js";
import { toPdfs, viewPdf } from "../../../static/print/api/print-out-api";
import "../../../static/print/plugin/hiprint/css/hiprint.css";
import "../../../static/print/plugin/hiprint/css/print-lock.css";

export default {
  name: "HelloWorld",
  props: {
    msg: String,
  },
  data() {
    const printResults = [];

    const printDataONE2 = {
      customer_no: "4",
      account_no: "5",
      trade_date: "2023/04/21",
      stamp_uri:"[NULL]",
      // stamp_uri:
      //   "http://10.1.45.18:8080/icounter/printPicture/stamp_uri_6s9gwot5xe.png",
      check_user_no: "6",
      print_num: 6,
      trade_amount: "83247",
    };

    const printTemplateAndPrintDatas = [];
   printTemplateAndPrintDatas.push({
      receiptSn: "456fffff",
      receiptTitle: "现金存入" + "456fffff",
      templateData:
        '{"panels":[{"index":0,"height":148,"width":210,"paperHeader":-1.5,"paperFooter":379.5,"printElements":[{"options":{"left":187.5,"top":28.5,"height":21,"width":226,"title":"四川银行客户回单","fontSize":18,"fontWeight":"600","letterSpacing":2.5,"color":"#cc5a5a","textAlign":"center","lineHeight":18},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":297,"top":54,"height":20,"width":75,"title":"回单流水号:","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":372,"top":54,"height":20,"width":210,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"receipt_sn","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":82.5,"top":55.5,"height":20,"width":213,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"txn_date","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":10.5,"top":55.5,"height":20,"width":71,"title":"交易日期:","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":9,"top":76.5,"height":9,"width":572,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":96,"top":77,"height":299,"width":10,"borderColor":"#cc5a5a"},"printElementType":{"title":"竖线","type":"vline"}},{"options":{"left":407,"top":77,"height":130,"width":10,"borderColor":"#cc5a5a"},"printElementType":{"title":"竖线","type":"vline"}},{"options":{"left":330,"top":77,"height":130,"width":10,"borderColor":"#cc5a5a"},"printElementType":{"title":"竖线","type":"vline"}},{"options":{"left":580,"top":77,"height":299,"width":10,"borderColor":"#cc5a5a"},"printElementType":{"title":"竖线","type":"vline"}},{"options":{"left":9,"top":77,"height":299,"width":10,"borderColor":"#cc5a5a"},"printElementType":{"title":"竖线","type":"vline"}},{"options":{"left":97.5,"top":78,"height":20,"width":223.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"txn_type","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":406.5,"top":78,"height":20,"width":163.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"txn_sn","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":340.5,"top":81,"height":20,"width":71,"title":"交易流水","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":10.5,"top":81,"height":20,"width":71,"title":"业务类型","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":34.5,"top":96,"height":85,"width":10,"borderColor":"#cc5a5a"},"printElementType":{"title":"竖线","type":"vline"}},{"options":{"left":348,"top":96,"height":85,"width":9,"borderColor":"#cc5a5a"},"printElementType":{"type":"vline"}},{"options":{"left":9,"top":96,"height":9,"width":572,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":100.5,"top":105,"height":20,"width":226.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"receiver_name","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":352.5,"top":106.5,"height":20,"width":50,"title":"名    称","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"justify"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":409.5,"top":106.5,"height":20,"width":163.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"payer_name","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":40.5,"top":106.5,"height":20,"width":50,"title":"名    称","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"justify"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":331.5,"top":111,"height":55,"width":13,"title":"付款人","fontSize":13,"color":"#cc5a5a","lineHeight":18},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":15,"top":111,"height":53,"width":15,"title":"收款人","fontSize":13,"color":"#cc5a5a","lineHeight":18},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":35,"top":128,"height":9,"width":295,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":349,"top":128,"height":9,"width":232,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":100.5,"top":130.5,"height":20,"width":226.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"receiver_account","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":352.5,"top":130.5,"height":20,"width":50,"title":"账    号","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"justify"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":409.5,"top":130.5,"height":20,"width":163.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"payer_account","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":40.5,"top":130.5,"height":20,"width":50,"title":"账    号","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"justify"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":349,"top":153,"height":9,"width":232,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":35,"top":153,"height":9,"width":295,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":35,"top":153,"height":9,"width":295,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":100.5,"top":156,"height":20,"width":226.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"receiver_open_bank","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":352.5,"top":156,"height":20,"width":50,"title":"开户银行","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"justify"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":40.5,"top":156,"height":20,"width":50,"title":"开户银行","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":409.5,"top":156,"height":20,"width":163.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"payer_open_bank","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":9,"top":180,"height":9,"width":572,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":100.5,"top":184.5,"height":20,"width":226.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"paying_bank_no","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":15,"top":184.5,"height":20,"width":71,"title":"汇入行行","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":334.5,"top":184.5,"height":20,"width":71,"title":"汇出行行号","color":"#cc5a5a","fontSize":11.25,"lineHeight":13,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":409.5,"top":184.5,"height":20,"width":163.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"remitting_bank_no","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":9,"top":207,"height":9,"width":572,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":102,"top":210,"height":20,"width":472.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"big_trade_amount","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":15,"top":210,"height":20,"width":71,"title":"大写金额","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":9,"top":232,"height":9,"width":572,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":100.5,"top":235.5,"height":20,"width":474,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"little_trade_amount","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":15,"top":235.5,"height":20,"width":71,"title":"小写金额","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":9,"top":257,"height":9,"width":572,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":408,"top":258,"height":119,"width":10,"borderColor":"#cc5a5a"},"printElementType":{"title":"竖线","type":"vline"}},{"options":{"left":100.5,"top":261,"height":50,"width":301.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"postscript","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":15,"top":261,"height":50,"width":71,"title":"附言","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"justify"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":420,"top":262.5,"height":138,"width":159,"field":"stamp_uri","fixed":true},"printElementType":{"type":"image"}},{"options":{"left":9,"top":315,"height":9,"width":400,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":15,"top":319.5,"height":50,"width":71,"title":"摘要","color":"#cc5a5a","lineHeight":13,"fontSize":11.25,"textAlign":"justify"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":100.5,"top":319.5,"height":50,"width":301.5,"color":"#2935e3","lineHeight":13,"fontSize":11.25,"field":"abstract","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":9,"top":376,"height":9,"width":572,"borderColor":"#cc5a5a"},"printElementType":{"type":"hline"}},{"options":{"left":70.5,"top":385.5,"height":20,"width":103.5,"color":"#2935e3","field":"print_num","testData":"1","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":234,"top":385.5,"height":20,"width":139.5,"color":"#2935e3","field":"print_date","hideTitle":true},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":180,"top":385.5,"height":20,"width":50,"title":"打印日期:","color":"#cc5a5a","textAlign":"center"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":385.5,"top":385.5,"height":20,"width":50,"title":"银行盖章:","color":"#cc5a5a"},"printElementType":{"title":"文本","type":"text"}},{"options":{"left":15,"top":385.5,"height":20,"width":50,"title":"打印次数:","color":"#cc5a5a","textAlign":"center"},"printElementType":{"title":"文本","type":"text"}}],"paperNumberLeft":565.5,"paperNumberTop":394.5,"paperNumberDisabled":true}]}',
      printData: JSON.stringify(printDataONE2),
    });
  return { printTemplateAndPrintDatas, printResults };
  },
  methods: {
    /**
     * 预览
     */
    PreviewData() {
      this.printResults = [];
      toPdfs(this.printTemplateAndPrintDatas, "").then((tempPrintResults) => {
        this.printResults.push(...tempPrintResults);
        console.log("获取pdf结果", this.printResults);
      });
    },

    /**
     * 打印
     */
    testDoAndDownload() {
      toPdfs(this.printTemplateAndPrintDatas, "").then((tempPrintResults) => {
        // this.printResults.push(...tempPrintResults);
        // console.log("获取pdf结果", this.printResults);
        //打印pdf
        for (const tempPrintResult of tempPrintResults) {
          viewPdf(tempPrintResult.pdfData, tempPrintResult.receiptTitle);
        }
      });
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.carousel /deep/ .el-carousel__container {
  height: 650px !important;
}

.carousel /deep/ .hiprint-printPaper {
  margin: 0 auto;
}

h3 {
  margin: 40px 0 0;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/799640.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

多线程进阶篇----常用方法

文章目录 线程状态线程方法线程礼让线程优先级守护线程 线程同步生产者消费者问题解决方式一&#xff1a;管程法方法二&#xff1a;标志位法 死锁总结 线程状态 线程有5种状态&#xff0c;新生态、就绪态、阻塞态、运行态、死亡态 在该图上&#xff0c;就绪状态和运行状态是一…

webpack联邦模块介绍及在dumi中使用问题整理

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、ModuleFederationPlugin参数含义&#xff1f;二、如何在dumi中使用及问题整理1. 如何在dumi中使用(这个配置是好使的)2.相关问题整理2.1 问题12.2 问题2 总…

Android 之 动画合集之属性动画 -- 初见

本节引言&#xff1a; 本节给带来的是Android动画中的第三种动画——属性动画(Property Animation)&#xff0c; 记得在上一节Android 之 动画合集之补间动画为Fragment 设置过渡动画的时候&#xff0c;说过&#xff0c;App包和V4包下的Fragment调用setCustomAnimations()对应…

白皮书精彩案例分享 | 数字孪生:让治水用水有了“智慧大脑”

山有百藏而不言&#xff0c;水润万物而不语。中国属于大河文明&#xff0c;农业历来在经济中占主导地位&#xff0c;其中水利灌溉是保证农业生产和提高农业产量的重要因素。 然而&#xff0c;由于过去水利工程建设缺乏预见性&#xff0c;传统水利工程在作出贡献的同时&#xf…

JavaScript 简单实现观察者模式和发布订阅模式

JavaScript 简单实现观察者模式和发布订阅模式 1. 观察者模式1.1 如何理解1.2 代码实现 2. 发布订阅模式2.1 如何理解2.2 代码实现 1. 观察者模式 1.1 如何理解 概念&#xff1a;观察者模式定义对象间的一种一对多的依赖关系&#xff0c;当一个对象的状态发生改变时&#xff…

重生之我要学C++第三天(类和对象)

我重生了&#xff0c;这篇文章就深入的探讨C中的类和对象。 一.类的引入和定义 类的引入&#xff1a;在C语言中&#xff0c;结构体内部只能定义变量或者结构体&#xff0c;C中对结构体进行了升级->类&#xff0c;C的类中既可以定义变量&#xff0c;又可以定义函数。类中的变…

TSINGSEE青犀视频安防监控视频平台EasyCVR新增密码复杂度提示

智能视频监控平台TSINGSEE青犀视频EasyCVR可拓展性强、视频能力灵活、部署轻快&#xff0c;可支持的主流标准协议有国标GB28181、RTSP/Onvif、RTMP等&#xff0c;以及支持厂家私有协议与SDK接入&#xff0c;包括海康Ehome、海大宇等设备的SDK等&#xff0c;能对外分发RTSP、RTM…

BERT模型和Big Bird模型对比

BERT模型简介 BERT模型是基于Transformers的双向编码器表示&#xff08;BERT&#xff09;&#xff0c;在所有层中调整左右情境&#xff08;学习上下层语义信息&#xff09;。 Transformer是一种深度学习组件&#xff0c;能够处理并行序列、分析更大规模的数据、加快模型训练速…

sftp和scp协议,哪个传大文件到服务器传输速率快?

环境&#xff1a; 1.Win scp 6.1.1 2.XFTP 7 3.9.6G压缩文件 4.Centos 7 5.联想E14笔记本Win10 6.HW-S1730S-S48T4S-A交换机 问题描述&#xff1a; sftp和scp协议&#xff0c;哪个传大文件到服务器速度快&#xff1f; 1.SFTP 基于SSH加密传输文件&#xff0c;可靠性高&am…

Profinet转EtherNet/IP网关连接AB PLC的应用案例

西门子S7-1500 PLC&#xff08;profinet&#xff09;与AB PLC以太网通讯&#xff08;EtherNet/IP&#xff09;。本文主要介绍捷米特JM-EIP-PN的Profinet转EtherNet/IP网关&#xff0c;连接西门子S7-1500 PLC与AB PLC 通讯的配置过程&#xff0c;供大家参考。 1, 新建工程&…

护网行动:ADSelfService Plus引领企业网络安全新纪元

随着信息技术的飞速发展&#xff0c;企业网络的重要性变得愈发显著。然而&#xff0c;随之而来的网络安全威胁也日益增多&#xff0c;网络黑客和恶意软件不断涌现&#xff0c;给企业的数据和机密信息带来巨大风险。在这个信息安全威胁层出不穷的时代&#xff0c;企业急需一款强…

API攻击原理,以及如何识别和预防

攻击者知道在针对API时如何避开WAF和API网关。以下是一些公司应对API攻击快速增长的示例。 5月初&#xff0c;Pen Test Partners 安全研究员 Jan Masters 发现&#xff0c;他竟然能够在未经身份验证的情况下&#xff0c;向Peloton的官方API提出可获取其它用户私人数据的请求&am…

TEE GP(Global Platform)功能认证产品

TEE之GP(Global Platform)认证汇总 一、功能认证产品介绍 选择Functional和TEE Initial Configuration v1.1&#xff0c;然后SEARCH&#xff0c;可以看到TEE对应的功能认证产品。 二、CK810MFT V3.8, ERAGON V3, ALIBABA CLOUD LINK TEE V1.2.0 参考&#xff1a; GlobalPlatf…

知乎高赞|什么是低代码,强烈推荐!

本文摘自知乎用户吴多益的文章《从实现原理看低代码》&#xff0c;与以往抽象的定义不同&#xff0c;本文是从代码的角度定义低代码&#xff0c;有非常高的学习价值&#xff01;欢迎大家去看原文。 在讨论各个低代码方案前&#xff0c;首先要明确「低代码」究竟是什么&#xff…

微信联系人批量删除功能如何操作?删除的联系人如何恢复?

继微信推出了朋友圈置顶功能后&#xff0c;微信又推出了"批量删除好友的功能" &#xff0c;具体的操作步骤如下&#xff1a; 第一步 是点击聊天界面上的搜索框"搜索" 第二步 "搜索"排序字母&#xff0c;点击"更多联系人" 第三步 搜…

GNN的一篇入门 :A Gentle Introduction to Graph Neural Networks

原文链接 A Gentle Introduction to Graph Neural Networks (distill.pub)https://distill.pub/2021/gnn-intro/ 内容简介&#xff1a;本文是“A Gentle Introduction to Graph Neural Networks”的阅读笔记&#xff0c;因为第一次接触GNN&#xff0c;很多深奥的概念不懂&…

a柱透明屏好处和挑战详解

a柱透明屏是一种新型的汽车技术&#xff0c;它可以将车辆的a柱部分变得透明&#xff0c;提高驾驶员的视野和安全性。这项技术的出现&#xff0c;将为驾驶员提供更好的驾驶体验和更高的安全性能。 a柱是汽车车身结构中的一部分&#xff0c;位于车辆前部&#xff0c;连接车顶和车…

wangEditor初探

1、前言 现有的Quill比较简单&#xff0c;无法满足业务需求&#xff08;例如SEO的图片属性编辑需求&#xff09; Quill已经有比较长的时间没有更新了&#xff0c;虽然很灵活&#xff0c;但是官方demo都没有一个。 业务前期也没有这块的需求&#xff0c;也没有考虑到这块的扩展…

总结 Android 开发中截取字符串的方法

string str”hello word”;int i5; 1 取字符串的前i个字符 strstr.Substring(0,i); // or strstr.Remove(i,str.Length-i);substring(start,end)&#xff1a;substring是截取2个位置之间及start-end之间的字符串2 去掉字符串的前i个字符&#xff1a; strstr.Remove(0,i); // or…

HTTP vs HTTPS: 网络安全的重要转变

文章目录 一、HTTP的缺点1.1 通信使用明文可能会被窃听1.2 不验证通信方的身份就可能遭遇伪装1.3 无法证明报文完整性&#xff0c;可能已遭篡改 二、 HTTP 加密 认证 完整性保护 HTTPS2.1 HTTPS 是身披 SSL 外壳的 HTTP2.2 HTTPS采用混合加密机制2.3 HTTPS存在的问题 一、HTT…