<template>
<router-view
v-waterMark="waterCode"
></router-view>
</template>
<script>
import waterMark from 'common/utils/watermark';
export default {
directives: {
waterMark: waterMark,
},
computed: {
waterCode() {
return {
text: `平台机密数据`,
style: {
'width': 700,
'height': 300,
'font': 'normal 22px Microsoft Yahei',
'fillStyle': 'rgba(112, 113, 114, 0.1)',
'rotate': (30 * Math.PI / 180),
},
};
},
},
};
</script>
let watermark = {
text: 'text',
style: {
},
isAllowDele: false,
maskDiv: '',
init: (text) => {
let canvas = document.createElement('canvas');
canvas.id = 'canvas';
canvas.width = watermark