水印相关修改
This commit is contained in:
parent
cdfad96cb9
commit
8da205988f
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-05-06 11:12:00
|
||||
* @LastEditors: Light
|
||||
* @LastEditTime: 2022-11-21 10:45:07
|
||||
* @LastEditTime: 2022-11-24 10:53:41
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
|
@ -86,10 +86,10 @@
|
|||
}
|
||||
onWholeWaterMark(
|
||||
[realName, moment().format('YYYY-MM-DD')],
|
||||
600,
|
||||
300,
|
||||
30,
|
||||
50
|
||||
800,
|
||||
200,
|
||||
24,
|
||||
40
|
||||
)
|
||||
getCategoryTreePage({
|
||||
page: 1,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: Light
|
||||
* @Date: 2022-11-14 15:01:54
|
||||
* @LastEditors: Light
|
||||
* @LastEditTime: 2022-11-16 09:57:28
|
||||
* @LastEditTime: 2022-11-24 10:53:20
|
||||
* @Description: 水印
|
||||
*/
|
||||
const watermark = {
|
||||
|
@ -20,12 +20,12 @@ const setWatermark = (str, width, height, size, top, index) => {
|
|||
can.height = height
|
||||
|
||||
const cans = can.getContext('2d')
|
||||
cans.rotate((-20 * Math.PI) / 180)
|
||||
cans.rotate((-13 * Math.PI) / 180)
|
||||
cans.font = size + 'px Microsoft YaHei'
|
||||
cans.fillStyle = 'rgba(200, 200, 200, 0.4)'
|
||||
cans.textAlign = 'left'
|
||||
cans.textAlign = 'center'
|
||||
cans.textBaseline = 'middle'
|
||||
cans.fillText(str, can.width / 3, can.height / 2)
|
||||
cans.fillText(str, can.width / 2 - 30, can.height - 10)
|
||||
|
||||
const WATER_MARK = document.createElement('div')
|
||||
const ALL_WIDTH = document.documentElement.clientWidth + 'px'
|
||||
|
@ -35,7 +35,7 @@ const setWatermark = (str, width, height, size, top, index) => {
|
|||
WATER_MARK.style.cssText = `
|
||||
position: fixed;
|
||||
top: ${index * top}px;
|
||||
left: 0;
|
||||
left: ${(index * top) / 4}px;
|
||||
zIndex: 99999999;
|
||||
pointer-events: none;
|
||||
width: ${ALL_WIDTH};
|
||||
|
|
Loading…
Reference in New Issue