@varlet/ui 2.13.6 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.bundle.mjs +9 -3
- package/es/index.mjs +8 -3
- package/es/style.css +1 -1
- package/es/style.mjs +1 -0
- package/es/themes/dark/index.mjs +2 -1
- package/es/themes/dark/watermark.mjs +3 -0
- package/es/utils/jest.mjs +16 -0
- package/es/varlet.esm.js +4717 -4480
- package/es/watermark/Watermark.mjs +163 -0
- package/es/watermark/WatermarkSfc.css +0 -0
- package/es/watermark/index.mjs +5 -0
- package/es/watermark/props.mjs +57 -0
- package/es/watermark/style/index.mjs +2 -0
- package/es/watermark/watermark.css +1 -0
- package/highlight/web-types.en-US.json +144 -2
- package/highlight/web-types.zh-CN.json +130 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +1517 -1225
- package/package.json +6 -6
- package/types/index.d.ts +2 -0
- package/types/watermark.d.ts +40 -0
- package/umd/varlet.js +5 -5
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
import { defineComponent, ref, watch, nextTick, onUnmounted, onMounted } from 'vue';
|
|
5
|
+
import { createNamespace } from '../utils/components.mjs';
|
|
6
|
+
import { props } from './props.mjs';
|
|
7
|
+
import { getStyle } from '../utils/elements.mjs';
|
|
8
|
+
var {
|
|
9
|
+
n,
|
|
10
|
+
classes
|
|
11
|
+
} = createNamespace('watermark');
|
|
12
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, withDirectives as _withDirectives, normalizeClass as _normalizeClass, Teleport as _Teleport, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
13
|
+
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
14
|
+
var _hoisted_1 = {
|
|
15
|
+
ref: "svgRef"
|
|
16
|
+
};
|
|
17
|
+
var _hoisted_2 = ["viewBox", "width", "height"];
|
|
18
|
+
var _hoisted_3 = ["width", "height"];
|
|
19
|
+
var _hoisted_4 = ["href", "xlink:href", "x", "y", "width", "height"];
|
|
20
|
+
function __render__(_ctx, _cache) {
|
|
21
|
+
return _openBlock(), _createElementBlock("div", {
|
|
22
|
+
class: _normalizeClass(_ctx.n())
|
|
23
|
+
}, [_renderSlot(_ctx.$slots, "default"), (_openBlock(), _createBlock(_Teleport, {
|
|
24
|
+
to: "body",
|
|
25
|
+
disabled: !_ctx.fullscreen
|
|
26
|
+
}, [_createElementVNode("div", {
|
|
27
|
+
ref: "containerRef",
|
|
28
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('container'), [_ctx.fullscreen, _ctx.n('--fullscreen')])),
|
|
29
|
+
style: _normalizeStyle({
|
|
30
|
+
backgroundImage: "url(" + _ctx.watermarkUrl + ")",
|
|
31
|
+
zIndex: _ctx.zIndex
|
|
32
|
+
})
|
|
33
|
+
}, [_withDirectives(_createElementVNode("div", _hoisted_1, [(_openBlock(), _createElementBlock("svg", {
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
36
|
+
viewBox: "0 0 " + (_ctx.width + _ctx.gapX) + " " + (_ctx.height + _ctx.gapY),
|
|
37
|
+
width: "" + (_ctx.width + _ctx.gapX),
|
|
38
|
+
height: "" + (_ctx.height + _ctx.gapY),
|
|
39
|
+
style: _normalizeStyle({
|
|
40
|
+
padding: "0 " + _ctx.gapX + "px " + _ctx.gapY + "px 0",
|
|
41
|
+
opacity: _ctx.opacity
|
|
42
|
+
})
|
|
43
|
+
}, [_ctx.showContent() ? (_openBlock(), _createElementBlock("foreignObject", {
|
|
44
|
+
key: 0,
|
|
45
|
+
x: "0",
|
|
46
|
+
y: "0",
|
|
47
|
+
width: _ctx.width,
|
|
48
|
+
height: _ctx.height
|
|
49
|
+
}, [_createElementVNode("div", {
|
|
50
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
51
|
+
style: _normalizeStyle({
|
|
52
|
+
transform: "translate(" + _ctx.offsetX + "px, " + _ctx.offsetY + "px) rotate(" + _ctx.rotate + "deg)",
|
|
53
|
+
transformOrigin: 'center'
|
|
54
|
+
})
|
|
55
|
+
}, [_renderSlot(_ctx.$slots, "content", {}, () => [_createElementVNode("span", {
|
|
56
|
+
style: _normalizeStyle(_extends({}, _ctx.font, {
|
|
57
|
+
fontSize: _ctx.font.fontSize + "px",
|
|
58
|
+
color: _ctx.textColor
|
|
59
|
+
}))
|
|
60
|
+
}, _toDisplayString(_ctx.content), 5 /* TEXT, STYLE */)])], 4 /* STYLE */)], 8 /* PROPS */, _hoisted_3)) : _createCommentVNode("v-if", true), !_ctx.$slots.content && _ctx.image ? (_openBlock(), _createElementBlock("image", {
|
|
61
|
+
key: 1,
|
|
62
|
+
href: _ctx.imageUrl,
|
|
63
|
+
"xlink:href": _ctx.imageUrl,
|
|
64
|
+
x: _ctx.offsetX,
|
|
65
|
+
y: _ctx.offsetY,
|
|
66
|
+
width: _ctx.width,
|
|
67
|
+
height: _ctx.height,
|
|
68
|
+
style: _normalizeStyle({
|
|
69
|
+
transform: "rotate(" + _ctx.rotate + "deg)",
|
|
70
|
+
transformOrigin: 'center'
|
|
71
|
+
})
|
|
72
|
+
}, null, 12 /* STYLE, PROPS */, _hoisted_4)) : _createCommentVNode("v-if", true)], 12 /* STYLE, PROPS */, _hoisted_2))], 512 /* NEED_PATCH */), [[_vShow, false]])], 6 /* CLASS, STYLE */)], 8 /* PROPS */, ["disabled"]))], 2 /* CLASS */);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
var __sfc__ = defineComponent({
|
|
76
|
+
name: 'VarWatermark',
|
|
77
|
+
props,
|
|
78
|
+
setup(props, _ref) {
|
|
79
|
+
var {
|
|
80
|
+
slots
|
|
81
|
+
} = _ref;
|
|
82
|
+
var watermarkUrl = ref('');
|
|
83
|
+
var imageUrl = ref('');
|
|
84
|
+
var textColor = ref('');
|
|
85
|
+
var svgRef = ref(null);
|
|
86
|
+
var containerRef = ref(null);
|
|
87
|
+
var showContent = () => {
|
|
88
|
+
if (slots.content) {
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
if (props.content && !props.image) {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
};
|
|
96
|
+
var imageToBase64 = /*#__PURE__*/function () {
|
|
97
|
+
var _ref2 = _asyncToGenerator(function* () {
|
|
98
|
+
return new Promise(resolve => {
|
|
99
|
+
var canvas = document.createElement('canvas');
|
|
100
|
+
var ctx = canvas.getContext('2d');
|
|
101
|
+
var img = new Image();
|
|
102
|
+
img.crossOrigin = 'anonymous';
|
|
103
|
+
img.referrerPolicy = 'no-referrer';
|
|
104
|
+
img.src = props.image;
|
|
105
|
+
img.onload = () => {
|
|
106
|
+
canvas.width = img.width;
|
|
107
|
+
canvas.height = img.height;
|
|
108
|
+
ctx.drawImage(img, 0, 0);
|
|
109
|
+
resolve(canvas.toDataURL());
|
|
110
|
+
};
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
return function imageToBase64() {
|
|
114
|
+
return _ref2.apply(this, arguments);
|
|
115
|
+
};
|
|
116
|
+
}();
|
|
117
|
+
var svgToBlobUrl = svgStr => {
|
|
118
|
+
var svgBlob = new Blob([svgStr], {
|
|
119
|
+
type: 'image/svg+xml'
|
|
120
|
+
});
|
|
121
|
+
return URL.createObjectURL(svgBlob);
|
|
122
|
+
};
|
|
123
|
+
var revokeWatermarkUrl = () => {
|
|
124
|
+
if (watermarkUrl.value) {
|
|
125
|
+
URL.revokeObjectURL(watermarkUrl.value);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// expose
|
|
130
|
+
var resize = /*#__PURE__*/function () {
|
|
131
|
+
var _ref3 = _asyncToGenerator(function* () {
|
|
132
|
+
textColor.value = getStyle(containerRef.value).color;
|
|
133
|
+
if (props.image) {
|
|
134
|
+
imageUrl.value = yield imageToBase64();
|
|
135
|
+
}
|
|
136
|
+
yield nextTick();
|
|
137
|
+
revokeWatermarkUrl();
|
|
138
|
+
watermarkUrl.value = svgToBlobUrl(svgRef.value.innerHTML);
|
|
139
|
+
});
|
|
140
|
+
return function resize() {
|
|
141
|
+
return _ref3.apply(this, arguments);
|
|
142
|
+
};
|
|
143
|
+
}();
|
|
144
|
+
watch(() => [props.image, props.font, props.content, props.height, props.width, props.rotate, props.gapX, props.gapY, props.offsetX, props.offsetY, props.opacity], resize, {
|
|
145
|
+
deep: true
|
|
146
|
+
});
|
|
147
|
+
onMounted(resize);
|
|
148
|
+
onUnmounted(revokeWatermarkUrl);
|
|
149
|
+
return {
|
|
150
|
+
n,
|
|
151
|
+
classes,
|
|
152
|
+
svgRef,
|
|
153
|
+
containerRef,
|
|
154
|
+
watermarkUrl,
|
|
155
|
+
imageUrl,
|
|
156
|
+
textColor,
|
|
157
|
+
showContent,
|
|
158
|
+
resize
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
__sfc__.render = __render__;
|
|
163
|
+
export default __sfc__;
|
|
File without changes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export var props = {
|
|
2
|
+
width: {
|
|
3
|
+
type: Number,
|
|
4
|
+
default: 100
|
|
5
|
+
},
|
|
6
|
+
height: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 100
|
|
9
|
+
},
|
|
10
|
+
content: {
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
image: {
|
|
14
|
+
type: String
|
|
15
|
+
},
|
|
16
|
+
rotate: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: -22
|
|
19
|
+
},
|
|
20
|
+
offsetX: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
offsetY: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0
|
|
27
|
+
},
|
|
28
|
+
gapX: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0
|
|
31
|
+
},
|
|
32
|
+
gapY: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 0
|
|
35
|
+
},
|
|
36
|
+
zIndex: {
|
|
37
|
+
type: [Number, String],
|
|
38
|
+
default: 10
|
|
39
|
+
},
|
|
40
|
+
opacity: {
|
|
41
|
+
type: [Number, String],
|
|
42
|
+
default: 0.5
|
|
43
|
+
},
|
|
44
|
+
fullscreen: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
font: {
|
|
49
|
+
type: Object,
|
|
50
|
+
default: () => ({
|
|
51
|
+
fontStyle: 'normal',
|
|
52
|
+
fontVariant: 'normal',
|
|
53
|
+
fontWeight: 'normal',
|
|
54
|
+
fontSize: 14
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --watermark-content-color: #808080;}.var-watermark { position: relative;}.var-watermark__container { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; background-repeat: repeat; color: var(--watermark-content-color);}.var-watermark--fullscreen { position: fixed;}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.14.0",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -3150,7 +3150,20 @@
|
|
|
3150
3150
|
"description": "The callback function when long pressing an image, the callback parameter is the current index"
|
|
3151
3151
|
}
|
|
3152
3152
|
],
|
|
3153
|
-
"slots": [
|
|
3153
|
+
"slots": [
|
|
3154
|
+
{
|
|
3155
|
+
"name": "indicator",
|
|
3156
|
+
"description": "Paging indicator"
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
"name": "close-icon",
|
|
3160
|
+
"description": "Close button"
|
|
3161
|
+
},
|
|
3162
|
+
{
|
|
3163
|
+
"name": "extra",
|
|
3164
|
+
"description": "Extra slots"
|
|
3165
|
+
}
|
|
3166
|
+
]
|
|
3154
3167
|
},
|
|
3155
3168
|
{
|
|
3156
3169
|
"name": "var-index-anchor",
|
|
@@ -6886,6 +6899,135 @@
|
|
|
6886
6899
|
"description": "Extra message"
|
|
6887
6900
|
}
|
|
6888
6901
|
]
|
|
6902
|
+
},
|
|
6903
|
+
{
|
|
6904
|
+
"name": "var-watermark",
|
|
6905
|
+
"attributes": [
|
|
6906
|
+
{
|
|
6907
|
+
"name": "width",
|
|
6908
|
+
"description": "Watermark width",
|
|
6909
|
+
"default": "100",
|
|
6910
|
+
"value": {
|
|
6911
|
+
"type": "number",
|
|
6912
|
+
"kind": "expression"
|
|
6913
|
+
}
|
|
6914
|
+
},
|
|
6915
|
+
{
|
|
6916
|
+
"name": "height",
|
|
6917
|
+
"description": "Watermark height",
|
|
6918
|
+
"default": "100",
|
|
6919
|
+
"value": {
|
|
6920
|
+
"type": "number",
|
|
6921
|
+
"kind": "expression"
|
|
6922
|
+
}
|
|
6923
|
+
},
|
|
6924
|
+
{
|
|
6925
|
+
"name": "content",
|
|
6926
|
+
"description": "Watermark text content",
|
|
6927
|
+
"default": "-",
|
|
6928
|
+
"value": {
|
|
6929
|
+
"type": "string",
|
|
6930
|
+
"kind": "expression"
|
|
6931
|
+
}
|
|
6932
|
+
},
|
|
6933
|
+
{
|
|
6934
|
+
"name": "image",
|
|
6935
|
+
"description": "The path of the image watermark has a higher priority than `content`",
|
|
6936
|
+
"default": "-",
|
|
6937
|
+
"value": {
|
|
6938
|
+
"type": "string",
|
|
6939
|
+
"kind": "expression"
|
|
6940
|
+
}
|
|
6941
|
+
},
|
|
6942
|
+
{
|
|
6943
|
+
"name": "rotate",
|
|
6944
|
+
"description": "Watermark rotation angle",
|
|
6945
|
+
"default": "-22",
|
|
6946
|
+
"value": {
|
|
6947
|
+
"type": "number",
|
|
6948
|
+
"kind": "expression"
|
|
6949
|
+
}
|
|
6950
|
+
},
|
|
6951
|
+
{
|
|
6952
|
+
"name": "offset-x",
|
|
6953
|
+
"description": "Offset of the watermark from the container's x-axis",
|
|
6954
|
+
"default": "0",
|
|
6955
|
+
"value": {
|
|
6956
|
+
"type": "number",
|
|
6957
|
+
"kind": "expression"
|
|
6958
|
+
}
|
|
6959
|
+
},
|
|
6960
|
+
{
|
|
6961
|
+
"name": "offset-y",
|
|
6962
|
+
"description": "Offset of the watermark from the container's y-axis",
|
|
6963
|
+
"default": "0",
|
|
6964
|
+
"value": {
|
|
6965
|
+
"type": "number",
|
|
6966
|
+
"kind": "expression"
|
|
6967
|
+
}
|
|
6968
|
+
},
|
|
6969
|
+
{
|
|
6970
|
+
"name": "gap-x",
|
|
6971
|
+
"description": "Spacing in the horizontal direction of the watermark",
|
|
6972
|
+
"default": "0",
|
|
6973
|
+
"value": {
|
|
6974
|
+
"type": "number",
|
|
6975
|
+
"kind": "expression"
|
|
6976
|
+
}
|
|
6977
|
+
},
|
|
6978
|
+
{
|
|
6979
|
+
"name": "gap-y",
|
|
6980
|
+
"description": "Spacing in the vertical direction of the watermark",
|
|
6981
|
+
"default": "0",
|
|
6982
|
+
"value": {
|
|
6983
|
+
"type": "number",
|
|
6984
|
+
"kind": "expression"
|
|
6985
|
+
}
|
|
6986
|
+
},
|
|
6987
|
+
{
|
|
6988
|
+
"name": "z-index",
|
|
6989
|
+
"description": "Watermark z-index",
|
|
6990
|
+
"default": "10",
|
|
6991
|
+
"value": {
|
|
6992
|
+
"type": "number | string",
|
|
6993
|
+
"kind": "expression"
|
|
6994
|
+
}
|
|
6995
|
+
},
|
|
6996
|
+
{
|
|
6997
|
+
"name": "opacity",
|
|
6998
|
+
"description": "Watermark opacity",
|
|
6999
|
+
"default": "0.5",
|
|
7000
|
+
"value": {
|
|
7001
|
+
"type": "number | string",
|
|
7002
|
+
"kind": "expression"
|
|
7003
|
+
}
|
|
7004
|
+
},
|
|
7005
|
+
{
|
|
7006
|
+
"name": "fullscreen",
|
|
7007
|
+
"description": "Whether to display watermark in fullscreen mode",
|
|
7008
|
+
"default": "false",
|
|
7009
|
+
"value": {
|
|
7010
|
+
"type": "boolean",
|
|
7011
|
+
"kind": "expression"
|
|
7012
|
+
}
|
|
7013
|
+
},
|
|
7014
|
+
{
|
|
7015
|
+
"name": "font",
|
|
7016
|
+
"description": "Watermark text style",
|
|
7017
|
+
"default": "-",
|
|
7018
|
+
"value": {
|
|
7019
|
+
"type": "WatermarkFont",
|
|
7020
|
+
"kind": "expression"
|
|
7021
|
+
}
|
|
7022
|
+
}
|
|
7023
|
+
],
|
|
7024
|
+
"events": [],
|
|
7025
|
+
"slots": [
|
|
7026
|
+
{
|
|
7027
|
+
"name": "content",
|
|
7028
|
+
"description": "The content of HTML `Watermark`. only supports inline styles, does not support passing in self closing tags, priority higher than `content` or `image` attributes"
|
|
7029
|
+
}
|
|
7030
|
+
]
|
|
6889
7031
|
}
|
|
6890
7032
|
],
|
|
6891
7033
|
"types-syntax": "typescript"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.14.0",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -7235,6 +7235,135 @@
|
|
|
7235
7235
|
"description": "附加信息"
|
|
7236
7236
|
}
|
|
7237
7237
|
]
|
|
7238
|
+
},
|
|
7239
|
+
{
|
|
7240
|
+
"name": "var-watermark",
|
|
7241
|
+
"attributes": [
|
|
7242
|
+
{
|
|
7243
|
+
"name": "width",
|
|
7244
|
+
"description": "水印的宽度",
|
|
7245
|
+
"default": "100",
|
|
7246
|
+
"value": {
|
|
7247
|
+
"type": "number",
|
|
7248
|
+
"kind": "expression"
|
|
7249
|
+
}
|
|
7250
|
+
},
|
|
7251
|
+
{
|
|
7252
|
+
"name": "height",
|
|
7253
|
+
"description": "水印的高度",
|
|
7254
|
+
"default": "100",
|
|
7255
|
+
"value": {
|
|
7256
|
+
"type": "number",
|
|
7257
|
+
"kind": "expression"
|
|
7258
|
+
}
|
|
7259
|
+
},
|
|
7260
|
+
{
|
|
7261
|
+
"name": "content",
|
|
7262
|
+
"description": "文字水印的内容",
|
|
7263
|
+
"default": "-",
|
|
7264
|
+
"value": {
|
|
7265
|
+
"type": "string",
|
|
7266
|
+
"kind": "expression"
|
|
7267
|
+
}
|
|
7268
|
+
},
|
|
7269
|
+
{
|
|
7270
|
+
"name": "image",
|
|
7271
|
+
"description": "图片水印的路径,优先级比 `content` 高",
|
|
7272
|
+
"default": "-",
|
|
7273
|
+
"value": {
|
|
7274
|
+
"type": "string",
|
|
7275
|
+
"kind": "expression"
|
|
7276
|
+
}
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
"name": "rotate",
|
|
7280
|
+
"description": "水印的旋转角度",
|
|
7281
|
+
"default": "-22",
|
|
7282
|
+
"value": {
|
|
7283
|
+
"type": "number",
|
|
7284
|
+
"kind": "expression"
|
|
7285
|
+
}
|
|
7286
|
+
},
|
|
7287
|
+
{
|
|
7288
|
+
"name": "offset-x",
|
|
7289
|
+
"description": "水印距离容器x轴的偏移量",
|
|
7290
|
+
"default": "0",
|
|
7291
|
+
"value": {
|
|
7292
|
+
"type": "number",
|
|
7293
|
+
"kind": "expression"
|
|
7294
|
+
}
|
|
7295
|
+
},
|
|
7296
|
+
{
|
|
7297
|
+
"name": "offset-y",
|
|
7298
|
+
"description": "水印距离容器y轴的偏移量",
|
|
7299
|
+
"default": "0",
|
|
7300
|
+
"value": {
|
|
7301
|
+
"type": "number",
|
|
7302
|
+
"kind": "expression"
|
|
7303
|
+
}
|
|
7304
|
+
},
|
|
7305
|
+
{
|
|
7306
|
+
"name": "gap-x",
|
|
7307
|
+
"description": "水印水平方向的间距",
|
|
7308
|
+
"default": "0",
|
|
7309
|
+
"value": {
|
|
7310
|
+
"type": "number",
|
|
7311
|
+
"kind": "expression"
|
|
7312
|
+
}
|
|
7313
|
+
},
|
|
7314
|
+
{
|
|
7315
|
+
"name": "gap-y",
|
|
7316
|
+
"description": "水印垂直方向的间距",
|
|
7317
|
+
"default": "0",
|
|
7318
|
+
"value": {
|
|
7319
|
+
"type": "number",
|
|
7320
|
+
"kind": "expression"
|
|
7321
|
+
}
|
|
7322
|
+
},
|
|
7323
|
+
{
|
|
7324
|
+
"name": "z-index",
|
|
7325
|
+
"description": "水印的z-index",
|
|
7326
|
+
"default": "10",
|
|
7327
|
+
"value": {
|
|
7328
|
+
"type": "number | string",
|
|
7329
|
+
"kind": "expression"
|
|
7330
|
+
}
|
|
7331
|
+
},
|
|
7332
|
+
{
|
|
7333
|
+
"name": "opacity",
|
|
7334
|
+
"description": "水印的透明度",
|
|
7335
|
+
"default": "0.5",
|
|
7336
|
+
"value": {
|
|
7337
|
+
"type": "number | string",
|
|
7338
|
+
"kind": "expression"
|
|
7339
|
+
}
|
|
7340
|
+
},
|
|
7341
|
+
{
|
|
7342
|
+
"name": "fullscreen",
|
|
7343
|
+
"description": "水印是否全屏显示",
|
|
7344
|
+
"default": "false",
|
|
7345
|
+
"value": {
|
|
7346
|
+
"type": "boolean",
|
|
7347
|
+
"kind": "expression"
|
|
7348
|
+
}
|
|
7349
|
+
},
|
|
7350
|
+
{
|
|
7351
|
+
"name": "font",
|
|
7352
|
+
"description": "文字水印的字体样式",
|
|
7353
|
+
"default": "WatermarkFont",
|
|
7354
|
+
"value": {
|
|
7355
|
+
"type": "WatermarkFont",
|
|
7356
|
+
"kind": "expression"
|
|
7357
|
+
}
|
|
7358
|
+
}
|
|
7359
|
+
],
|
|
7360
|
+
"events": [],
|
|
7361
|
+
"slots": [
|
|
7362
|
+
{
|
|
7363
|
+
"name": "content",
|
|
7364
|
+
"description": "`Watermark` 内容,仅支持行内样式,不支持传入自闭合标签,优先级高于 `content` 或 `image` 属性"
|
|
7365
|
+
}
|
|
7366
|
+
]
|
|
7238
7367
|
}
|
|
7239
7368
|
],
|
|
7240
7369
|
"types-syntax": "typescript"
|