文章目录

  • 前言
  • 相关内容了解
  • 打印预览功能
    • 1 创建winform工程
    • 2 创建要打印的测试数据
    • 3 绘制打印页
    • 绘制页脚
    • 绘制内容
    • PrintPage事件
  • 完整的代码工程
  • 小节

前言

有这么个需求:DataTable中有一些数据是需要给显示或直接可以连接打印机进行打印的, 查阅了一下资料,发现官方就有组件PrintPreviewDialog和PrintDocument能实现这个功能。

相关内容了解

1 PrintPreviewDialog是一个打印预览的对话框,有打印,缩放、页面显示、选择页数、关闭等按钮。
长得就是这个样子。

2 PrintDocument类:是一个可以发送到打印机上的对象

3 PrintDocument.PrintPage 事件 当需要为当前页打印的输出时发生
4 PaperSize 类 指定纸张的大小
5 PageSettings.PaperSize 属性 获取或设置该页的纸张大小
6 PrinterSettings 类 指定打印时如何打印文档的信息,包括打印文档的打印机
7 PaperKind 枚举 指定标准纸张大小

8 Margins 类 指定打印页的边距尺寸

左上角的坐标点是(MarginBounds.X, MarginBounds.Y)

e.MarginBounds.Right = e.MarginBounds.Left + e.MarginBounds.Width
e.MarginBounds.Bottom = e.MarginBounds.Top + e.MarginBounds.Height


具体可以查看MSDN的介绍:
1、PrintDocument 类 https://learn.microsoft.com/zh-cn/dotnet/api/system.drawing.printing.printdocument?view=dotnet-plat-ext-7.0
2、Margins 类 https://learn.microsoft.com/zh-cn/dotnet/api/system.drawing.printing.margins?view=dotnet-plat-ext-7.0

打印预览功能

1 创建winform工程

先创建一个winform工程,在窗体上放置了一个Button,名称是btnPreView打印预览的入口按钮,
还有一个PrintDocument组件,名称是myDocument用于呈现要打印的内容。

2 创建要打印的测试数据

使用一个全局DataTable 名为saveTable存放测试数据。这里创建了100 行* 5列的数据,每列分别是 序号、名称、当前值、描述和默认值这五列。当然这只是我赋予的意义,为了好记而已。

        /// <summary>/// 构建临时数据表/// </summary>/// <returns></returns>private DataTable CreateTable(){DataTable dt = new DataTable();DataColumn col1 = new DataColumn("Num", typeof(string)); //序号DataColumn col2 = new DataColumn("Name", typeof(string)); //名称DataColumn col3 = new DataColumn("Val", typeof(string));  //当前值DataColumn col4 = new DataColumn("Des", typeof(string));  //描述DataColumn col5 = new DataColumn("Set", typeof(string)); //默认值dt.Columns.Add(col1);dt.Columns.Add(col2);dt.Columns.Add(col3);dt.Columns.Add(col4);dt.Columns.Add(col5);Random random = new Random();List<string> nameList = new List<string>{"A", "BB", "CCC", "D","E", "F", "G","H","II","JJ", "LL", "M"};List<string> tempList = new List<string>{"dsd", "sdfdgvre", "Hello", "Gilrs","Today", "YYYY", "dfgre","GSD","fdgfer","Wesd", "DLG", "fsdahfi;o"};for (int i = 0; i < 10; i++){for (int j = 0; j < 10; j++){DataRow dr = dt.NewRow();//序号dr[0] = "KK" + i.ToString("d2") + "." + j.ToString("d2");//名称dr[1] = nameList[j];//当前值if (j % 3 == 0){dr[2] = random.NextDouble().ToString("f3");}else{dr[2] = i * j - random.Next(0, 30);}//描述dr[3] = tempList[j];//出厂值dr[4] = random.NextDouble().ToString("f2");//添加新行dt.Rows.Add(dr);}}return dt;}

3 绘制打印页

这里的绘制分为三个部分,表头、内容和页脚。绘制方法都是大同小异,只是为了模块化,划分了不同区域。使用Draw绘制,重要的是找到要绘制点的X 、Y 坐标,通过MeasureString计算字体的高度, 其余的功能都还比较简单。
先看一下要打印的模板,类似下图。

绘制标题(页眉) 序号 名称

        /// <summary>/// 绘制标题头/// </summary>/// <param name="e">绘图对象</param>/// <param name="tempTop">Y轴坐标</param>/// <param name="tempFormat">字符串格式</param>private void DrawTitle(System.Drawing.Printing.PrintPageEventArgs e,int tempTop, StringFormat tempFormat){//绘制水平线e.Graphics.DrawLine(Pens.Black,new Point(e.MarginBounds.Left, tempTop),new Point(e.MarginBounds.Right, tempTop));Font printFont = new Font(fontName, fontNum);//计算字体的高度 K00ARk, 根据使用到的字进行组合成串int fontHeight = (int)(e.Graphics.MeasureString("K00ARk", printFont).Height);//画刷SolidBrush brush = new SolidBrush(Color.Black);//填充背景色e.Graphics.FillRectangle(Brushes.LightBlue,new RectangleF(e.MarginBounds.Left, tempTop, e.MarginBounds.Width, fontHeight));//列的序号int col = 0;//列 序号string drawString = TitleStr[col];//矩形框RectangleF rectangle = new RectangleF((int)cellLeft[col], tempTop,(int)cellWidth[col], fontHeight);e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 名称drawString = TitleStr[col];//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 设定值drawString = TitleStr[col];//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 默认值drawString = TitleStr[col];//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);}

绘制页脚

在底部添加公司信息和页码作为页脚。

        /// <summary>/// 绘制页脚/// </summary>/// <param name="e">绘图对象</param>/// <param name="pageNo">页面序号</param>private void DrawFooter(System.Drawing.Printing.PrintPageEventArgs e, int pageNo){Font font = new Font("微软雅黑", 10);//绘制直线e.Graphics.DrawLine(new Pen(Color.Black, 1),new Point(e.MarginBounds.Left, e.MarginBounds.Bottom),new Point(e.MarginBounds.Right, e.MarginBounds.Bottom));//公司信息标注string tempStr = "Test for Windows(C) by 唠嗑一夏 Electric Corporation";e.Graphics.DrawString(tempStr,font, Brushes.Black,e.MarginBounds.Left,e.MarginBounds.Bottom+2);//页脚序号tempStr = pageNo.ToString();e.Graphics.DrawString(tempStr,font, Brushes.Black,e.MarginBounds.Right -  e.Graphics.MeasureString(tempStr, font).Width,e.MarginBounds.Bottom+2);}

绘制内容

一行一行的绘制DataTable中的数据内容。

        /// <summary>/// 绘制内容/// </summary>///  <param name="e">绘图对象</param>///  <param name="printIndex">数据行索引</param>/// <param name="tempTop">Y轴坐标</param>/// <param name="tempFormat">字符串格式</param>private void DrawContent(System.Drawing.Printing.PrintPageEventArgs e, int printIndex, int tempTop, StringFormat tempFormat){Font printFont = new Font(fontName, fontNum);//计算字体的高度 K00ARk, 根据使用到的字进行组合成串int fontHeight = (int)(e.Graphics.MeasureString("K00ARk", printFont).Height);//画刷SolidBrush brush = new SolidBrush(Color.Black);//列的序号int col = 0;//列 序号string drawString = saveTable.Rows[printIndex][0].ToString() + saveTable.Rows[printIndex][1].ToString();//矩形框RectangleF rectangle = new RectangleF((int)cellLeft[col], tempTop,(int)cellWidth[col], fontHeight);e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 名称drawString = saveTable.Rows[printIndex][3].ToString();//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 设定值drawString = saveTable.Rows[printIndex][2].ToString();//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 默认值drawString = saveTable.Rows[printIndex][4].ToString();//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);}

PrintPage事件

计算每列占的比例,在事件中判断是否需要换页以及是否绘制结束。

   /// <summary>/// 当前页打印发生的事件/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void MyDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e){//页面大小PaperSize pageSize = e.PageSettings.PaperSize;//根据页面大小,按比例划分列宽//序号cellWidth[0] = (float)(pageSize.Width * 0.098);//描述cellWidth[1] = (float)(pageSize.Width * 0.36);//当前值cellWidth[2] = (float)(pageSize.Width * 0.2);//出厂值cellWidth[3] = (float)(pageSize.Width * 0.1176);//计算列的起始位置cellLeft[0] = e.PageSettings.Margins.Left;cellLeft[1] = cellLeft[0] + cellWidth[0];cellLeft[2] = cellLeft[1] + cellWidth[1];cellLeft[3] = cellLeft[2] + cellWidth[2];//高度int tempTop = e.MarginBounds.Top;//是否新的页面bool tempIsNewPage = true;//设置打印字符串的格式StringFormat tempStrFormat = new StringFormat{Alignment = StringAlignment.Near,LineAlignment = StringAlignment.Center,Trimming = StringTrimming.EllipsisCharacter};//设置字体Font printFont = new Font("宋体", 9);//计算字体的高度int fontHeight = (int)e.Graphics.MeasureString("KK00.10序号", printFont).Height;//指定高质量、低速度呈现e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;try{string printStr;while(printPoint < saveTable.Rows.Count){//逐行分页打印所有参数if (tempTop + fontHeight > e.MarginBounds.Bottom){//判断当前打印是否超出页面范围,决定是否换页//打印页脚DrawFooter(e, PageNo);PageNo++;//继续分页打印e.HasMorePages = true;return;}//打印当前页的内容//KK00.00printStr = saveTable.Rows[printPoint][0].ToString().Substring(5);if (printStr.Equals("00") || tempIsNewPage){//一组数据的开始tempIsNewPage = false;tempTop += 2;//绘制标题DrawTitle(e, tempTop, tempStrFormat);tempTop += fontHeight;}//绘制内容DrawContent(e, printPoint, tempTop, tempStrFormat);//更新Y轴高度tempTop += fontHeight;//序号自增printPoint++;//判断是否已经到终点if(printPoint >= saveTable.Rows.Count){//绘制页脚DrawFooter(e, PageNo);//重置打印参数PageNo = 1;printPoint = 0;return;}}}catch{}}

完整的代码工程

下面是完整的代码工程,设计界面的代码就不列出来了。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Printing;
using System.Linq;
using System.Text;
using System.Windows.Forms;namespace PrintDemo
{public partial class Form1 : Form{//打印序号int printPoint = 0;//页码int PageNo = 1;//表头名称string[] TitleStr = new string[]{"序号", "名称", "当前值", "出厂值"};//列宽float[] cellWidth = new float[4];//列左侧的起始位置float[] cellLeft = new float[4];//数据表DataTable saveTable;string fontName = "宋体";int fontNum = 9;public Form1(){InitializeComponent();}private void Form1_Load(object sender, EventArgs e){//数据saveTable = CreateTable();//打印预览按钮btnPreView.Click += BtnPreView_Click;//当前页打印发生的事件myDocument.PrintPage += MyDocument_PrintPage;}/// <summary>/// 构建临时数据表/// </summary>/// <returns></returns>private DataTable CreateTable(){DataTable dt = new DataTable();DataColumn col1 = new DataColumn("Num", typeof(string)); //序号DataColumn col2 = new DataColumn("Name", typeof(string)); //名称DataColumn col3 = new DataColumn("Val", typeof(string));  //当前值DataColumn col4 = new DataColumn("Des", typeof(string));  //描述DataColumn col5 = new DataColumn("Set", typeof(string)); //默认值dt.Columns.Add(col1);dt.Columns.Add(col2);dt.Columns.Add(col3);dt.Columns.Add(col4);dt.Columns.Add(col5);Random random = new Random();List<string> nameList = new List<string>{"A", "BB", "CCC", "D","E", "F", "G","H","II","JJ", "LL", "M"};List<string> tempList = new List<string>{"dsd", "sdfdgvre", "Hello", "Gilrs","Today", "YYYY", "dfgre","GSD","fdgfer","Wesd", "DLG", "fsdahfi;o"};for (int i = 0; i < 10; i++){for (int j = 0; j < 10; j++){DataRow dr = dt.NewRow();//序号dr[0] = "KK" + i.ToString("d2") + "." + j.ToString("d2");//名称dr[1] = nameList[j];//当前值if (j % 3 == 0){dr[2] = random.NextDouble().ToString("f3");}else{dr[2] = i * j - random.Next(0, 30);}//描述dr[3] = tempList[j];//出厂值dr[4] = random.NextDouble().ToString("f2");//添加新行dt.Rows.Add(dr);}}return dt;}/// <summary>/// 打印预览/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void BtnPreView_Click(object sender, EventArgs e){//打印预览对话框PrintPreviewDialog dialog = new PrintPreviewDialog();dialog.Document = myDocument;dialog.ShowIcon = false;dialog.ShowDialog();}/// <summary>/// 当前页打印发生的事件/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void MyDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e){//页面大小PaperSize pageSize = e.PageSettings.PaperSize;//根据页面大小,按比例划分列宽//序号cellWidth[0] = (float)(pageSize.Width * 0.098);//描述cellWidth[1] = (float)(pageSize.Width * 0.36);//当前值cellWidth[2] = (float)(pageSize.Width * 0.2);//出厂值cellWidth[3] = (float)(pageSize.Width * 0.1176);//计算列的起始位置cellLeft[0] = e.PageSettings.Margins.Left;cellLeft[1] = cellLeft[0] + cellWidth[0];cellLeft[2] = cellLeft[1] + cellWidth[1];cellLeft[3] = cellLeft[2] + cellWidth[2];//高度int tempTop = e.MarginBounds.Top;//是否新的页面bool tempIsNewPage = true;//设置打印字符串的格式StringFormat tempStrFormat = new StringFormat{Alignment = StringAlignment.Near,LineAlignment = StringAlignment.Center,Trimming = StringTrimming.EllipsisCharacter};//设置字体Font printFont = new Font("宋体", 9);//计算字体的高度int fontHeight = (int)e.Graphics.MeasureString("KK00.10序号", printFont).Height;//指定高质量、低速度呈现e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;try{string printStr;while(printPoint < saveTable.Rows.Count){//逐行分页打印所有参数if (tempTop + fontHeight > e.MarginBounds.Bottom){//判断当前打印是否超出页面范围,决定是否换页//打印页脚DrawFooter(e, PageNo);PageNo++;//继续分页打印e.HasMorePages = true;return;}//打印当前页的内容//KK00.00printStr = saveTable.Rows[printPoint][0].ToString().Substring(5);if (printStr.Equals("00") || tempIsNewPage){//一组数据的开始tempIsNewPage = false;tempTop += 2;//绘制标题DrawTitle(e, tempTop, tempStrFormat);tempTop += fontHeight;}//绘制内容DrawContent(e, printPoint, tempTop, tempStrFormat);//更新Y轴高度tempTop += fontHeight;//序号自增printPoint++;//判断是否已经到终点if(printPoint >= saveTable.Rows.Count){//绘制页脚DrawFooter(e, PageNo);//重置打印参数PageNo = 1;printPoint = 0;return;}}}catch{}}/// <summary>/// 绘制页脚/// </summary>/// <param name="e">绘图对象</param>/// <param name="pageNo">页面序号</param>private void DrawFooter(System.Drawing.Printing.PrintPageEventArgs e, int pageNo){Font font = new Font("微软雅黑", 10);//绘制直线e.Graphics.DrawLine(new Pen(Color.Black, 1),new Point(e.MarginBounds.Left, e.MarginBounds.Bottom),new Point(e.MarginBounds.Right, e.MarginBounds.Bottom));//公司信息标注string tempStr = "Test for Windows(C) by 唠嗑一夏 Electric Corporation";e.Graphics.DrawString(tempStr,font, Brushes.Black,e.MarginBounds.Left,e.MarginBounds.Bottom+2);//页脚序号tempStr = pageNo.ToString();e.Graphics.DrawString(tempStr,font, Brushes.Black,e.MarginBounds.Right -  e.Graphics.MeasureString(tempStr, font).Width,e.MarginBounds.Bottom+2);}/// <summary>/// 绘制标题头/// </summary>/// <param name="e">绘图对象</param>/// <param name="tempTop">Y轴坐标</param>/// <param name="tempFormat">字符串格式</param>private void DrawTitle(System.Drawing.Printing.PrintPageEventArgs e,int tempTop, StringFormat tempFormat){//绘制水平线e.Graphics.DrawLine(Pens.Black,new Point(e.MarginBounds.Left, tempTop),new Point(e.MarginBounds.Right, tempTop));Font printFont = new Font(fontName, fontNum);//计算字体的高度 K00ARk, 根据使用到的字进行组合成串int fontHeight = (int)(e.Graphics.MeasureString("K00ARk", printFont).Height);//画刷SolidBrush brush = new SolidBrush(Color.Black);//填充背景色e.Graphics.FillRectangle(Brushes.LightBlue,new RectangleF(e.MarginBounds.Left, tempTop, e.MarginBounds.Width, fontHeight));//列的序号int col = 0;//列 序号string drawString = TitleStr[col];//矩形框RectangleF rectangle = new RectangleF((int)cellLeft[col], tempTop,(int)cellWidth[col], fontHeight);e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 名称drawString = TitleStr[col];//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 设定值drawString = TitleStr[col];//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 默认值drawString = TitleStr[col];//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);}/// <summary>/// 绘制内容/// </summary>///  <param name="e">绘图对象</param>///  <param name="printIndex">数据行索引</param>/// <param name="tempTop">Y轴坐标</param>/// <param name="tempFormat">字符串格式</param>private void DrawContent(System.Drawing.Printing.PrintPageEventArgs e, int printIndex, int tempTop, StringFormat tempFormat){Font printFont = new Font(fontName, fontNum);//计算字体的高度 K00ARk, 根据使用到的字进行组合成串int fontHeight = (int)(e.Graphics.MeasureString("K00ARk", printFont).Height);//画刷SolidBrush brush = new SolidBrush(Color.Black);//列的序号int col = 0;//列 序号string drawString = saveTable.Rows[printIndex][0].ToString() + saveTable.Rows[printIndex][1].ToString();//矩形框RectangleF rectangle = new RectangleF((int)cellLeft[col], tempTop,(int)cellWidth[col], fontHeight);e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 名称drawString = saveTable.Rows[printIndex][3].ToString();//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 设定值drawString = saveTable.Rows[printIndex][2].ToString();//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);col++;//列 默认值drawString = saveTable.Rows[printIndex][4].ToString();//水平向右平移 并设置矩形框的宽度rectangle.X = cellLeft[col];rectangle.Width = cellWidth[col];e.Graphics.DrawString(drawString, printFont,brush, rectangle, tempFormat);}}
}

最后的效果图

小节

1 使用PrintPreviewDialog + PrintDocument 可以实现打印预览功能

2 页面的绘制是在PrintDocument 的PrintDocument.PrintPage打印页事件中绘制

3 System.Drawing.Printing.PrintPageEventArgs e 在 e.Graphics的画布上进行绘制,DrawString绘制文本,DrawLine绘制直线,FillRectangle填充背景色,根据实际需要选择相应的接口。

4 绘制需要注意绘制点的X Y 坐标,可以以页面的边距e.MarginBounds作为参考点,使用e.Graphics.MeasureString可以测量该字符串占用的高和宽。

C# 使用自带的组件PrintPreviewDialog 和 PrintDocument实现打印预览(一)相关推荐

  1. 使用3D Max里面自带的门,怎么设置动画并预览

    物体怎么添加门啊?就是怎么开门和关门 @长沙-魁梧的大叔 墙上添加门?还是您自己的柜子要加门? 自己的柜子 不是墙上 那就要自己做柜子门的模型动画了 用什么做?3D max? 一般是的,你喜欢用其它编 ...

  2. vue中pdf预览组件_Vue+ElementUI使用vue-pdf实现预览功能

    Vue + ElementUI项目中使用vue-pdf实现简单预览,供大家参考,具体内容如下 1.安装 vue-pdf npm install --save vue-pdf 2.在vue页面中导入对应 ...

  3. nopi word to html,C# 基于NPOI+Office COM组件 实现20行代码在线预览文档(word,excel,pdf,txt,png)...

    由于项目需要,需要一个在线预览office的功能,小编一开始使用的是微软提供的方法,简单快捷,但是不符合小编开发需求, 就另外用了:将文件转换成html文件然后预览html文件的方法.对微软提供的方法 ...

  4. uniapp利用uview2.0中的uploadFile组件实现多张图片的增删预览上传功能

    效果图 <template><view><view class="main-intro" style="background-color: ...

  5. 【教程】PDF组件Spire.PDF 教程:在C#中显示PDF文件的打印预览

    本文演示如何使用Spire.PDF和c#在Windows窗体应用程序中显示PDF文件的打印预览. 在使用下面的代码之前,我们需要创建一个Windows窗体应用程序,在窗体中添加一个PrintPrevi ...

  6. 饿了么UI组件库中,Image组件预览图片错位的解决

    使用过elementUI组件库中的Image组件基本都知道,其组件会自带一个图片预览功能,仅需要通过preview-src-list传入需要预览的图片url列表即可实现点击预览. 博主使用了此功能,进 ...

  7. imagepreview使用案例_展示组件 ImagePreview 图片预览 - 闪电教程JSRUN

    ImagePreview 图片预览 引入 ImagePreview和其他组件不同,不是通过HTML结构的方式来使用,而是通过函数调用的方式.使用前需要先引入它. import Vue from 'vu ...

  8. vue移动端图片预览组件

    更新说明:1.02版本采用show属性值控制组件的显示与隐藏,不再使用v-if!! 安装:npm install -s w-previewimg 或 yarn add w-previewimg 在线预 ...

  9. 基于React的图片预览组件

    一. 需求:最近项目中遇到要进行图片预览的需求,在网上找了一大圈可用的图片预览组件,起初选择react-wx-images-viewer作为预览组件二次开发,但后来发现虽然这个组件在Git上113个s ...

最新文章

  1. 第三章:Python基础の函数和文件操作实战
  2. 测试你的电脑是否支持Hyper-V
  3. 使用Spring Data REST将Spring Data JPA存储库导出为REST服务
  4. oracle常用表查询,ORACLE EBS常用表及查询语句(最终整理版)
  5. 【原创】CLEVO P157SM外接鼠标键盘失灵解决:更换硅脂(附带最新跑分数据)
  6. NLP《Tranformer和Self-Attention》
  7. 散户“大溃败”?GME连续5日暴跌80% 白银价格急转直下
  8. CodeFores 665D Simple Subset(贪心)
  9. linux 函数自动补全,Shell脚本中实现自动补全功能
  10. 对象refresh的方法iadodc失败_3个必备cookie实用方法
  11. hdu1274 展开字符串
  12. 小米pro笔记本加装dw1820a无线网卡,完美装苹果macOS
  13. 论大学学霸是怎样炼成的……
  14. Matlab学习笔记9.3:Matlab之神经网络模型
  15. VUE echarts绘制省级/市级地图自动轮循tooltip
  16. winform抓取淘宝宝贝详细页的上下架时间等信息
  17. 如何使用计算机处理文件,怎么处理电脑的缓存文件
  18. java 容器都有哪些?
  19. 服务器租用哪家的机房好
  20. Vue上传阿里云OSS(STS方式)

热门文章

  1. 计算机格式为gpt怎么更改,gpt分区怎么更改成mbr分区
  2. IT人的附加价值 —— 怎么薪水高赚大钱!
  3. JDK1.7 sun.net.ftp.FtpClient
  4. (plugin postcss) Error: ‘~/theme/default.less‘ wasn‘t found. Tried - /style/themes 。less 中的~什么意思
  5. AI独角兽闯关IPO:古典思维导演的悲喜剧
  6. 【硬刚大数据】Flink在实时在实时计算平台和实时数仓中的企业级应用小结
  7. python实现李洵同款动态爱心
  8. 日语常见的助词有哪些,请掌握好
  9. 22.Python中的repr()函数
  10. ERROR 我的Umap怎么和鬼画符一样,umap分群不好可能是因为dim打错了