update 水印颜色、字体提出配置项
This commit is contained in:
@@ -16,7 +16,7 @@ Vue.directive('watermark', {
|
||||
can.style.display = 'none'
|
||||
const cans = can.getContext('2d')
|
||||
cans.rotate(-20 * Math.PI / 180)
|
||||
cans.font = font || '13px Microsoft Yahei'
|
||||
cans.font = font || window._CONFIG.watermarkConfig.font
|
||||
cans.fillStyle = textColor || '#DDDDDD'
|
||||
cans.textAlign = 'left'
|
||||
cans.textBaseline = 'Middle'
|
||||
@@ -38,6 +38,7 @@ Vue.directive('watermark', {
|
||||
parentNode.appendChild(div)
|
||||
}
|
||||
}
|
||||
|
||||
if (binding.value.text) {
|
||||
addWaterMarker(binding.value.text, el, binding.value.width, binding.value.height, binding.value.font, binding.value.textColor, binding.value.fillTextX)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user