@element-plus/nightly 0.0.20231104 → 0.0.20231106
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +15 -3
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +15 -3
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/card/index.d.ts +3 -0
- package/es/components/card/src/card.d.ts +1 -0
- package/es/components/card/src/card.mjs +4 -0
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card.vue.d.ts +3 -0
- package/es/components/card/src/card2.mjs +9 -1
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +626 -65
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +65 -626
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +28 -72
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +72 -28
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +14 -91
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +91 -14
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +225 -61
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +61 -225
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +10 -10
- package/es/components/pagination/src/components/jumper.mjs +60 -9
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +9 -60
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +38 -18
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +18 -38
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +119 -31
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +31 -119
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +178 -53
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +53 -178
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +36 -39
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +39 -36
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +1 -1
- package/es/components/upload/src/upload.mjs +116 -101
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +101 -116
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +207 -28
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +28 -207
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +10 -10
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/card/index.d.ts +3 -0
- package/lib/components/card/src/card.d.ts +1 -0
- package/lib/components/card/src/card.js +4 -0
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card.vue.d.ts +3 -0
- package/lib/components/card/src/card2.js +9 -1
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +626 -66
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +66 -626
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +29 -72
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +72 -29
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +14 -91
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +91 -14
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +224 -61
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +61 -224
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +10 -10
- package/lib/components/pagination/src/components/jumper.js +60 -9
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +9 -60
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +38 -19
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +19 -38
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +119 -32
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +32 -119
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +178 -54
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +54 -178
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +37 -39
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +39 -37
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-list.js +1 -1
- package/lib/components/upload/src/upload.js +116 -104
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +104 -116
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +207 -28
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +28 -207
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +10 -10
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-card.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/card.scss +7 -0
- package/web-types.json +1 -1
|
@@ -1,122 +1,107 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useHandlers } from './use-handlers.mjs';
|
|
7
|
-
import { uploadProps } from './upload.mjs';
|
|
8
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
-
import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
1
|
+
import { NOOP } from '@vue/shared';
|
|
2
|
+
import '../../../utils/index.mjs';
|
|
3
|
+
import { ajaxUpload } from './ajax.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { mutable } from '../../../utils/typescript.mjs';
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
7
|
+
const uploadListTypes = ["text", "picture", "picture-card"];
|
|
8
|
+
let fileId = 1;
|
|
9
|
+
const genFileId = () => Date.now() + fileId++;
|
|
10
|
+
const uploadBaseProps = buildProps({
|
|
11
|
+
action: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "#"
|
|
14
|
+
},
|
|
15
|
+
headers: {
|
|
16
|
+
type: definePropType(Object)
|
|
17
|
+
},
|
|
18
|
+
method: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "post"
|
|
21
|
+
},
|
|
22
|
+
data: {
|
|
23
|
+
type: definePropType([Object, Function, Promise]),
|
|
24
|
+
default: () => mutable({})
|
|
25
|
+
},
|
|
26
|
+
multiple: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "file"
|
|
33
|
+
},
|
|
34
|
+
drag: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
38
|
+
withCredentials: Boolean,
|
|
39
|
+
showFileList: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
accept: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ""
|
|
46
|
+
},
|
|
47
|
+
fileList: {
|
|
48
|
+
type: definePropType(Array),
|
|
49
|
+
default: () => mutable([])
|
|
50
|
+
},
|
|
51
|
+
autoUpload: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: true
|
|
54
|
+
},
|
|
55
|
+
listType: {
|
|
56
|
+
type: String,
|
|
57
|
+
values: uploadListTypes,
|
|
58
|
+
default: "text"
|
|
59
|
+
},
|
|
60
|
+
httpRequest: {
|
|
61
|
+
type: definePropType(Function),
|
|
62
|
+
default: ajaxUpload
|
|
63
|
+
},
|
|
64
|
+
disabled: Boolean,
|
|
65
|
+
limit: Number
|
|
13
66
|
});
|
|
14
|
-
const
|
|
15
|
-
...
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
abort,
|
|
51
|
-
submit,
|
|
52
|
-
clearFiles,
|
|
53
|
-
handleStart,
|
|
54
|
-
handleRemove
|
|
55
|
-
});
|
|
56
|
-
return (_ctx, _cache) => {
|
|
57
|
-
return openBlock(), createElementBlock("div", null, [
|
|
58
|
-
unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
|
|
59
|
-
key: 0,
|
|
60
|
-
disabled: unref(disabled),
|
|
61
|
-
"list-type": _ctx.listType,
|
|
62
|
-
files: unref(uploadFiles),
|
|
63
|
-
"handle-preview": _ctx.onPreview,
|
|
64
|
-
onRemove: unref(handleRemove)
|
|
65
|
-
}, createSlots({
|
|
66
|
-
append: withCtx(() => [
|
|
67
|
-
createVNode(UploadContent, mergeProps({
|
|
68
|
-
ref_key: "uploadRef",
|
|
69
|
-
ref: uploadRef
|
|
70
|
-
}, unref(uploadContentProps)), {
|
|
71
|
-
default: withCtx(() => [
|
|
72
|
-
_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
|
|
73
|
-
!_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
|
|
74
|
-
]),
|
|
75
|
-
_: 3
|
|
76
|
-
}, 16)
|
|
77
|
-
]),
|
|
78
|
-
_: 2
|
|
79
|
-
}, [
|
|
80
|
-
_ctx.$slots.file ? {
|
|
81
|
-
name: "default",
|
|
82
|
-
fn: withCtx(({ file }) => [
|
|
83
|
-
renderSlot(_ctx.$slots, "file", { file })
|
|
84
|
-
])
|
|
85
|
-
} : void 0
|
|
86
|
-
]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true),
|
|
87
|
-
!unref(isPictureCard) || unref(isPictureCard) && !_ctx.showFileList ? (openBlock(), createBlock(UploadContent, mergeProps({
|
|
88
|
-
key: 1,
|
|
89
|
-
ref_key: "uploadRef",
|
|
90
|
-
ref: uploadRef
|
|
91
|
-
}, unref(uploadContentProps)), {
|
|
92
|
-
default: withCtx(() => [
|
|
93
|
-
_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
|
|
94
|
-
!_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
|
|
95
|
-
]),
|
|
96
|
-
_: 3
|
|
97
|
-
}, 16)) : createCommentVNode("v-if", true),
|
|
98
|
-
_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true),
|
|
99
|
-
renderSlot(_ctx.$slots, "tip"),
|
|
100
|
-
!unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
|
|
101
|
-
key: 3,
|
|
102
|
-
disabled: unref(disabled),
|
|
103
|
-
"list-type": _ctx.listType,
|
|
104
|
-
files: unref(uploadFiles),
|
|
105
|
-
"handle-preview": _ctx.onPreview,
|
|
106
|
-
onRemove: unref(handleRemove)
|
|
107
|
-
}, createSlots({ _: 2 }, [
|
|
108
|
-
_ctx.$slots.file ? {
|
|
109
|
-
name: "default",
|
|
110
|
-
fn: withCtx(({ file }) => [
|
|
111
|
-
renderSlot(_ctx.$slots, "file", { file })
|
|
112
|
-
])
|
|
113
|
-
} : void 0
|
|
114
|
-
]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true)
|
|
115
|
-
]);
|
|
116
|
-
};
|
|
67
|
+
const uploadProps = buildProps({
|
|
68
|
+
...uploadBaseProps,
|
|
69
|
+
beforeUpload: {
|
|
70
|
+
type: definePropType(Function),
|
|
71
|
+
default: NOOP
|
|
72
|
+
},
|
|
73
|
+
beforeRemove: {
|
|
74
|
+
type: definePropType(Function)
|
|
75
|
+
},
|
|
76
|
+
onRemove: {
|
|
77
|
+
type: definePropType(Function),
|
|
78
|
+
default: NOOP
|
|
79
|
+
},
|
|
80
|
+
onChange: {
|
|
81
|
+
type: definePropType(Function),
|
|
82
|
+
default: NOOP
|
|
83
|
+
},
|
|
84
|
+
onPreview: {
|
|
85
|
+
type: definePropType(Function),
|
|
86
|
+
default: NOOP
|
|
87
|
+
},
|
|
88
|
+
onSuccess: {
|
|
89
|
+
type: definePropType(Function),
|
|
90
|
+
default: NOOP
|
|
91
|
+
},
|
|
92
|
+
onProgress: {
|
|
93
|
+
type: definePropType(Function),
|
|
94
|
+
default: NOOP
|
|
95
|
+
},
|
|
96
|
+
onError: {
|
|
97
|
+
type: definePropType(Function),
|
|
98
|
+
default: NOOP
|
|
99
|
+
},
|
|
100
|
+
onExceed: {
|
|
101
|
+
type: definePropType(Function),
|
|
102
|
+
default: NOOP
|
|
117
103
|
}
|
|
118
104
|
});
|
|
119
|
-
var Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]);
|
|
120
105
|
|
|
121
|
-
export {
|
|
106
|
+
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps };
|
|
122
107
|
//# sourceMappingURL=upload2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload2.mjs","sources":["../../../../../../packages/components/upload/src/upload.
|
|
1
|
+
{"version":3,"file":"upload2.mjs","sources":["../../../../../../packages/components/upload/src/upload.ts"],"sourcesContent":["import { NOOP } from '@vue/shared'\nimport { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { ajaxUpload } from './ajax'\nimport type { Awaitable, Mutable } from '@element-plus/utils'\n\nimport type { UploadAjaxError } from './ajax'\nimport type { ExtractPropTypes } from 'vue'\nimport type Upload from './upload.vue'\n\nexport const uploadListTypes = ['text', 'picture', 'picture-card'] as const\n\nlet fileId = 1\nexport const genFileId = () => Date.now() + fileId++\n\nexport type UploadStatus = 'ready' | 'uploading' | 'success' | 'fail'\nexport interface UploadProgressEvent extends ProgressEvent {\n percent: number\n}\n\nexport interface UploadRequestOptions {\n action: string\n method: string\n data: Record<string, string | Blob | [string | Blob, string]>\n filename: string\n file: UploadRawFile\n headers: Headers | Record<string, string | number | null | undefined>\n onError: (evt: UploadAjaxError) => void\n onProgress: (evt: UploadProgressEvent) => void\n onSuccess: (response: any) => void\n withCredentials: boolean\n}\nexport interface UploadFile {\n name: string\n percentage?: number\n status: UploadStatus\n size?: number\n response?: unknown\n uid: number\n url?: string\n raw?: UploadRawFile\n}\nexport type UploadUserFile = Omit<UploadFile, 'status' | 'uid'> &\n Partial<Pick<UploadFile, 'status' | 'uid'>>\n\nexport type UploadFiles = UploadFile[]\nexport interface UploadRawFile extends File {\n uid: number\n}\nexport type UploadRequestHandler = (\n options: UploadRequestOptions\n) => XMLHttpRequest | Promise<unknown>\nexport interface UploadHooks {\n beforeUpload: (\n rawFile: UploadRawFile\n ) => Awaitable<void | undefined | null | boolean | File | Blob>\n beforeRemove: (\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => Awaitable<boolean>\n onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void\n onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void\n onPreview: (uploadFile: UploadFile) => void\n onSuccess: (\n response: any,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onProgress: (\n evt: UploadProgressEvent,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onError: (\n error: Error,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void\n}\n\nexport type UploadData = Mutable<Record<string, any>>\n\nexport const uploadBaseProps = buildProps({\n /**\n * @description request URL\n */\n action: {\n type: String,\n default: '#',\n },\n /**\n * @description request headers\n */\n headers: {\n type: definePropType<Headers | Record<string, any>>(Object),\n },\n /**\n * @description set upload request method\n */\n method: {\n type: String,\n default: 'post',\n },\n /**\n * @description additions options of request\n */\n data: {\n type: definePropType<\n | Awaitable<UploadData>\n | ((rawFile: UploadRawFile) => Awaitable<UploadData>)\n >([Object, Function, Promise]),\n default: () => mutable({} as const),\n },\n /**\n * @description whether uploading multiple files is permitted\n */\n multiple: {\n type: Boolean,\n default: false,\n },\n /**\n * @description key name for uploaded file\n */\n name: {\n type: String,\n default: 'file',\n },\n /**\n * @description whether to activate drag and drop mode\n */\n drag: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether cookies are sent\n */\n withCredentials: Boolean,\n /**\n * @description whether to show the uploaded file list\n */\n showFileList: {\n type: Boolean,\n default: true,\n },\n /**\n * @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`\n */\n accept: {\n type: String,\n default: '',\n },\n /**\n * @description default uploaded files\n */\n fileList: {\n type: definePropType<UploadUserFile[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether to auto upload file\n */\n autoUpload: {\n type: Boolean,\n default: true,\n },\n /**\n * @description type of file list\n */\n listType: {\n type: String,\n values: uploadListTypes,\n default: 'text',\n },\n /**\n * @description override default xhr behavior, allowing you to implement your own upload-file's request\n */\n httpRequest: {\n type: definePropType<UploadRequestHandler>(Function),\n default: ajaxUpload,\n },\n /**\n * @description whether to disable upload\n */\n disabled: Boolean,\n /**\n * @description maximum number of uploads allowed\n */\n limit: Number,\n} as const)\n\nexport const uploadProps = buildProps({\n ...uploadBaseProps,\n /**\n * @description hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted\n */\n beforeUpload: {\n type: definePropType<UploadHooks['beforeUpload']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted\n */\n beforeRemove: {\n type: definePropType<UploadHooks['beforeRemove']>(Function),\n },\n /**\n * @description hook function when files are removed\n */\n onRemove: {\n type: definePropType<UploadHooks['onRemove']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when select file or upload file success or upload file fail\n */\n onChange: {\n type: definePropType<UploadHooks['onChange']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when clicking the uploaded files\n */\n onPreview: {\n type: definePropType<UploadHooks['onPreview']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when uploaded successfully\n */\n onSuccess: {\n type: definePropType<UploadHooks['onSuccess']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when some progress occurs\n */\n onProgress: {\n type: definePropType<UploadHooks['onProgress']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when some errors occurs\n */\n onError: {\n type: definePropType<UploadHooks['onError']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when limit is exceeded\n */\n onExceed: {\n type: definePropType<UploadHooks['onExceed']>(Function),\n default: NOOP,\n },\n} as const)\n\nexport type UploadProps = ExtractPropTypes<typeof uploadProps>\n\nexport type UploadInstance = InstanceType<typeof Upload>\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,eAAe,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE;AACnE,IAAI,MAAM,GAAG,CAAC,CAAC;AACH,MAAC,SAAS,GAAG,MAAM,IAAI,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Q,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -2,7 +2,7 @@ import { watch } from 'vue';
|
|
|
2
2
|
import { isNil } from 'lodash-unified';
|
|
3
3
|
import { useVModel } from '@vueuse/core';
|
|
4
4
|
import '../../../utils/index.mjs';
|
|
5
|
-
import { genFileId } from './
|
|
5
|
+
import { genFileId } from './upload2.mjs';
|
|
6
6
|
import { debugWarn, throwError } from '../../../utils/error.mjs';
|
|
7
7
|
|
|
8
8
|
const SCOPE = "ElUpload";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Watermark from './src/
|
|
3
|
-
export { watermarkProps } from './src/
|
|
2
|
+
import Watermark from './src/watermark.mjs';
|
|
3
|
+
export { watermarkProps } from './src/watermark2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElWatermark = withInstall(Watermark);
|
|
@@ -1,33 +1,212 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, computed, shallowRef, ref, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeStyle, renderSlot } from 'vue';
|
|
2
|
+
import { useMutationObserver } from '@vueuse/core';
|
|
3
|
+
import { watermarkProps } from './watermark2.mjs';
|
|
4
|
+
import { getStyleStr, getPixelRatio, reRendering } from './utils.mjs';
|
|
5
|
+
import useClips, { FontGap } from './useClips.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
3
7
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
const __default__ = defineComponent({
|
|
9
|
+
name: "ElWatermark"
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: watermarkProps,
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const style = {
|
|
17
|
+
position: "relative"
|
|
18
|
+
};
|
|
19
|
+
const color = computed(() => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.color) != null ? _b : "rgba(0,0,0,.15)";
|
|
22
|
+
});
|
|
23
|
+
const fontSize = computed(() => {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontSize) != null ? _b : 16;
|
|
26
|
+
});
|
|
27
|
+
const fontWeight = computed(() => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontWeight) != null ? _b : "normal";
|
|
30
|
+
});
|
|
31
|
+
const fontStyle = computed(() => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontStyle) != null ? _b : "normal";
|
|
34
|
+
});
|
|
35
|
+
const fontFamily = computed(() => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontFamily) != null ? _b : "sans-serif";
|
|
38
|
+
});
|
|
39
|
+
const textAlign = computed(() => {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.textAlign) != null ? _b : "center";
|
|
42
|
+
});
|
|
43
|
+
const textBaseline = computed(() => {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.textBaseline) != null ? _b : "top";
|
|
46
|
+
});
|
|
47
|
+
const gapX = computed(() => props.gap[0]);
|
|
48
|
+
const gapY = computed(() => props.gap[1]);
|
|
49
|
+
const gapXCenter = computed(() => gapX.value / 2);
|
|
50
|
+
const gapYCenter = computed(() => gapY.value / 2);
|
|
51
|
+
const offsetLeft = computed(() => {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
return (_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value;
|
|
54
|
+
});
|
|
55
|
+
const offsetTop = computed(() => {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
return (_b = (_a = props.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value;
|
|
58
|
+
});
|
|
59
|
+
const getMarkStyle = () => {
|
|
60
|
+
const markStyle = {
|
|
61
|
+
zIndex: props.zIndex,
|
|
62
|
+
position: "absolute",
|
|
63
|
+
left: 0,
|
|
64
|
+
top: 0,
|
|
65
|
+
width: "100%",
|
|
66
|
+
height: "100%",
|
|
67
|
+
pointerEvents: "none",
|
|
68
|
+
backgroundRepeat: "repeat"
|
|
69
|
+
};
|
|
70
|
+
let positionLeft = offsetLeft.value - gapXCenter.value;
|
|
71
|
+
let positionTop = offsetTop.value - gapYCenter.value;
|
|
72
|
+
if (positionLeft > 0) {
|
|
73
|
+
markStyle.left = `${positionLeft}px`;
|
|
74
|
+
markStyle.width = `calc(100% - ${positionLeft}px)`;
|
|
75
|
+
positionLeft = 0;
|
|
76
|
+
}
|
|
77
|
+
if (positionTop > 0) {
|
|
78
|
+
markStyle.top = `${positionTop}px`;
|
|
79
|
+
markStyle.height = `calc(100% - ${positionTop}px)`;
|
|
80
|
+
positionTop = 0;
|
|
81
|
+
}
|
|
82
|
+
markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
|
|
83
|
+
return markStyle;
|
|
84
|
+
};
|
|
85
|
+
const containerRef = shallowRef(null);
|
|
86
|
+
const watermarkRef = shallowRef();
|
|
87
|
+
const stopObservation = ref(false);
|
|
88
|
+
const destroyWatermark = () => {
|
|
89
|
+
if (watermarkRef.value) {
|
|
90
|
+
watermarkRef.value.remove();
|
|
91
|
+
watermarkRef.value = void 0;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const appendWatermark = (base64Url, markWidth) => {
|
|
95
|
+
var _a;
|
|
96
|
+
if (containerRef.value && watermarkRef.value) {
|
|
97
|
+
stopObservation.value = true;
|
|
98
|
+
watermarkRef.value.setAttribute("style", getStyleStr({
|
|
99
|
+
...getMarkStyle(),
|
|
100
|
+
backgroundImage: `url('${base64Url}')`,
|
|
101
|
+
backgroundSize: `${Math.floor(markWidth)}px`
|
|
102
|
+
}));
|
|
103
|
+
(_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value);
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
stopObservation.value = false;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const getMarkSize = (ctx) => {
|
|
110
|
+
let defaultWidth = 120;
|
|
111
|
+
let defaultHeight = 64;
|
|
112
|
+
const image = props.image;
|
|
113
|
+
const content = props.content;
|
|
114
|
+
const width = props.width;
|
|
115
|
+
const height = props.height;
|
|
116
|
+
if (!image && ctx.measureText) {
|
|
117
|
+
ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
|
|
118
|
+
const contents = Array.isArray(content) ? content : [content];
|
|
119
|
+
const sizes = contents.map((item) => {
|
|
120
|
+
const metrics = ctx.measureText(item);
|
|
121
|
+
return [
|
|
122
|
+
metrics.width,
|
|
123
|
+
metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent
|
|
124
|
+
];
|
|
125
|
+
});
|
|
126
|
+
defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])));
|
|
127
|
+
defaultHeight = Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length + (contents.length - 1) * FontGap;
|
|
128
|
+
}
|
|
129
|
+
return [width != null ? width : defaultWidth, height != null ? height : defaultHeight];
|
|
130
|
+
};
|
|
131
|
+
const getClips = useClips();
|
|
132
|
+
const renderWatermark = () => {
|
|
133
|
+
const canvas = document.createElement("canvas");
|
|
134
|
+
const ctx = canvas.getContext("2d");
|
|
135
|
+
const image = props.image;
|
|
136
|
+
const content = props.content;
|
|
137
|
+
const rotate = props.rotate;
|
|
138
|
+
if (ctx) {
|
|
139
|
+
if (!watermarkRef.value) {
|
|
140
|
+
watermarkRef.value = document.createElement("div");
|
|
141
|
+
}
|
|
142
|
+
const ratio = getPixelRatio();
|
|
143
|
+
const [markWidth, markHeight] = getMarkSize(ctx);
|
|
144
|
+
const drawCanvas = (drawContent) => {
|
|
145
|
+
const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
|
|
146
|
+
color: color.value,
|
|
147
|
+
fontSize: fontSize.value,
|
|
148
|
+
fontStyle: fontStyle.value,
|
|
149
|
+
fontWeight: fontWeight.value,
|
|
150
|
+
fontFamily: fontFamily.value,
|
|
151
|
+
textAlign: textAlign.value,
|
|
152
|
+
textBaseline: textBaseline.value
|
|
153
|
+
}, gapX.value, gapY.value);
|
|
154
|
+
appendWatermark(textClips, clipWidth);
|
|
155
|
+
};
|
|
156
|
+
if (image) {
|
|
157
|
+
const img = new Image();
|
|
158
|
+
img.onload = () => {
|
|
159
|
+
drawCanvas(img);
|
|
160
|
+
};
|
|
161
|
+
img.onerror = () => {
|
|
162
|
+
drawCanvas(content);
|
|
163
|
+
};
|
|
164
|
+
img.crossOrigin = "anonymous";
|
|
165
|
+
img.referrerPolicy = "no-referrer";
|
|
166
|
+
img.src = image;
|
|
167
|
+
} else {
|
|
168
|
+
drawCanvas(content);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
onMounted(() => {
|
|
173
|
+
renderWatermark();
|
|
174
|
+
});
|
|
175
|
+
watch(() => props, () => {
|
|
176
|
+
renderWatermark();
|
|
177
|
+
}, {
|
|
178
|
+
deep: true,
|
|
179
|
+
flush: "post"
|
|
180
|
+
});
|
|
181
|
+
onBeforeUnmount(() => {
|
|
182
|
+
destroyWatermark();
|
|
183
|
+
});
|
|
184
|
+
const onMutate = (mutations) => {
|
|
185
|
+
if (stopObservation.value) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
mutations.forEach((mutation) => {
|
|
189
|
+
if (reRendering(mutation, watermarkRef.value)) {
|
|
190
|
+
destroyWatermark();
|
|
191
|
+
renderWatermark();
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
useMutationObserver(containerRef, onMutate, {
|
|
196
|
+
attributes: true
|
|
197
|
+
});
|
|
198
|
+
return (_ctx, _cache) => {
|
|
199
|
+
return openBlock(), createElementBlock("div", {
|
|
200
|
+
ref_key: "containerRef",
|
|
201
|
+
ref: containerRef,
|
|
202
|
+
style: normalizeStyle([style])
|
|
203
|
+
}, [
|
|
204
|
+
renderSlot(_ctx.$slots, "default")
|
|
205
|
+
], 4);
|
|
206
|
+
};
|
|
29
207
|
}
|
|
30
208
|
});
|
|
209
|
+
var Watermark = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/watermark/src/watermark.vue"]]);
|
|
31
210
|
|
|
32
|
-
export {
|
|
211
|
+
export { Watermark as default };
|
|
33
212
|
//# sourceMappingURL=watermark.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watermark.mjs","sources":["../../../../../../packages/components/watermark/src/watermark.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Watermark from './watermark.vue'\n\nexport interface WatermarkFontType {\n color?: string\n fontSize?: number | string\n fontWeight?: 'normal' | 'light' | 'weight' | number\n fontStyle?: 'none' | 'normal' | 'italic' | 'oblique'\n fontFamily?: string\n textAlign?: 'start' | 'end' | 'left' | 'right' | 'center'\n textBaseline?:\n | 'top'\n | 'hanging'\n | 'middle'\n | 'alphabetic'\n | 'ideographic'\n | 'bottom'\n}\n\nexport const watermarkProps = buildProps({\n /**\n * @description The z-index of the appended watermark element\n */\n zIndex: {\n type: Number,\n default: 9,\n },\n /**\n * @description The rotation angle of the watermark\n */\n rotate: {\n type: Number,\n default: -22,\n },\n /**\n * @description The width of the watermark\n */\n width: Number,\n /**\n * @description The height of the watermark\n */\n height: Number,\n /**\n * @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format)\n */\n image: String,\n /**\n * @description Watermark text content\n */\n content: {\n type: definePropType<string | string[]>([String, Array]),\n default: 'Element Plus',\n },\n /**\n * @description Text style\n */\n font: {\n type: definePropType<WatermarkFontType>(Object),\n },\n /**\n * @description The spacing between watermarks\n */\n gap: {\n type: definePropType<[number, number]>(Array),\n default: () => [100, 100],\n },\n /**\n * @description The offset of the watermark from the upper left corner of the container. The default is gap/2\n */\n offset: {\n type: definePropType<[number, number]>(Array),\n },\n} as const)\n\nexport type WatermarkProps = ExtractPropTypes<typeof watermarkProps>\nexport type WatermarkInstance = InstanceType<typeof Watermark>\n"],"names":[],"mappings":";;;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC,EAAE;AAChB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,cAAc;AAC3B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;AAC7B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"watermark.mjs","sources":["../../../../../../packages/components/watermark/src/watermark.vue"],"sourcesContent":["<template>\n <div ref=\"containerRef\" :style=\"[style]\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n} from 'vue'\nimport { useMutationObserver } from '@vueuse/core'\nimport { watermarkProps } from './watermark'\nimport { getPixelRatio, getStyleStr, reRendering } from './utils'\nimport useClips, { FontGap } from './useClips'\nimport type { WatermarkProps } from './watermark'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElWatermark',\n})\n\nconst style: CSSProperties = {\n position: 'relative',\n}\n\nconst props = defineProps(watermarkProps)\nconst color = computed(() => props.font?.color ?? 'rgba(0,0,0,.15)')\nconst fontSize = computed(() => props.font?.fontSize ?? 16)\nconst fontWeight = computed(() => props.font?.fontWeight ?? 'normal')\nconst fontStyle = computed(() => props.font?.fontStyle ?? 'normal')\nconst fontFamily = computed(() => props.font?.fontFamily ?? 'sans-serif')\nconst textAlign = computed(() => props.font?.textAlign ?? 'center')\nconst textBaseline = computed(() => props.font?.textBaseline ?? 'top')\n\nconst gapX = computed(() => props.gap[0])\nconst gapY = computed(() => props.gap[1])\nconst gapXCenter = computed(() => gapX.value / 2)\nconst gapYCenter = computed(() => gapY.value / 2)\nconst offsetLeft = computed(() => props.offset?.[0] ?? gapXCenter.value)\nconst offsetTop = computed(() => props.offset?.[1] ?? gapYCenter.value)\n\nconst getMarkStyle = () => {\n const markStyle: CSSProperties = {\n zIndex: props.zIndex,\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n backgroundRepeat: 'repeat',\n }\n\n /** Calculate the style of the offset */\n let positionLeft = offsetLeft.value - gapXCenter.value\n let positionTop = offsetTop.value - gapYCenter.value\n if (positionLeft > 0) {\n markStyle.left = `${positionLeft}px`\n markStyle.width = `calc(100% - ${positionLeft}px)`\n positionLeft = 0\n }\n if (positionTop > 0) {\n markStyle.top = `${positionTop}px`\n markStyle.height = `calc(100% - ${positionTop}px)`\n positionTop = 0\n }\n markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`\n\n return markStyle\n}\n\nconst containerRef = shallowRef<HTMLDivElement | null>(null)\nconst watermarkRef = shallowRef<HTMLDivElement>()\nconst stopObservation = ref(false)\n\nconst destroyWatermark = () => {\n if (watermarkRef.value) {\n watermarkRef.value.remove()\n watermarkRef.value = undefined\n }\n}\nconst appendWatermark = (base64Url: string, markWidth: number) => {\n if (containerRef.value && watermarkRef.value) {\n stopObservation.value = true\n watermarkRef.value.setAttribute(\n 'style',\n getStyleStr({\n ...getMarkStyle(),\n backgroundImage: `url('${base64Url}')`,\n backgroundSize: `${Math.floor(markWidth)}px`,\n })\n )\n containerRef.value?.append(watermarkRef.value)\n // Delayed execution\n setTimeout(() => {\n stopObservation.value = false\n })\n }\n}\n\n/**\n * Get the width and height of the watermark. The default values are as follows\n * Image: [120, 64]; Content: It's calculated by content;\n */\nconst getMarkSize = (ctx: CanvasRenderingContext2D) => {\n let defaultWidth = 120\n let defaultHeight = 64\n const image = props.image\n const content = props.content\n const width = props.width\n const height = props.height\n if (!image && ctx.measureText) {\n ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`\n const contents = Array.isArray(content) ? content : [content]\n const sizes = contents.map((item) => {\n const metrics = ctx.measureText(item!)\n\n return [\n metrics.width,\n metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent,\n ]\n })\n defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])))\n defaultHeight =\n Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length +\n (contents.length - 1) * FontGap\n }\n return [width ?? defaultWidth, height ?? defaultHeight] as const\n}\n\nconst getClips = useClips()\n\nconst renderWatermark = () => {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n const image = props.image\n const content = props.content\n const rotate = props.rotate\n\n if (ctx) {\n if (!watermarkRef.value) {\n watermarkRef.value = document.createElement('div')\n }\n\n const ratio = getPixelRatio()\n const [markWidth, markHeight] = getMarkSize(ctx)\n\n const drawCanvas = (\n drawContent?: NonNullable<WatermarkProps['content']> | HTMLImageElement\n ) => {\n const [textClips, clipWidth] = getClips(\n drawContent || '',\n rotate,\n ratio,\n markWidth,\n markHeight,\n {\n color: color.value,\n fontSize: fontSize.value,\n fontStyle: fontStyle.value,\n fontWeight: fontWeight.value,\n fontFamily: fontFamily.value,\n textAlign: textAlign.value,\n textBaseline: textBaseline.value,\n },\n gapX.value,\n gapY.value\n )\n\n appendWatermark(textClips, clipWidth)\n }\n\n if (image) {\n const img = new Image()\n img.onload = () => {\n drawCanvas(img)\n }\n img.onerror = () => {\n drawCanvas(content)\n }\n img.crossOrigin = 'anonymous'\n img.referrerPolicy = 'no-referrer'\n img.src = image\n } else {\n drawCanvas(content)\n }\n }\n}\n\nonMounted(() => {\n renderWatermark()\n})\n\nwatch(\n () => props,\n () => {\n renderWatermark()\n },\n {\n deep: true,\n flush: 'post',\n }\n)\n\nonBeforeUnmount(() => {\n destroyWatermark()\n})\n\nconst onMutate = (mutations: MutationRecord[]) => {\n if (stopObservation.value) {\n return\n }\n mutations.forEach((mutation) => {\n if (reRendering(mutation, watermarkRef.value)) {\n destroyWatermark()\n renderWatermark()\n }\n })\n}\n\nuseMutationObserver(containerRef, onMutate, {\n attributes: true,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCAsBc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