ele-admin-plus 1.4.1-beta.1 → 1.4.1
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/core-components.d.ts +2 -0
- package/es/core-components.js +104 -100
- package/es/ele-app/plus.d.ts +9 -1
- package/es/ele-app/plusx.d.ts +26 -13
- package/es/ele-backtop/index.js +7 -1
- package/es/ele-basic-select/components/select-view.d.ts +53 -22
- package/es/ele-basic-select/components/select-view.js +57 -20
- package/es/ele-basic-select/index.d.ts +39 -19
- package/es/ele-basic-select/index.js +62 -13
- package/es/ele-basic-select/props.d.ts +33 -21
- package/es/ele-basic-select/props.js +33 -21
- package/es/ele-basic-select/style/index.js +2 -0
- package/es/ele-basic-select/types.d.ts +1 -1
- package/es/ele-config-provider/components/receiver-view.d.ts +2 -0
- package/es/ele-config-provider/components/receiver-view.js +74 -72
- package/es/ele-config-provider/receiver.d.ts +2 -2
- package/es/ele-config-provider/receiver.js +5 -1
- package/es/ele-config-provider/types.d.ts +10 -1
- package/es/ele-copyable/index.d.ts +2 -4
- package/es/ele-cron-builder/index.d.ts +24 -0
- package/es/ele-cron-builder/index.js +81 -0
- package/es/ele-cron-builder/props.d.ts +31 -0
- package/es/ele-cron-builder/props.js +24 -0
- package/es/ele-cron-builder/style/index.d.ts +1 -0
- package/es/ele-cron-builder/style/index.js +4 -0
- package/es/ele-cron-builder/style/index.scss +6 -0
- package/es/ele-cron-builder/types.d.ts +8 -0
- package/es/ele-cron-panel/components/cron-day.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-day.js +232 -0
- package/es/ele-cron-panel/components/cron-hour.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-hour.js +174 -0
- package/es/ele-cron-panel/components/cron-minute.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-minute.js +174 -0
- package/es/ele-cron-panel/components/cron-month.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-month.js +174 -0
- package/es/ele-cron-panel/components/cron-second.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-second.js +174 -0
- package/es/ele-cron-panel/components/cron-week.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-week.js +229 -0
- package/es/ele-cron-panel/components/cron-year.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-year.js +186 -0
- package/es/ele-cron-panel/index.d.ts +14 -0
- package/es/ele-cron-panel/index.js +348 -0
- package/es/ele-cron-panel/props.d.ts +20 -0
- package/es/ele-cron-panel/props.js +14 -0
- package/es/ele-cron-panel/style/index.d.ts +1 -0
- package/es/ele-cron-panel/style/index.js +7 -0
- package/es/ele-cron-panel/style/index.scss +282 -0
- package/es/ele-cron-panel/types.d.ts +118 -0
- package/es/ele-cron-panel/util.d.ts +23 -0
- package/es/ele-cron-panel/util.js +542 -0
- package/es/ele-cropper/components/cropper-tools.d.ts +2 -2
- package/es/ele-cropper-modal/index.d.ts +2 -4
- package/es/ele-crud/index.d.ts +3 -3
- package/es/ele-drawer/index.d.ts +9 -0
- package/es/ele-drawer/index.js +5 -1
- package/es/ele-drawer/props.d.ts +5 -0
- package/es/ele-drawer/props.js +6 -1
- package/es/ele-drawer/style/index.scss +11 -0
- package/es/ele-file-list/index.d.ts +3 -3
- package/es/ele-icon-select/components/icon-grid.d.ts +8 -3
- package/es/ele-icon-select/components/icon-grid.js +20 -12
- package/es/ele-icon-select/index.d.ts +58 -59
- package/es/ele-icon-select/index.js +92 -86
- package/es/ele-icon-select/props.d.ts +35 -35
- package/es/ele-icon-select/props.js +34 -34
- package/es/ele-icon-select/style/css-var.scss +1 -1
- package/es/ele-icon-select/style/index.scss +50 -18
- package/es/ele-icon-select/types.d.ts +13 -0
- package/es/ele-map-picker/index.d.ts +3 -3
- package/es/ele-modal/index.d.ts +4 -2
- package/es/ele-modal/index.js +9 -3
- package/es/ele-modal/props.d.ts +2 -0
- package/es/ele-modal/props.js +2 -0
- package/es/ele-modal/style/index.scss +16 -0
- package/es/ele-pro-form/components/item-type-data.js +39 -64
- package/es/ele-pro-form/index.d.ts +3 -3
- package/es/ele-pro-table/components/table-tools.d.ts +12 -97
- package/es/ele-pro-table/components/table-tools.js +118 -248
- package/es/ele-pro-table/components/tool-export.d.ts +5 -1
- package/es/ele-pro-table/components/tool-export.js +32 -20
- package/es/ele-pro-table/components/tool-print.d.ts +5 -1
- package/es/ele-pro-table/components/tool-print.js +37 -25
- package/es/ele-pro-table/exceljs-plugin.d.ts +12 -0
- package/es/ele-pro-table/exceljs-plugin.js +81 -0
- package/es/ele-pro-table/index.d.ts +6 -7
- package/es/ele-pro-table/index.js +117 -46
- package/es/ele-pro-table/types.d.ts +11 -0
- package/es/ele-split-panel/style/index.scss +1 -1
- package/es/ele-table-select/index.d.ts +2 -0
- package/es/ele-table-select/props.d.ts +2 -0
- package/es/ele-table-select/props.js +3 -1
- package/es/ele-tour/index.d.ts +3 -3
- package/es/ele-tree-select/index.d.ts +2 -0
- package/es/ele-upload-list/index.d.ts +3 -3
- package/es/ele-upload-list/index.js +25 -8
- package/es/ele-virtual-table/components/body-cell.d.ts +1 -1
- package/es/ele-watermark/index.d.ts +20 -7
- package/es/ele-watermark/index.js +253 -94
- package/es/ele-watermark/props.d.ts +10 -3
- package/es/ele-watermark/props.js +10 -3
- package/es/ele-watermark/types.d.ts +12 -0
- package/es/ele-watermark/util.d.ts +2 -9
- package/es/ele-watermark/util.js +10 -19
- package/es/lang/en_US.js +116 -0
- package/es/lang/zh_CN.js +116 -0
- package/es/lang/zh_TW.js +116 -0
- package/es/style/plus.scss +3 -1
- package/es/style/themes/default.scss +12 -3
- package/es/style/themes/rounded.scss +2 -1
- package/es/utils/theme-util.d.ts +1 -1
- package/lib/core-components.cjs +104 -100
- package/lib/core-components.d.ts +2 -0
- package/lib/ele-app/plus.d.ts +9 -1
- package/lib/ele-app/plusx.d.ts +26 -13
- package/lib/ele-backtop/index.cjs +6 -0
- package/lib/ele-basic-select/components/select-view.cjs +56 -19
- package/lib/ele-basic-select/components/select-view.d.ts +53 -22
- package/lib/ele-basic-select/index.cjs +61 -12
- package/lib/ele-basic-select/index.d.ts +39 -19
- package/lib/ele-basic-select/props.cjs +33 -21
- package/lib/ele-basic-select/props.d.ts +33 -21
- package/lib/ele-basic-select/style/index.cjs +2 -0
- package/lib/ele-basic-select/types.d.ts +1 -1
- package/lib/ele-config-provider/components/receiver-view.cjs +2 -2
- package/lib/ele-config-provider/components/receiver-view.d.ts +2 -0
- package/lib/ele-config-provider/receiver.cjs +5 -1
- package/lib/ele-config-provider/receiver.d.ts +2 -2
- package/lib/ele-config-provider/types.d.ts +10 -1
- package/lib/ele-copyable/index.d.ts +2 -4
- package/lib/ele-cron-builder/index.cjs +80 -0
- package/lib/ele-cron-builder/index.d.ts +24 -0
- package/lib/ele-cron-builder/props.cjs +24 -0
- package/lib/ele-cron-builder/props.d.ts +31 -0
- package/lib/ele-cron-builder/style/index.cjs +5 -0
- package/lib/ele-cron-builder/style/index.d.ts +1 -0
- package/lib/ele-cron-builder/style/index.scss +6 -0
- package/lib/ele-cron-builder/types.d.ts +8 -0
- package/lib/ele-cron-panel/components/cron-day.cjs +231 -0
- package/lib/ele-cron-panel/components/cron-day.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-hour.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-hour.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-minute.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-minute.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-month.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-month.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-second.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-second.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-week.cjs +228 -0
- package/lib/ele-cron-panel/components/cron-week.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-year.cjs +185 -0
- package/lib/ele-cron-panel/components/cron-year.d.ts +25 -0
- package/lib/ele-cron-panel/index.cjs +347 -0
- package/lib/ele-cron-panel/index.d.ts +14 -0
- package/lib/ele-cron-panel/props.cjs +14 -0
- package/lib/ele-cron-panel/props.d.ts +20 -0
- package/lib/ele-cron-panel/style/index.cjs +8 -0
- package/lib/ele-cron-panel/style/index.d.ts +1 -0
- package/lib/ele-cron-panel/style/index.scss +282 -0
- package/lib/ele-cron-panel/types.d.ts +118 -0
- package/lib/ele-cron-panel/util.cjs +542 -0
- package/lib/ele-cron-panel/util.d.ts +23 -0
- package/lib/ele-cropper/components/cropper-tools.d.ts +2 -2
- package/lib/ele-cropper-modal/index.d.ts +2 -4
- package/lib/ele-crud/index.d.ts +3 -3
- package/lib/ele-drawer/index.cjs +4 -0
- package/lib/ele-drawer/index.d.ts +9 -0
- package/lib/ele-drawer/props.cjs +6 -1
- package/lib/ele-drawer/props.d.ts +5 -0
- package/lib/ele-drawer/style/index.scss +11 -0
- package/lib/ele-file-list/index.d.ts +3 -3
- package/lib/ele-icon-select/components/icon-grid.cjs +19 -11
- package/lib/ele-icon-select/components/icon-grid.d.ts +8 -3
- package/lib/ele-icon-select/index.cjs +91 -85
- package/lib/ele-icon-select/index.d.ts +58 -59
- package/lib/ele-icon-select/props.cjs +34 -34
- package/lib/ele-icon-select/props.d.ts +35 -35
- package/lib/ele-icon-select/style/css-var.scss +1 -1
- package/lib/ele-icon-select/style/index.scss +50 -18
- package/lib/ele-icon-select/types.d.ts +13 -0
- package/lib/ele-map-picker/index.d.ts +3 -3
- package/lib/ele-modal/index.cjs +9 -3
- package/lib/ele-modal/index.d.ts +4 -2
- package/lib/ele-modal/props.cjs +2 -0
- package/lib/ele-modal/props.d.ts +2 -0
- package/lib/ele-modal/style/index.scss +16 -0
- package/lib/ele-pro-form/components/item-type-data.cjs +39 -64
- package/lib/ele-pro-form/index.d.ts +3 -3
- package/lib/ele-pro-table/components/table-tools.cjs +117 -247
- package/lib/ele-pro-table/components/table-tools.d.ts +12 -97
- package/lib/ele-pro-table/components/tool-export.cjs +32 -20
- package/lib/ele-pro-table/components/tool-export.d.ts +5 -1
- package/lib/ele-pro-table/components/tool-print.cjs +37 -25
- package/lib/ele-pro-table/components/tool-print.d.ts +5 -1
- package/lib/ele-pro-table/exceljs-plugin.cjs +81 -0
- package/lib/ele-pro-table/exceljs-plugin.d.ts +12 -0
- package/lib/ele-pro-table/index.cjs +143 -72
- package/lib/ele-pro-table/index.d.ts +6 -7
- package/lib/ele-pro-table/types.d.ts +11 -0
- package/lib/ele-split-panel/style/index.scss +1 -1
- package/lib/ele-table-select/index.d.ts +2 -0
- package/lib/ele-table-select/props.cjs +3 -1
- package/lib/ele-table-select/props.d.ts +2 -0
- package/lib/ele-tour/index.d.ts +3 -3
- package/lib/ele-tree-select/index.d.ts +2 -0
- package/lib/ele-upload-list/index.cjs +25 -8
- package/lib/ele-upload-list/index.d.ts +3 -3
- package/lib/ele-virtual-table/components/body-cell.d.ts +1 -1
- package/lib/ele-watermark/index.cjs +251 -92
- package/lib/ele-watermark/index.d.ts +20 -7
- package/lib/ele-watermark/props.cjs +10 -3
- package/lib/ele-watermark/props.d.ts +10 -3
- package/lib/ele-watermark/types.d.ts +12 -0
- package/lib/ele-watermark/util.cjs +10 -19
- package/lib/ele-watermark/util.d.ts +2 -9
- package/lib/lang/en_US.cjs +116 -0
- package/lib/lang/zh_CN.cjs +116 -0
- package/lib/lang/zh_TW.cjs +116 -0
- package/lib/style/plus.scss +3 -1
- package/lib/style/themes/default.scss +12 -3
- package/lib/style/themes/rounded.scss +2 -1
- package/lib/utils/theme-util.d.ts +1 -1
- package/package.json +1 -1
- package/typings/global.d.ts +2 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StyleValue } from '../ele-app/types';
|
|
2
|
+
import { WatermarkFont } from './types';
|
|
2
3
|
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
default?(_: {}): any;
|
|
@@ -6,11 +7,14 @@ declare function __VLS_template(): {
|
|
|
6
7
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
8
|
width: NumberConstructor;
|
|
8
9
|
height: NumberConstructor;
|
|
9
|
-
rotate:
|
|
10
|
+
rotate: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
10
14
|
zIndex: NumberConstructor;
|
|
11
15
|
image: StringConstructor;
|
|
12
16
|
content: import('vue').PropType<string | string[]>;
|
|
13
|
-
font: import('vue').PropType<
|
|
17
|
+
font: import('vue').PropType<WatermarkFont>;
|
|
14
18
|
gap: import('vue').PropType<import('./types').WatermarkGap>;
|
|
15
19
|
offset: import('vue').PropType<import('./types').WatermarkOffset>;
|
|
16
20
|
lineGap: {
|
|
@@ -18,20 +22,25 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
18
22
|
default: number;
|
|
19
23
|
};
|
|
20
24
|
customStyle: import('vue').PropType<Exclude<StyleValue, string>>;
|
|
25
|
+
svgRender: BooleanConstructor;
|
|
26
|
+
disabled: BooleanConstructor;
|
|
21
27
|
fixed: BooleanConstructor;
|
|
22
28
|
wrapPosition: {
|
|
23
29
|
type: BooleanConstructor;
|
|
24
30
|
default: boolean;
|
|
25
31
|
};
|
|
26
|
-
|
|
32
|
+
wrapHeight: StringConstructor;
|
|
27
33
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
34
|
width: NumberConstructor;
|
|
29
35
|
height: NumberConstructor;
|
|
30
|
-
rotate:
|
|
36
|
+
rotate: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
default: number;
|
|
39
|
+
};
|
|
31
40
|
zIndex: NumberConstructor;
|
|
32
41
|
image: StringConstructor;
|
|
33
42
|
content: import('vue').PropType<string | string[]>;
|
|
34
|
-
font: import('vue').PropType<
|
|
43
|
+
font: import('vue').PropType<WatermarkFont>;
|
|
35
44
|
gap: import('vue').PropType<import('./types').WatermarkGap>;
|
|
36
45
|
offset: import('vue').PropType<import('./types').WatermarkOffset>;
|
|
37
46
|
lineGap: {
|
|
@@ -39,17 +48,21 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
39
48
|
default: number;
|
|
40
49
|
};
|
|
41
50
|
customStyle: import('vue').PropType<Exclude<StyleValue, string>>;
|
|
51
|
+
svgRender: BooleanConstructor;
|
|
52
|
+
disabled: BooleanConstructor;
|
|
42
53
|
fixed: BooleanConstructor;
|
|
43
54
|
wrapPosition: {
|
|
44
55
|
type: BooleanConstructor;
|
|
45
56
|
default: boolean;
|
|
46
57
|
};
|
|
47
|
-
|
|
58
|
+
wrapHeight: StringConstructor;
|
|
48
59
|
}>> & Readonly<{}>, {
|
|
49
60
|
fixed: boolean;
|
|
61
|
+
rotate: number;
|
|
50
62
|
lineGap: number;
|
|
51
|
-
|
|
63
|
+
svgRender: boolean;
|
|
52
64
|
disabled: boolean;
|
|
65
|
+
wrapPosition: boolean;
|
|
53
66
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
54
67
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
55
68
|
export default _default;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import { defineComponent, ref, nextTick,
|
|
2
|
-
import { useMutation,
|
|
1
|
+
import { defineComponent, ref, nextTick, useId, computed, inject, watch, onMounted, createElementBlock, openBlock, normalizeStyle, renderSlot, createCommentVNode, Fragment, createElementVNode, unref, renderList, toDisplayString } from "vue";
|
|
2
|
+
import { useMutation, joinStyle, INFO_LOG_KEY, getPixelRatio, rotateWatermark } from "./util";
|
|
3
3
|
import { watermarkProps } from "./props";
|
|
4
|
+
const _hoisted_1 = ["id", "width", "height"];
|
|
5
|
+
const _hoisted_2 = ["transform"];
|
|
6
|
+
const _hoisted_3 = ["href", "width", "height", "x", "y"];
|
|
7
|
+
const _hoisted_4 = ["transform"];
|
|
8
|
+
const _hoisted_5 = ["href", "width", "height", "x", "y"];
|
|
9
|
+
const _hoisted_6 = ["id", "width", "height"];
|
|
10
|
+
const _hoisted_7 = ["transform"];
|
|
11
|
+
const _hoisted_8 = ["x", "y", "fill", "font-size", "font-weight", "font-family", "font-style"];
|
|
12
|
+
const _hoisted_9 = ["transform"];
|
|
13
|
+
const _hoisted_10 = ["x", "y", "fill", "font-size", "font-weight", "font-family", "font-style"];
|
|
14
|
+
const _hoisted_11 = ["fill", "transform"];
|
|
4
15
|
const SIZE = 2;
|
|
5
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
17
|
...{ name: "EleWatermark" },
|
|
@@ -8,7 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
19
|
props: watermarkProps,
|
|
9
20
|
setup(__props) {
|
|
10
21
|
const props = __props;
|
|
11
|
-
const { observe, disconnect } = useMutation({
|
|
22
|
+
const { observe, observeTextNode, disconnect } = useMutation({
|
|
12
23
|
getRoot: () => rootRef.value,
|
|
13
24
|
getEl: () => imgRef.value,
|
|
14
25
|
onDeleted: () => {
|
|
@@ -22,95 +33,121 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
33
|
render();
|
|
23
34
|
}
|
|
24
35
|
});
|
|
36
|
+
const svgId = useId();
|
|
25
37
|
const rootKey = ref(1);
|
|
26
38
|
const rootRef = ref(null);
|
|
27
39
|
const imgRef = ref(null);
|
|
28
|
-
const imgStyle = ref({ display: "none" });
|
|
29
|
-
const
|
|
40
|
+
const imgStyle = ref(joinStyle({ display: "none" }));
|
|
41
|
+
const markWidth = computed(() => {
|
|
42
|
+
return props.width ?? 120;
|
|
43
|
+
});
|
|
44
|
+
const markHeight = computed(() => {
|
|
45
|
+
return props.height ?? 64;
|
|
46
|
+
});
|
|
47
|
+
const markGapX = computed(() => {
|
|
48
|
+
var _a;
|
|
49
|
+
return ((_a = props.gap) == null ? void 0 : _a[0]) ?? 100;
|
|
50
|
+
});
|
|
51
|
+
const markGapY = computed(() => {
|
|
52
|
+
var _a;
|
|
53
|
+
return ((_a = props.gap) == null ? void 0 : _a[1]) ?? 100;
|
|
54
|
+
});
|
|
55
|
+
const markOffsetX = computed(() => {
|
|
56
|
+
var _a;
|
|
57
|
+
return ((_a = props.offset) == null ? void 0 : _a[0]) ?? markGapX.value / 2;
|
|
58
|
+
});
|
|
59
|
+
const markOffsetY = computed(() => {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = props.offset) == null ? void 0 : _a[1]) ?? markGapY.value / 2;
|
|
62
|
+
});
|
|
63
|
+
const markFont = computed(() => {
|
|
64
|
+
return {
|
|
65
|
+
color: "rgba(122, 122, 122, 0.35)",
|
|
66
|
+
fontSize: 16,
|
|
67
|
+
fontWeight: "normal",
|
|
68
|
+
fontFamily: "sans-serif",
|
|
69
|
+
fontStyle: "normal",
|
|
70
|
+
...props.font || {}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
const markContents = computed(() => {
|
|
74
|
+
if (typeof props.content === "string") {
|
|
75
|
+
return [props.content];
|
|
76
|
+
}
|
|
77
|
+
return props.content || [];
|
|
78
|
+
});
|
|
79
|
+
const markCommonStyle = computed(() => {
|
|
30
80
|
const position = props.fixed ? "fixed" : "absolute";
|
|
31
81
|
const width = props.fixed ? "100vw" : "100%";
|
|
32
82
|
const height = props.fixed ? "100vh" : "100%";
|
|
33
|
-
|
|
83
|
+
return {
|
|
34
84
|
position: `${position} !important`,
|
|
35
85
|
top: "0 !important",
|
|
36
86
|
left: "0 !important",
|
|
37
|
-
right: "
|
|
38
|
-
bottom: "
|
|
87
|
+
right: "0 !important",
|
|
88
|
+
bottom: "0 !important",
|
|
39
89
|
width: `${width} !important`,
|
|
40
90
|
height: `${height} !important`,
|
|
91
|
+
zIndex: `${props.zIndex ?? 2147483647} !important`,
|
|
41
92
|
pointerEvents: "none !important",
|
|
42
|
-
backgroundRepeat: "repeat !important",
|
|
43
|
-
opacity: "1 !important",
|
|
44
|
-
transform: "none !important",
|
|
45
|
-
filter: "none !important",
|
|
46
|
-
visibility: "visible !important",
|
|
47
|
-
transition: "none !important",
|
|
48
|
-
maxWidth: "none !important",
|
|
49
|
-
maxHeight: "none !important",
|
|
50
|
-
zoom: "1 !important",
|
|
51
|
-
mask: "none !important",
|
|
52
|
-
clipPath: "none !important",
|
|
53
|
-
display: "block !important",
|
|
54
93
|
...props.customStyle || {}
|
|
55
94
|
};
|
|
95
|
+
});
|
|
96
|
+
const infoLog = inject(INFO_LOG_KEY, void 0);
|
|
97
|
+
const svgStyle = computed(() => joinStyle(markCommonStyle.value));
|
|
98
|
+
const updateStyle = (base64, imgWidth, imgHeight) => {
|
|
99
|
+
disconnect();
|
|
100
|
+
const style = { ...markCommonStyle.value };
|
|
56
101
|
if (!base64) {
|
|
57
102
|
style.display = "none !important";
|
|
58
103
|
} else {
|
|
59
104
|
style.backgroundImage = `url('${base64}') !important`;
|
|
60
|
-
|
|
61
|
-
|
|
105
|
+
style.backgroundSize = `${imgWidth}px ${imgHeight}px !important`;
|
|
106
|
+
let positionLeft = markOffsetX.value - markGapX.value / 2;
|
|
107
|
+
let positionTop = markOffsetY.value - markGapY.value / 2;
|
|
108
|
+
if (positionLeft > 0) {
|
|
109
|
+
style.left = `${positionLeft}px !important`;
|
|
110
|
+
style.width = `calc(100% - ${positionLeft}px) !important`;
|
|
111
|
+
positionLeft = 0;
|
|
112
|
+
}
|
|
113
|
+
if (positionTop > 0) {
|
|
114
|
+
style.top = `${positionTop}px !important`;
|
|
115
|
+
style.height = `calc(100% - ${positionTop}px) !important`;
|
|
116
|
+
positionTop = 0;
|
|
62
117
|
}
|
|
63
|
-
style.
|
|
118
|
+
style.backgroundPosition = `${positionLeft}px ${positionTop}px !important`;
|
|
64
119
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
imgRef.value.style.cssText = joinStyle(style);
|
|
120
|
+
imgStyle.value = joinStyle(style);
|
|
121
|
+
nextTick(() => {
|
|
68
122
|
observe();
|
|
69
|
-
}
|
|
70
|
-
imgStyle.value = style;
|
|
71
|
-
nextTick(() => {
|
|
72
|
-
observe();
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const infoLog = inject(INFO_LOG_KEY, void 0);
|
|
77
|
-
const getDefaultWidth = (ctx) => {
|
|
78
|
-
if (props.image || !ctx.measureText) {
|
|
79
|
-
return 120;
|
|
80
|
-
}
|
|
81
|
-
const content = props.content;
|
|
82
|
-
const contents = Array.isArray(content) ? content : [content];
|
|
83
|
-
const widths = contents.map((item) => ctx.measureText(item).width);
|
|
84
|
-
return Math.ceil(Math.max(...widths));
|
|
85
|
-
};
|
|
86
|
-
const getDefaultHeight = (ctx) => {
|
|
87
|
-
if (props.image || !ctx.measureText) {
|
|
88
|
-
return 64;
|
|
89
|
-
}
|
|
90
|
-
const lines = Array.isArray(props.content) ? props.content.length : 1;
|
|
91
|
-
const { fontSize } = getFont(props.font);
|
|
92
|
-
return fontSize * lines + (lines - 1) * props.lineGap;
|
|
123
|
+
});
|
|
93
124
|
};
|
|
94
125
|
const getMarkSize = (ctx) => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
126
|
+
if (props.image || props.width != null && props.height != null || !ctx.measureText) {
|
|
127
|
+
return [markWidth.value, markHeight.value];
|
|
128
|
+
}
|
|
129
|
+
const widths = markContents.value.map(
|
|
130
|
+
(text) => ctx.measureText(text).width
|
|
131
|
+
);
|
|
132
|
+
const textWidth = Math.ceil(Math.max(...widths));
|
|
133
|
+
const lines = markContents.value.length;
|
|
134
|
+
const { fontSize } = markFont.value;
|
|
135
|
+
const textHeight = fontSize * lines + (lines - 1) * props.lineGap;
|
|
136
|
+
return [props.width ?? textWidth, props.height ?? textHeight];
|
|
98
137
|
};
|
|
99
138
|
const froined = computed(() => !!(infoLog && !infoLog.froined));
|
|
139
|
+
const isDisabled = computed(() => !(!props.disabled || froined.value));
|
|
100
140
|
const fillTexts = (ctx, drawX, drawY, drawWidth, drawHeight) => {
|
|
101
141
|
const ratio = getPixelRatio();
|
|
102
|
-
const { color, fontSize, fontStyle, fontWeight, fontFamily } =
|
|
103
|
-
props.font
|
|
104
|
-
);
|
|
142
|
+
const { color, fontSize, fontStyle, fontWeight, fontFamily } = markFont.value;
|
|
105
143
|
const mergedFontSize = fontSize * ratio;
|
|
106
|
-
ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${drawHeight}px ${fontFamily}`;
|
|
107
144
|
ctx.fillStyle = color;
|
|
145
|
+
ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${drawHeight}px ${fontFamily}`;
|
|
146
|
+
const froin = "el-n-d-s-p";
|
|
108
147
|
ctx.textAlign = "center";
|
|
109
148
|
ctx.textBaseline = "top";
|
|
110
149
|
ctx.translate(drawWidth / 2, 0);
|
|
111
|
-
const
|
|
112
|
-
const froin = ["el", "nimda", "sulp"].reverse().join(" ").split("");
|
|
113
|
-
const contents = froined.value ? [`e${froin.reduce((n, m) => m + n, "")}`.toUpperCase()] : Array.isArray(content) ? content : content == null ? [] : [content];
|
|
150
|
+
const contents = froined.value ? [`e${observeTextNode(froin)}`.toUpperCase()] : markContents.value;
|
|
114
151
|
contents.forEach((item, index) => {
|
|
115
152
|
ctx.fillText(
|
|
116
153
|
item ?? "",
|
|
@@ -120,9 +157,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
157
|
});
|
|
121
158
|
};
|
|
122
159
|
const render = () => {
|
|
123
|
-
if (props.
|
|
160
|
+
if (props.svgRender || isDisabled.value) {
|
|
124
161
|
disconnect();
|
|
125
|
-
imgStyle.value = { display: "none" };
|
|
162
|
+
imgStyle.value = joinStyle({ display: "none" });
|
|
126
163
|
return;
|
|
127
164
|
}
|
|
128
165
|
const canvas = document.createElement("canvas");
|
|
@@ -130,20 +167,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
167
|
if (!ctx) {
|
|
131
168
|
return;
|
|
132
169
|
}
|
|
133
|
-
const rotate = props.rotate
|
|
170
|
+
const rotate = props.rotate;
|
|
171
|
+
const gapX = markGapX.value;
|
|
172
|
+
const gapY = markGapY.value;
|
|
134
173
|
if (!props.image && ctx.measureText != null) {
|
|
135
|
-
const { fontSize, fontFamily } =
|
|
174
|
+
const { fontSize, fontFamily } = markFont.value;
|
|
136
175
|
ctx.font = `${fontSize}px ${fontFamily}`;
|
|
137
176
|
}
|
|
138
|
-
const [
|
|
177
|
+
const [markWidth2, markHeight2] = getMarkSize(ctx);
|
|
139
178
|
const ratio = getPixelRatio();
|
|
140
|
-
const
|
|
141
|
-
const
|
|
142
|
-
const canvasHeight = (gapY + markHeight) * ratio;
|
|
179
|
+
const canvasWidth = (gapX + markWidth2) * ratio;
|
|
180
|
+
const canvasHeight = (gapY + markHeight2) * ratio;
|
|
143
181
|
canvas.setAttribute("width", `${canvasWidth * SIZE}px`);
|
|
144
182
|
canvas.setAttribute("height", `${canvasHeight * SIZE}px`);
|
|
145
|
-
const drawWidth =
|
|
146
|
-
const drawHeight =
|
|
183
|
+
const drawWidth = markWidth2 * ratio;
|
|
184
|
+
const drawHeight = markHeight2 * ratio;
|
|
147
185
|
const rotateX = (drawWidth + gapX * ratio) / 2;
|
|
148
186
|
const rotateY = (drawHeight + gapY * ratio) / 2;
|
|
149
187
|
ctx.save();
|
|
@@ -158,52 +196,173 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
158
196
|
const img = new Image();
|
|
159
197
|
img.onload = () => {
|
|
160
198
|
ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
199
|
+
{
|
|
200
|
+
ctx.restore();
|
|
201
|
+
rotateWatermark(ctx, alternateRotateX, alternateRotateY, rotate);
|
|
202
|
+
ctx.drawImage(
|
|
203
|
+
img,
|
|
204
|
+
alternateDrawX,
|
|
205
|
+
alternateDrawY,
|
|
206
|
+
drawWidth,
|
|
207
|
+
drawHeight
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
updateStyle(
|
|
211
|
+
canvas.toDataURL(),
|
|
212
|
+
(gapX + markWidth2) * SIZE,
|
|
213
|
+
(gapY + markHeight2) * SIZE
|
|
169
214
|
);
|
|
170
|
-
updateStyle(canvas.toDataURL(), `${(gapX + markWidth) * SIZE}px`);
|
|
171
215
|
};
|
|
172
216
|
img.crossOrigin = "anonymous";
|
|
173
217
|
img.referrerPolicy = "no-referrer";
|
|
174
218
|
img.src = props.image;
|
|
175
219
|
} else {
|
|
176
220
|
fillTexts(ctx, drawX, drawY, drawWidth, drawHeight);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
221
|
+
{
|
|
222
|
+
ctx.restore();
|
|
223
|
+
rotateWatermark(ctx, alternateRotateX, alternateRotateY, rotate);
|
|
224
|
+
fillTexts(ctx, alternateDrawX, alternateDrawY, drawWidth, drawHeight);
|
|
225
|
+
}
|
|
226
|
+
updateStyle(
|
|
227
|
+
canvas.toDataURL(),
|
|
228
|
+
(gapX + markWidth2) * SIZE,
|
|
229
|
+
(gapY + markHeight2) * SIZE
|
|
230
|
+
);
|
|
181
231
|
}
|
|
182
232
|
};
|
|
183
|
-
onMounted(() => {
|
|
184
|
-
render();
|
|
185
|
-
});
|
|
186
233
|
watch(
|
|
187
|
-
[
|
|
234
|
+
[
|
|
235
|
+
() => props.rotate,
|
|
236
|
+
() => props.image,
|
|
237
|
+
() => props.lineGap,
|
|
238
|
+
() => props.svgRender,
|
|
239
|
+
markWidth,
|
|
240
|
+
markHeight,
|
|
241
|
+
markGapX,
|
|
242
|
+
markGapY,
|
|
243
|
+
markOffsetX,
|
|
244
|
+
markOffsetY,
|
|
245
|
+
markFont,
|
|
246
|
+
markContents,
|
|
247
|
+
markCommonStyle,
|
|
248
|
+
isDisabled
|
|
249
|
+
],
|
|
188
250
|
() => {
|
|
189
251
|
render();
|
|
190
252
|
},
|
|
191
253
|
{ deep: true }
|
|
192
254
|
);
|
|
255
|
+
onMounted(() => {
|
|
256
|
+
render();
|
|
257
|
+
});
|
|
193
258
|
return (_ctx, _cache) => {
|
|
194
259
|
return openBlock(), createElementBlock("div", {
|
|
195
260
|
ref_key: "rootRef",
|
|
196
261
|
ref: rootRef,
|
|
197
262
|
key: rootKey.value,
|
|
198
|
-
style: normalizeStyle(
|
|
263
|
+
style: normalizeStyle([
|
|
264
|
+
props.wrapHeight == null ? {} : { height: props.wrapHeight },
|
|
265
|
+
!_ctx.wrapPosition || _ctx.fixed ? {} : { position: "relative" }
|
|
266
|
+
])
|
|
199
267
|
}, [
|
|
200
268
|
renderSlot(_ctx.$slots, "default"),
|
|
201
|
-
!
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
269
|
+
!isDisabled.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
270
|
+
_ctx.svgRender ? (openBlock(), createElementBlock("svg", {
|
|
271
|
+
key: 0,
|
|
272
|
+
style: normalizeStyle(svgStyle.value)
|
|
273
|
+
}, [
|
|
274
|
+
createElementVNode("defs", null, [
|
|
275
|
+
_ctx.image ? (openBlock(), createElementBlock("pattern", {
|
|
276
|
+
key: 0,
|
|
277
|
+
id: `imgPattern-${unref(svgId)}`,
|
|
278
|
+
patternUnits: "userSpaceOnUse",
|
|
279
|
+
width: (markWidth.value + markGapX.value) * SIZE,
|
|
280
|
+
height: (markHeight.value + markGapY.value) * SIZE
|
|
281
|
+
}, [
|
|
282
|
+
createElementVNode("g", {
|
|
283
|
+
transform: `rotate(${_ctx.rotate}, ${(markWidth.value + markGapX.value) / 2}, ${(markHeight.value + markGapY.value) / 2})`
|
|
284
|
+
}, [
|
|
285
|
+
createElementVNode("image", {
|
|
286
|
+
href: _ctx.image,
|
|
287
|
+
width: markWidth.value,
|
|
288
|
+
height: markHeight.value,
|
|
289
|
+
x: markGapX.value / 2,
|
|
290
|
+
y: markGapY.value / 2
|
|
291
|
+
}, null, 8, _hoisted_3)
|
|
292
|
+
], 8, _hoisted_2),
|
|
293
|
+
(openBlock(), createElementBlock("g", {
|
|
294
|
+
key: 0,
|
|
295
|
+
transform: `rotate(${_ctx.rotate}, ${(markWidth.value + markGapX.value) / 2 + markWidth.value + markGapX.value}, ${(markHeight.value + markGapY.value) / 2 + markHeight.value + markGapY.value})`
|
|
296
|
+
}, [
|
|
297
|
+
createElementVNode("image", {
|
|
298
|
+
href: _ctx.image,
|
|
299
|
+
width: markWidth.value,
|
|
300
|
+
height: markHeight.value,
|
|
301
|
+
x: markGapX.value / 2 + markWidth.value + markGapX.value,
|
|
302
|
+
y: markGapY.value / 2 + markHeight.value + markGapY.value
|
|
303
|
+
}, null, 8, _hoisted_5)
|
|
304
|
+
], 8, _hoisted_4))
|
|
305
|
+
], 8, _hoisted_1)) : (openBlock(), createElementBlock("pattern", {
|
|
306
|
+
key: 1,
|
|
307
|
+
id: `textPattern-${unref(svgId)}`,
|
|
308
|
+
patternUnits: "userSpaceOnUse",
|
|
309
|
+
width: (markWidth.value + markGapX.value) * SIZE,
|
|
310
|
+
height: (markHeight.value + markGapY.value) * SIZE
|
|
311
|
+
}, [
|
|
312
|
+
createElementVNode("g", {
|
|
313
|
+
transform: `rotate(${_ctx.rotate}, ${(markWidth.value + markGapX.value) / 2}, ${(markHeight.value + markGapY.value) / 2})`
|
|
314
|
+
}, [
|
|
315
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(markContents.value, (text, index) => {
|
|
316
|
+
return openBlock(), createElementBlock("text", {
|
|
317
|
+
key: index,
|
|
318
|
+
x: (markWidth.value + markGapX.value) / 2,
|
|
319
|
+
y: markGapY.value / 2 + index * (markFont.value.fontSize + _ctx.lineGap),
|
|
320
|
+
fill: markFont.value.color,
|
|
321
|
+
"font-size": markFont.value.fontSize,
|
|
322
|
+
"font-weight": markFont.value.fontWeight,
|
|
323
|
+
"font-family": markFont.value.fontFamily,
|
|
324
|
+
"font-style": markFont.value.fontStyle,
|
|
325
|
+
"text-anchor": "middle",
|
|
326
|
+
"alignment-baseline": "hanging",
|
|
327
|
+
"vector-effect": "non-scaling-stroke"
|
|
328
|
+
}, toDisplayString(text), 9, _hoisted_8);
|
|
329
|
+
}), 128))
|
|
330
|
+
], 8, _hoisted_7),
|
|
331
|
+
(openBlock(), createElementBlock("g", {
|
|
332
|
+
key: 0,
|
|
333
|
+
transform: `rotate(${_ctx.rotate}, ${(markWidth.value + markGapX.value) / 2 + markWidth.value + markGapX.value}, ${(markHeight.value + markGapY.value) / 2 + markHeight.value + markGapY.value})`
|
|
334
|
+
}, [
|
|
335
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(markContents.value, (text, index) => {
|
|
336
|
+
return openBlock(), createElementBlock("text", {
|
|
337
|
+
key: index,
|
|
338
|
+
x: (markWidth.value + markGapX.value) / 2 + markWidth.value + markGapX.value,
|
|
339
|
+
y: markGapY.value / 2 + index * (markFont.value.fontSize + _ctx.lineGap) + markHeight.value + markGapY.value,
|
|
340
|
+
fill: markFont.value.color,
|
|
341
|
+
"font-size": markFont.value.fontSize,
|
|
342
|
+
"font-weight": markFont.value.fontWeight,
|
|
343
|
+
"font-family": markFont.value.fontFamily,
|
|
344
|
+
"font-style": markFont.value.fontStyle,
|
|
345
|
+
"text-anchor": "middle",
|
|
346
|
+
"alignment-baseline": "hanging",
|
|
347
|
+
"vector-effect": "non-scaling-stroke"
|
|
348
|
+
}, toDisplayString(text), 9, _hoisted_10);
|
|
349
|
+
}), 128))
|
|
350
|
+
], 8, _hoisted_9))
|
|
351
|
+
], 8, _hoisted_6))
|
|
352
|
+
]),
|
|
353
|
+
createElementVNode("rect", {
|
|
354
|
+
width: "100%",
|
|
355
|
+
height: "100%",
|
|
356
|
+
fill: `url(#${_ctx.image ? "img" : "text"}Pattern-${unref(svgId)})`,
|
|
357
|
+
transform: `translate(${markOffsetX.value - markGapX.value / 2}, ${markOffsetY.value - markGapY.value / 2})`
|
|
358
|
+
}, null, 8, _hoisted_11)
|
|
359
|
+
], 4)) : (openBlock(), createElementBlock("div", {
|
|
360
|
+
key: 1,
|
|
361
|
+
ref_key: "imgRef",
|
|
362
|
+
ref: imgRef,
|
|
363
|
+
style: normalizeStyle(imgStyle.value)
|
|
364
|
+
}, null, 4))
|
|
365
|
+
], 64)) : createCommentVNode("", true)
|
|
207
366
|
], 4);
|
|
208
367
|
};
|
|
209
368
|
}
|
|
@@ -8,7 +8,10 @@ export declare const watermarkProps: {
|
|
|
8
8
|
/** 高度 */
|
|
9
9
|
height: NumberConstructor;
|
|
10
10
|
/** 旋转角度 */
|
|
11
|
-
rotate:
|
|
11
|
+
rotate: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
12
15
|
/** 层级 */
|
|
13
16
|
zIndex: NumberConstructor;
|
|
14
17
|
/** 图片源 */
|
|
@@ -28,6 +31,10 @@ export declare const watermarkProps: {
|
|
|
28
31
|
};
|
|
29
32
|
/** 自定义样式 */
|
|
30
33
|
customStyle: PropType<Exclude<StyleValue, string>>;
|
|
34
|
+
/** 是否使用 svg 渲染 */
|
|
35
|
+
svgRender: BooleanConstructor;
|
|
36
|
+
/** 是否禁用 */
|
|
37
|
+
disabled: BooleanConstructor;
|
|
31
38
|
/** 是否使用固定定位 */
|
|
32
39
|
fixed: BooleanConstructor;
|
|
33
40
|
/** 是否为外层添加定位样式 */
|
|
@@ -35,7 +42,7 @@ export declare const watermarkProps: {
|
|
|
35
42
|
type: BooleanConstructor;
|
|
36
43
|
default: boolean;
|
|
37
44
|
};
|
|
38
|
-
/**
|
|
39
|
-
|
|
45
|
+
/** 外层高度 */
|
|
46
|
+
wrapHeight: StringConstructor;
|
|
40
47
|
};
|
|
41
48
|
export type WatermarkProps = ExtractPropTypes<typeof watermarkProps>;
|
|
@@ -4,7 +4,10 @@ const watermarkProps = {
|
|
|
4
4
|
/** 高度 */
|
|
5
5
|
height: Number,
|
|
6
6
|
/** 旋转角度 */
|
|
7
|
-
rotate:
|
|
7
|
+
rotate: {
|
|
8
|
+
type: Number,
|
|
9
|
+
default: -22
|
|
10
|
+
},
|
|
8
11
|
/** 层级 */
|
|
9
12
|
zIndex: Number,
|
|
10
13
|
/** 图片源 */
|
|
@@ -24,6 +27,10 @@ const watermarkProps = {
|
|
|
24
27
|
},
|
|
25
28
|
/** 自定义样式 */
|
|
26
29
|
customStyle: Object,
|
|
30
|
+
/** 是否使用 svg 渲染 */
|
|
31
|
+
svgRender: Boolean,
|
|
32
|
+
/** 是否禁用 */
|
|
33
|
+
disabled: Boolean,
|
|
27
34
|
/** 是否使用固定定位 */
|
|
28
35
|
fixed: Boolean,
|
|
29
36
|
/** 是否为外层添加定位样式 */
|
|
@@ -31,8 +38,8 @@ const watermarkProps = {
|
|
|
31
38
|
type: Boolean,
|
|
32
39
|
default: true
|
|
33
40
|
},
|
|
34
|
-
/**
|
|
35
|
-
|
|
41
|
+
/** 外层高度 */
|
|
42
|
+
wrapHeight: String
|
|
36
43
|
};
|
|
37
44
|
export {
|
|
38
45
|
watermarkProps
|
|
@@ -37,3 +37,15 @@ export interface MutationOption {
|
|
|
37
37
|
/** 水印样式被篡改回调 */
|
|
38
38
|
onDalsified: () => void;
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 水印图片的数据
|
|
43
|
+
*/
|
|
44
|
+
export interface WatermarkImgData {
|
|
45
|
+
/** 图片的宽度 */
|
|
46
|
+
width: number;
|
|
47
|
+
/** 图片的高度 */
|
|
48
|
+
height: number;
|
|
49
|
+
/** 图片的base64数据 */
|
|
50
|
+
base64: string;
|
|
51
|
+
}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { StyleValue } from '../ele-app/types';
|
|
2
2
|
import { ERROR_MESSAGE_KEY as INFO_LOG_KEY } from '../utils/common';
|
|
3
|
-
import {
|
|
3
|
+
import { MutationOption } from './types';
|
|
4
4
|
|
|
5
5
|
export { INFO_LOG_KEY };
|
|
6
|
-
/**
|
|
7
|
-
* 获取文字样式
|
|
8
|
-
*/
|
|
9
|
-
export declare function getFont(font?: WatermarkFont): Required<WatermarkFont>;
|
|
10
|
-
/**
|
|
11
|
-
* 获取间距
|
|
12
|
-
*/
|
|
13
|
-
export declare function getGap(gap?: WatermarkGap): number[];
|
|
14
6
|
/**
|
|
15
7
|
* 返回设备像素密度
|
|
16
8
|
*/
|
|
@@ -29,5 +21,6 @@ export declare function joinStyle(style: StyleValue): string;
|
|
|
29
21
|
*/
|
|
30
22
|
export declare function useMutation(option: MutationOption): {
|
|
31
23
|
observe: () => void;
|
|
24
|
+
observeTextNode: (text: string) => string;
|
|
32
25
|
disconnect: () => void;
|
|
33
26
|
};
|