1.0.4 • Published 4 months ago

vue-watermark-v2 v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

vue-watermark-v2(当前版本 V1.0.4)

简单、便捷、高效的 vue 水印设置组件

兼容版本

Vue2.6+

Install

	npm i vue-watermark-v2 -S

	//main.js
	import vwv from "vue-watermark-v2";
	Vue.use(vwv)

	//使用示例
    <vue-watermark-v2
      font-size="12"
      :rotate="-30"
      :mark-size="200"
      :gap="[68, 68]"
      :content="contents"
    >
    </vue-watermark-v2>

	contents: [
        {
          text: "",
          style: {
            fontSize: 16,
            fontFamily: "宋体",
            color: "red",
          },
        },
        {
          text: "by 能给你",
          style: {
            fontSize: 16,
            fontFamily: "宋体",
            color: "blue",
          },
        },
      ]

props

属性类型说明默认是否必传
defalutContentString默认水印名,传入的 content 没有指定 text,则用此字段这是默认水印名false
contentArray传入的水印文本,详细看正文 content 说明[]false
imageString水印设置为传入的图像,请传入完整的资源路径,若传入此,则不显示文字""false
pIndexString水印层级9999false
markSizeNumber水印默认大小100false
rotateNumber旋转角度-30false
fontWeightString字体粗细设置(normal /light /weight / number 可选)"light"false
opacityNumber透明度0.3false
colorString字体颜色"rgba(0, 0, 0)"false
fontSizeNumber/ String字体的大小12false
fontFamilyString字体"serif"false
gapArray水印之间的间隔,第一项指 X 轴,第二项 Y 轴88, 88false

content 字段配置

属性类型说明是否必传
textString水印文字,若没指定,则显示 defalutContent 字段,若设置了 image 则不显示文字true
styleObject设置字段样式,若设置了 style,则优先取 style 中的,否则取 props 中默认值,具体配置项看下方 stylefalse

style 配置说明

属性类型说明默认是否必传
fontWeightString字体粗细设置(normal /light /weight / number 可选)false
colorString字体颜色false
fontSizeNumber/ String字体的大小false
fontFamilyString字体false

Other

1、如果有其他问题邮件沟通1195669615@qq.com或者加 qq1195669615。

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago