Parcourir la source

水印样式调整

cfort il y a 1 an
Parent
commit
57078d677c

+ 6 - 6
src/layout/header-aside/components/header-message/watermark/watermark-cont.js

@@ -8,23 +8,23 @@ const setWatermark = (str = null, str1 = null) => { // 传入多个str 或者传
     }
 
     const can = document.createElement('canvas')
-    can.width = 430
+    can.width = 420
     can.height = 300
 
     const cans = can.getContext('2d')
     cans.rotate(-20 * Math.PI / 180)
-    cans.font = '20px Vedana'
+    cans.font = '22px Vedana'
     cans.fillStyle = '#E7ECF0'
     cans.textAlign = 'left'
     cans.textBaseline = 'Middle'
-    cans.fillText(str, can.width / 3, can.height / 2)
-    cans.fillText(str1, can.width / 3, can.height / 1.7) // 这里渲染多行就可以展示多行,具体效果看上图,这里要调整高度的比例就可以做到换行的效果
+    cans.fillText(str, can.width / 20, can.height / 1.5)
+    cans.fillText(str1, can.width / 20, can.height / 1.3) // 这里渲染多行就可以展示多行,具体效果看上图,这里要调整高度的比例就可以做到换行的效果
 
     const div = document.createElement('div')
     div.id = id
     div.style.pointerEvents = 'none'
-    div.style.top = '150px'
-    div.style.left = '50px'
+    div.style.top = '80px'
+    div.style.left = '150px'
     div.style.position = 'fixed'
     div.style.zIndex = '-100000' // 这里设置层级 设为负值可以在页面下层
     div.style.width = document.documentElement.clientWidth - 100 + 'px'

+ 0 - 2
src/views/system/homepage/index.vue

@@ -649,7 +649,6 @@ export default {
          */
         // 关闭指定弹框
         handleClose (state) {
-            debugger
             switch (state) {
                 case 'calendar':
                     this.calendarDialogVisible = false
@@ -663,7 +662,6 @@ export default {
         },
         // 打开指定弹框
         handleOpen (state, dateArr, events, clickId) {
-            debugger
             const status = ['急', '重', '轻', '缓']
             const eventTrees = []
             switch (state) {