mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-10-15 03:32:11 +08:00
refactor: 代码规范
This commit is contained in:
parent
991217ba8b
commit
3867675cf1
@ -54,6 +54,7 @@ destroyWatermark(); // 销毁水印
|
||||
默认参数是:
|
||||
```js
|
||||
{
|
||||
content = '请勿外传',
|
||||
container = document.body,
|
||||
width = 300,
|
||||
height = 300,
|
||||
@ -62,7 +63,6 @@ destroyWatermark(); // 销毁水印
|
||||
fontSize = '14px',
|
||||
fontFamily = 'Microsoft Yahei',
|
||||
fillStyle = 'rgba(184, 184, 184, 0.3)',
|
||||
content = '请勿外传',
|
||||
rotate = 25,
|
||||
zIndex = 99999,
|
||||
timestamp = 'YYYY-MM-DD HH:mm'
|
||||
|
@ -35,6 +35,7 @@ let _wmTimer = null; // timestamp
|
||||
|
||||
function _createWatermark(param) {
|
||||
const {
|
||||
content,
|
||||
container,
|
||||
width,
|
||||
height,
|
||||
@ -43,7 +44,6 @@ function _createWatermark(param) {
|
||||
fontSize,
|
||||
fontFamily,
|
||||
fillStyle,
|
||||
content,
|
||||
rotate,
|
||||
zIndex,
|
||||
timestamp
|
||||
@ -140,6 +140,7 @@ export function destroyWatermark() {
|
||||
|
||||
// canvas 实现 watermark
|
||||
export function createWatermark({
|
||||
content = '请勿外传',
|
||||
container = document.body,
|
||||
width = 300,
|
||||
height = 300,
|
||||
@ -148,7 +149,6 @@ export function createWatermark({
|
||||
fontSize = '14px',
|
||||
fontFamily = 'Microsoft Yahei',
|
||||
fillStyle = 'rgba(184, 184, 184, 0.3)',
|
||||
content = '请勿外传',
|
||||
rotate = 25,
|
||||
zIndex = 99999,
|
||||
timestamp = 'YYYY-MM-DD HH:mm'
|
||||
@ -162,6 +162,7 @@ export function createWatermark({
|
||||
destroyWatermark();
|
||||
|
||||
_createWatermark({
|
||||
content,
|
||||
container,
|
||||
width,
|
||||
height,
|
||||
@ -170,7 +171,6 @@ export function createWatermark({
|
||||
fontSize,
|
||||
fontFamily,
|
||||
fillStyle,
|
||||
content,
|
||||
rotate,
|
||||
zIndex,
|
||||
timestamp
|
||||
|
Loading…
x
Reference in New Issue
Block a user