@element-plus/nightly 0.0.20220813 → 0.0.20220816
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/dist/index.full.js +6 -6
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -3
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +6 -6
- 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/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/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/dialog/src/use-dialog.mjs +1 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +400 -35
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +35 -400
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/table/src/table/style-helper.mjs +3 -3
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.mjs +170 -33
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +33 -170
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/dialog/src/use-dialog.js +1 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +400 -36
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +36 -400
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/table/src/table/style-helper.js +3 -3
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.js +169 -32
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +32 -169
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +2 -2
- 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/web-types.json +1 -1
|
@@ -1,39 +1,176 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, shallowRef, openBlock, createElementBlock, normalizeClass, unref, withKeys, withModifiers, createBlock, withCtx, renderSlot, createElementVNode } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
2
3
|
import '../../../utils/index.mjs';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
4
|
+
import UploadDragger from './upload-dragger2.mjs';
|
|
5
|
+
import { uploadContentProps } from './upload-content2.mjs';
|
|
6
|
+
import { genFileId } from './upload.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
+
import { entriesOf } from '../../../utils/objects.mjs';
|
|
5
10
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
const _hoisted_1 = ["onKeydown"];
|
|
12
|
+
const _hoisted_2 = ["name", "multiple", "accept"];
|
|
13
|
+
const __default__ = {
|
|
14
|
+
name: "ElUploadContent",
|
|
15
|
+
inheritAttrs: false
|
|
16
|
+
};
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: uploadContentProps,
|
|
20
|
+
setup(__props, { expose }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const ns = useNamespace("upload");
|
|
23
|
+
const requests = shallowRef({});
|
|
24
|
+
const inputRef = shallowRef();
|
|
25
|
+
const uploadFiles = (files) => {
|
|
26
|
+
if (files.length === 0)
|
|
27
|
+
return;
|
|
28
|
+
const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props;
|
|
29
|
+
if (limit && fileList.length + files.length > limit) {
|
|
30
|
+
onExceed(files, fileList);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (!multiple) {
|
|
34
|
+
files = files.slice(0, 1);
|
|
35
|
+
}
|
|
36
|
+
for (const file of files) {
|
|
37
|
+
const rawFile = file;
|
|
38
|
+
rawFile.uid = genFileId();
|
|
39
|
+
onStart(rawFile);
|
|
40
|
+
if (autoUpload)
|
|
41
|
+
upload(rawFile);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const upload = async (rawFile) => {
|
|
45
|
+
inputRef.value.value = "";
|
|
46
|
+
if (!props.beforeUpload) {
|
|
47
|
+
return doUpload(rawFile);
|
|
48
|
+
}
|
|
49
|
+
let hookResult;
|
|
50
|
+
try {
|
|
51
|
+
hookResult = await props.beforeUpload(rawFile);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
hookResult = false;
|
|
54
|
+
}
|
|
55
|
+
if (hookResult === false) {
|
|
56
|
+
props.onRemove(rawFile);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
let file = rawFile;
|
|
60
|
+
if (hookResult instanceof Blob) {
|
|
61
|
+
if (hookResult instanceof File) {
|
|
62
|
+
file = hookResult;
|
|
63
|
+
} else {
|
|
64
|
+
file = new File([hookResult], rawFile.name, {
|
|
65
|
+
type: rawFile.type
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
doUpload(Object.assign(file, {
|
|
70
|
+
uid: rawFile.uid
|
|
71
|
+
}));
|
|
72
|
+
};
|
|
73
|
+
const doUpload = (rawFile) => {
|
|
74
|
+
const {
|
|
75
|
+
headers,
|
|
76
|
+
data,
|
|
77
|
+
method,
|
|
78
|
+
withCredentials,
|
|
79
|
+
name: filename,
|
|
80
|
+
action,
|
|
81
|
+
onProgress,
|
|
82
|
+
onSuccess,
|
|
83
|
+
onError,
|
|
84
|
+
httpRequest
|
|
85
|
+
} = props;
|
|
86
|
+
const { uid } = rawFile;
|
|
87
|
+
const options = {
|
|
88
|
+
headers: headers || {},
|
|
89
|
+
withCredentials,
|
|
90
|
+
file: rawFile,
|
|
91
|
+
data,
|
|
92
|
+
method,
|
|
93
|
+
filename,
|
|
94
|
+
action,
|
|
95
|
+
onProgress: (evt) => {
|
|
96
|
+
onProgress(evt, rawFile);
|
|
97
|
+
},
|
|
98
|
+
onSuccess: (res) => {
|
|
99
|
+
onSuccess(res, rawFile);
|
|
100
|
+
delete requests.value[uid];
|
|
101
|
+
},
|
|
102
|
+
onError: (err) => {
|
|
103
|
+
onError(err, rawFile);
|
|
104
|
+
delete requests.value[uid];
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const request = httpRequest(options);
|
|
108
|
+
requests.value[uid] = request;
|
|
109
|
+
if (request instanceof Promise) {
|
|
110
|
+
request.then(options.onSuccess, options.onError);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const handleChange = (e) => {
|
|
114
|
+
const files = e.target.files;
|
|
115
|
+
if (!files)
|
|
116
|
+
return;
|
|
117
|
+
uploadFiles(Array.from(files));
|
|
118
|
+
};
|
|
119
|
+
const handleClick = () => {
|
|
120
|
+
if (!props.disabled) {
|
|
121
|
+
inputRef.value.value = "";
|
|
122
|
+
inputRef.value.click();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const handleKeydown = () => {
|
|
126
|
+
handleClick();
|
|
127
|
+
};
|
|
128
|
+
const abort = (file) => {
|
|
129
|
+
const _reqs = entriesOf(requests.value).filter(file ? ([uid]) => String(file.uid) === uid : () => true);
|
|
130
|
+
_reqs.forEach(([uid, req]) => {
|
|
131
|
+
if (req instanceof XMLHttpRequest)
|
|
132
|
+
req.abort();
|
|
133
|
+
delete requests.value[uid];
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
expose({
|
|
137
|
+
abort,
|
|
138
|
+
upload
|
|
139
|
+
});
|
|
140
|
+
return (_ctx, _cache) => {
|
|
141
|
+
return openBlock(), createElementBlock("div", {
|
|
142
|
+
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.listType), unref(ns).is("drag", _ctx.drag)]),
|
|
143
|
+
tabindex: "0",
|
|
144
|
+
onClick: handleClick,
|
|
145
|
+
onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"])
|
|
146
|
+
}, [
|
|
147
|
+
_ctx.drag ? (openBlock(), createBlock(UploadDragger, {
|
|
148
|
+
key: 0,
|
|
149
|
+
disabled: _ctx.disabled,
|
|
150
|
+
onFile: uploadFiles
|
|
151
|
+
}, {
|
|
152
|
+
default: withCtx(() => [
|
|
153
|
+
renderSlot(_ctx.$slots, "default")
|
|
154
|
+
]),
|
|
155
|
+
_: 3
|
|
156
|
+
}, 8, ["disabled"])) : renderSlot(_ctx.$slots, "default", { key: 1 }),
|
|
157
|
+
createElementVNode("input", {
|
|
158
|
+
ref_key: "inputRef",
|
|
159
|
+
ref: inputRef,
|
|
160
|
+
class: normalizeClass(unref(ns).e("input")),
|
|
161
|
+
name: _ctx.name,
|
|
162
|
+
multiple: _ctx.multiple,
|
|
163
|
+
accept: _ctx.accept,
|
|
164
|
+
type: "file",
|
|
165
|
+
onChange: handleChange,
|
|
166
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
167
|
+
}, ["stop"]))
|
|
168
|
+
}, null, 42, _hoisted_2)
|
|
169
|
+
], 42, _hoisted_1);
|
|
170
|
+
};
|
|
35
171
|
}
|
|
36
172
|
});
|
|
173
|
+
var UploadContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);
|
|
37
174
|
|
|
38
|
-
export {
|
|
175
|
+
export { UploadContent as default };
|
|
39
176
|
//# sourceMappingURL=upload-content.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-content.mjs","sources":["../../../../../../packages/components/upload/src/upload-content.
|
|
1
|
+
{"version":3,"file":"upload-content.mjs","sources":["../../../../../../packages/components/upload/src/upload-content.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), ns.m(listType), ns.is('drag', drag)]\"\n tabindex=\"0\"\n @click=\"handleClick\"\n @keydown.self.enter.space=\"handleKeydown\"\n >\n <template v-if=\"drag\">\n <upload-dragger :disabled=\"disabled\" @file=\"uploadFiles\">\n <slot />\n </upload-dragger>\n </template>\n <template v-else>\n <slot />\n </template>\n <input\n ref=\"inputRef\"\n :class=\"ns.e('input')\"\n :name=\"name\"\n :multiple=\"multiple\"\n :accept=\"accept\"\n type=\"file\"\n @change=\"handleChange\"\n @click.stop\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { shallowRef } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { entriesOf } from '@element-plus/utils'\nimport UploadDragger from './upload-dragger.vue'\nimport { uploadContentProps } from './upload-content'\nimport { genFileId } from './upload'\n\nimport type {\n UploadFile,\n UploadHooks,\n UploadRawFile,\n UploadRequestOptions,\n} from './upload'\n\ndefineOptions({\n name: 'ElUploadContent',\n inheritAttrs: false,\n})\n\nconst props = defineProps(uploadContentProps)\nconst ns = useNamespace('upload')\n\nconst requests = shallowRef<Record<string, XMLHttpRequest | Promise<unknown>>>(\n {}\n)\nconst inputRef = shallowRef<HTMLInputElement>()\n\nconst uploadFiles = (files: File[]) => {\n if (files.length === 0) return\n\n const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props\n\n if (limit && fileList.length + files.length > limit) {\n onExceed(files, fileList)\n return\n }\n\n if (!multiple) {\n files = files.slice(0, 1)\n }\n\n for (const file of files) {\n const rawFile = file as UploadRawFile\n rawFile.uid = genFileId()\n onStart(rawFile)\n if (autoUpload) upload(rawFile)\n }\n}\n\nconst upload = async (rawFile: UploadRawFile) => {\n inputRef.value!.value = ''\n\n if (!props.beforeUpload) {\n return doUpload(rawFile)\n }\n\n let hookResult: Exclude<ReturnType<UploadHooks['beforeUpload']>, Promise<any>>\n try {\n hookResult = await props.beforeUpload(rawFile)\n } catch {\n hookResult = false\n }\n\n if (hookResult === false) {\n props.onRemove(rawFile)\n return\n }\n\n let file: File = rawFile\n if (hookResult instanceof Blob) {\n if (hookResult instanceof File) {\n file = hookResult\n } else {\n file = new File([hookResult], rawFile.name, {\n type: rawFile.type,\n })\n }\n }\n\n doUpload(\n Object.assign(file, {\n uid: rawFile.uid,\n })\n )\n}\n\nconst doUpload = (rawFile: UploadRawFile) => {\n const {\n headers,\n data,\n method,\n withCredentials,\n name: filename,\n action,\n onProgress,\n onSuccess,\n onError,\n httpRequest,\n } = props\n\n const { uid } = rawFile\n const options: UploadRequestOptions = {\n headers: headers || {},\n withCredentials,\n file: rawFile,\n data,\n method,\n filename,\n action,\n onProgress: (evt) => {\n onProgress(evt, rawFile)\n },\n onSuccess: (res) => {\n onSuccess(res, rawFile)\n delete requests.value[uid]\n },\n onError: (err) => {\n onError(err, rawFile)\n delete requests.value[uid]\n },\n }\n const request = httpRequest(options)\n requests.value[uid] = request\n if (request instanceof Promise) {\n request.then(options.onSuccess, options.onError)\n }\n}\n\nconst handleChange = (e: Event) => {\n const files = (e.target as HTMLInputElement).files\n if (!files) return\n uploadFiles(Array.from(files))\n}\n\nconst handleClick = () => {\n if (!props.disabled) {\n inputRef.value!.value = ''\n inputRef.value!.click()\n }\n}\n\nconst handleKeydown = () => {\n handleClick()\n}\n\nconst abort = (file?: UploadFile) => {\n const _reqs = entriesOf(requests.value).filter(\n file ? ([uid]) => String(file.uid) === uid : () => true\n )\n _reqs.forEach(([uid, req]) => {\n if (req instanceof XMLHttpRequest) req.abort()\n delete requests.value[uid]\n })\n}\n\ndefineExpose({\n abort,\n upload,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiDA,IAAA,MAAA,EAAA,GAAA,aAAA,QAAA,CAAA,CAAA;AAEA,IAAA,MAAA,QAAA,GAAA,UACA,CAAA,EACA,CAAA,CAAA;AACA,IAAA,MAAA,WAAA,UAAA,EAAA,CAAA;AAEA,IAAA,MAAA,WAAA,GAAA,CAAA,KAAA,KAAA;AACA,MAAA,IAAA,MAAA,MAAA,KAAA,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A,UAAA,GAAA,CAAA,KAAA,EAAA,CAAA;AACA,QAAA,OAAA,SAAA,KAAA,CAAA,GAAA,CAAA,CAAA;AAAA,OACA,CAAA,CAAA;AAAA,KACA,CAAA;AAEA,IAAA,MAAA,CAAA;AAAA,MACA,KAAA;AAAA,MACA,MAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,176 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../../../hooks/index.mjs';
|
|
1
|
+
import { NOOP } from '@vue/shared';
|
|
3
2
|
import '../../../utils/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { genFileId } from './upload.mjs';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { entriesOf } from '../../../utils/objects.mjs';
|
|
3
|
+
import { uploadBaseProps } from './upload.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
10
5
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
if (autoUpload)
|
|
41
|
-
upload(rawFile);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const upload = async (rawFile) => {
|
|
45
|
-
inputRef.value.value = "";
|
|
46
|
-
if (!props.beforeUpload) {
|
|
47
|
-
return doUpload(rawFile);
|
|
48
|
-
}
|
|
49
|
-
let hookResult;
|
|
50
|
-
try {
|
|
51
|
-
hookResult = await props.beforeUpload(rawFile);
|
|
52
|
-
} catch (e) {
|
|
53
|
-
hookResult = false;
|
|
54
|
-
}
|
|
55
|
-
if (hookResult === false) {
|
|
56
|
-
props.onRemove(rawFile);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
let file = rawFile;
|
|
60
|
-
if (hookResult instanceof Blob) {
|
|
61
|
-
if (hookResult instanceof File) {
|
|
62
|
-
file = hookResult;
|
|
63
|
-
} else {
|
|
64
|
-
file = new File([hookResult], rawFile.name, {
|
|
65
|
-
type: rawFile.type
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
doUpload(Object.assign(file, {
|
|
70
|
-
uid: rawFile.uid
|
|
71
|
-
}));
|
|
72
|
-
};
|
|
73
|
-
const doUpload = (rawFile) => {
|
|
74
|
-
const {
|
|
75
|
-
headers,
|
|
76
|
-
data,
|
|
77
|
-
method,
|
|
78
|
-
withCredentials,
|
|
79
|
-
name: filename,
|
|
80
|
-
action,
|
|
81
|
-
onProgress,
|
|
82
|
-
onSuccess,
|
|
83
|
-
onError,
|
|
84
|
-
httpRequest
|
|
85
|
-
} = props;
|
|
86
|
-
const { uid } = rawFile;
|
|
87
|
-
const options = {
|
|
88
|
-
headers: headers || {},
|
|
89
|
-
withCredentials,
|
|
90
|
-
file: rawFile,
|
|
91
|
-
data,
|
|
92
|
-
method,
|
|
93
|
-
filename,
|
|
94
|
-
action,
|
|
95
|
-
onProgress: (evt) => {
|
|
96
|
-
onProgress(evt, rawFile);
|
|
97
|
-
},
|
|
98
|
-
onSuccess: (res) => {
|
|
99
|
-
onSuccess(res, rawFile);
|
|
100
|
-
delete requests.value[uid];
|
|
101
|
-
},
|
|
102
|
-
onError: (err) => {
|
|
103
|
-
onError(err, rawFile);
|
|
104
|
-
delete requests.value[uid];
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
const request = httpRequest(options);
|
|
108
|
-
requests.value[uid] = request;
|
|
109
|
-
if (request instanceof Promise) {
|
|
110
|
-
request.then(options.onSuccess, options.onError);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
const handleChange = (e) => {
|
|
114
|
-
const files = e.target.files;
|
|
115
|
-
if (!files)
|
|
116
|
-
return;
|
|
117
|
-
uploadFiles(Array.from(files));
|
|
118
|
-
};
|
|
119
|
-
const handleClick = () => {
|
|
120
|
-
if (!props.disabled) {
|
|
121
|
-
inputRef.value.value = "";
|
|
122
|
-
inputRef.value.click();
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
const handleKeydown = () => {
|
|
126
|
-
handleClick();
|
|
127
|
-
};
|
|
128
|
-
const abort = (file) => {
|
|
129
|
-
const _reqs = entriesOf(requests.value).filter(file ? ([uid]) => String(file.uid) === uid : () => true);
|
|
130
|
-
_reqs.forEach(([uid, req]) => {
|
|
131
|
-
if (req instanceof XMLHttpRequest)
|
|
132
|
-
req.abort();
|
|
133
|
-
delete requests.value[uid];
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
expose({
|
|
137
|
-
abort,
|
|
138
|
-
upload
|
|
139
|
-
});
|
|
140
|
-
return (_ctx, _cache) => {
|
|
141
|
-
return openBlock(), createElementBlock("div", {
|
|
142
|
-
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.listType), unref(ns).is("drag", _ctx.drag)]),
|
|
143
|
-
tabindex: "0",
|
|
144
|
-
onClick: handleClick,
|
|
145
|
-
onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"])
|
|
146
|
-
}, [
|
|
147
|
-
_ctx.drag ? (openBlock(), createBlock(UploadDragger, {
|
|
148
|
-
key: 0,
|
|
149
|
-
disabled: _ctx.disabled,
|
|
150
|
-
onFile: uploadFiles
|
|
151
|
-
}, {
|
|
152
|
-
default: withCtx(() => [
|
|
153
|
-
renderSlot(_ctx.$slots, "default")
|
|
154
|
-
]),
|
|
155
|
-
_: 3
|
|
156
|
-
}, 8, ["disabled"])) : renderSlot(_ctx.$slots, "default", { key: 1 }),
|
|
157
|
-
createElementVNode("input", {
|
|
158
|
-
ref_key: "inputRef",
|
|
159
|
-
ref: inputRef,
|
|
160
|
-
class: normalizeClass(unref(ns).e("input")),
|
|
161
|
-
name: _ctx.name,
|
|
162
|
-
multiple: _ctx.multiple,
|
|
163
|
-
accept: _ctx.accept,
|
|
164
|
-
type: "file",
|
|
165
|
-
onChange: handleChange,
|
|
166
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
167
|
-
}, ["stop"]))
|
|
168
|
-
}, null, 42, _hoisted_2)
|
|
169
|
-
], 42, _hoisted_1);
|
|
170
|
-
};
|
|
6
|
+
const uploadContentProps = buildProps({
|
|
7
|
+
...uploadBaseProps,
|
|
8
|
+
beforeUpload: {
|
|
9
|
+
type: definePropType(Function),
|
|
10
|
+
default: NOOP
|
|
11
|
+
},
|
|
12
|
+
onRemove: {
|
|
13
|
+
type: definePropType(Function),
|
|
14
|
+
default: NOOP
|
|
15
|
+
},
|
|
16
|
+
onStart: {
|
|
17
|
+
type: definePropType(Function),
|
|
18
|
+
default: NOOP
|
|
19
|
+
},
|
|
20
|
+
onSuccess: {
|
|
21
|
+
type: definePropType(Function),
|
|
22
|
+
default: NOOP
|
|
23
|
+
},
|
|
24
|
+
onProgress: {
|
|
25
|
+
type: definePropType(Function),
|
|
26
|
+
default: NOOP
|
|
27
|
+
},
|
|
28
|
+
onError: {
|
|
29
|
+
type: definePropType(Function),
|
|
30
|
+
default: NOOP
|
|
31
|
+
},
|
|
32
|
+
onExceed: {
|
|
33
|
+
type: definePropType(Function),
|
|
34
|
+
default: NOOP
|
|
171
35
|
}
|
|
172
36
|
});
|
|
173
|
-
var UploadContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);
|
|
174
37
|
|
|
175
|
-
export {
|
|
38
|
+
export { uploadContentProps };
|
|
176
39
|
//# sourceMappingURL=upload-content2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-content2.mjs","sources":["../../../../../../packages/components/upload/src/upload-content.
|
|
1
|
+
{"version":3,"file":"upload-content2.mjs","sources":["../../../../../../packages/components/upload/src/upload-content.ts"],"sourcesContent":["import { NOOP } from '@vue/shared'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { uploadBaseProps } from './upload'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type {\n UploadFile,\n UploadHooks,\n UploadProgressEvent,\n UploadRawFile,\n} from './upload'\nimport type UploadContent from './upload-content.vue'\nimport type { UploadAjaxError } from './ajax'\n\nexport const uploadContentProps = buildProps({\n ...uploadBaseProps,\n\n beforeUpload: {\n type: definePropType<UploadHooks['beforeUpload']>(Function),\n default: NOOP,\n },\n onRemove: {\n type: definePropType<\n (file: UploadFile | UploadRawFile, rawFile?: UploadRawFile) => void\n >(Function),\n default: NOOP,\n },\n onStart: {\n type: definePropType<(rawFile: UploadRawFile) => void>(Function),\n default: NOOP,\n },\n onSuccess: {\n type: definePropType<(response: any, rawFile: UploadRawFile) => unknown>(\n Function\n ),\n default: NOOP,\n },\n onProgress: {\n type: definePropType<\n (evt: UploadProgressEvent, rawFile: UploadRawFile) => void\n >(Function),\n default: NOOP,\n },\n onError: {\n type: definePropType<\n (err: UploadAjaxError, rawFile: UploadRawFile) => void\n >(Function),\n default: NOOP,\n },\n onExceed: {\n type: definePropType<UploadHooks['onExceed']>(Function),\n default: NOOP,\n },\n} as const)\n\nexport type UploadContentProps = ExtractPropTypes<typeof uploadContentProps>\n\nexport type UploadContentInstance = InstanceType<typeof UploadContent>\n"],"names":[],"mappings":";;;;;AAGY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,GAAG,eAAe;AACpB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,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,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,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 { defineComponent, useSlots, shallowRef, computed, onBeforeUnmount, provi
|
|
|
2
2
|
import '../../../tokens/index.mjs';
|
|
3
3
|
import '../../../hooks/index.mjs';
|
|
4
4
|
import UploadList from './upload-list2.mjs';
|
|
5
|
-
import UploadContent from './upload-
|
|
5
|
+
import UploadContent from './upload-content.mjs';
|
|
6
6
|
import { useHandlers } from './use-handlers.mjs';
|
|
7
7
|
import { uploadProps } from './upload.mjs';
|
|
8
8
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
package/es/index.mjs
CHANGED
|
@@ -71,7 +71,7 @@ export { iconProps } from './components/icon/src/icon.mjs';
|
|
|
71
71
|
export { ElIcon } from './components/icon/index.mjs';
|
|
72
72
|
export { imageEmits, imageProps } from './components/image/src/image.mjs';
|
|
73
73
|
export { ElImage } from './components/image/index.mjs';
|
|
74
|
-
export { imageViewerEmits, imageViewerProps } from './components/image-viewer/src/image-
|
|
74
|
+
export { imageViewerEmits, imageViewerProps } from './components/image-viewer/src/image-viewer2.mjs';
|
|
75
75
|
export { ElImageViewer } from './components/image-viewer/index.mjs';
|
|
76
76
|
export { inputEmits, inputProps } from './components/input/src/input.mjs';
|
|
77
77
|
export { ElInput } from './components/input/index.mjs';
|
|
@@ -166,7 +166,7 @@ export { ElTree } from './components/tree/index.mjs';
|
|
|
166
166
|
export { ElTreeSelect } from './components/tree-select/index.mjs';
|
|
167
167
|
export { ElTreeV2 } from './components/tree-v2/index.mjs';
|
|
168
168
|
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './components/upload/src/upload.mjs';
|
|
169
|
-
export { uploadContentProps } from './components/upload/src/upload-
|
|
169
|
+
export { uploadContentProps } from './components/upload/src/upload-content2.mjs';
|
|
170
170
|
export { uploadListEmits, uploadListProps } from './components/upload/src/upload-list.mjs';
|
|
171
171
|
export { uploadDraggerEmits, uploadDraggerProps } from './components/upload/src/upload-dragger.mjs';
|
|
172
172
|
export { ElUpload } from './components/upload/index.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20220816";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20220816'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -120,9 +120,9 @@ const useDialog = (props, targetRef) => {
|
|
|
120
120
|
closed.value = false;
|
|
121
121
|
open();
|
|
122
122
|
rendered.value = true;
|
|
123
|
-
emit("open");
|
|
124
123
|
zIndex.value = props.zIndex ? zIndex.value++ : nextZIndex();
|
|
125
124
|
vue.nextTick(() => {
|
|
125
|
+
emit("open");
|
|
126
126
|
if (targetRef.value) {
|
|
127
127
|
targetRef.value.scrollTop = 0;
|
|
128
128
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-dialog.js","sources":["../../../../../../packages/components/dialog/src/use-dialog.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n ref,\n watch,\n} from 'vue'\nimport { isClient, useTimeoutFn } from '@vueuse/core'\n\nimport {\n defaultNamespace,\n useGlobalConfig,\n useId,\n useLockscreen,\n useZIndex,\n} from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { addUnit } from '@element-plus/utils'\n\nimport type { CSSProperties, Ref, SetupContext } from 'vue'\nimport type { DialogEmits, DialogProps } from './dialog'\n\nexport const useDialog = (\n props: DialogProps,\n targetRef: Ref<HTMLElement | undefined>\n) => {\n const instance = getCurrentInstance()!\n const emit = instance.emit as SetupContext<DialogEmits>['emit']\n const { nextZIndex } = useZIndex()\n\n let lastPosition = ''\n const titleId = useId()\n const bodyId = useId()\n const visible = ref(false)\n const closed = ref(false)\n const rendered = ref(false) // when desctroyOnClose is true, we initialize it as false vise versa\n const zIndex = ref(props.zIndex || nextZIndex())\n\n let openTimer: (() => void) | undefined = undefined\n let closeTimer: (() => void) | undefined = undefined\n\n const namespace = useGlobalConfig('namespace', defaultNamespace)\n\n const style = computed<CSSProperties>(() => {\n const style: CSSProperties = {}\n const varPrefix = `--${namespace.value}-dialog` as const\n if (!props.fullscreen) {\n if (props.top) {\n style[`${varPrefix}-margin-top`] = props.top\n }\n if (props.width) {\n style[`${varPrefix}-width`] = addUnit(props.width)\n }\n }\n return style\n })\n\n function afterEnter() {\n emit('opened')\n }\n\n function afterLeave() {\n emit('closed')\n emit(UPDATE_MODEL_EVENT, false)\n if (props.destroyOnClose) {\n rendered.value = false\n }\n }\n\n function beforeLeave() {\n emit('close')\n }\n\n function open() {\n closeTimer?.()\n openTimer?.()\n\n if (props.openDelay && props.openDelay > 0) {\n ;({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay))\n } else {\n doOpen()\n }\n }\n\n function close() {\n openTimer?.()\n closeTimer?.()\n\n if (props.closeDelay && props.closeDelay > 0) {\n ;({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay))\n } else {\n doClose()\n }\n }\n\n function handleClose() {\n function hide(shouldCancel?: boolean) {\n if (shouldCancel) return\n closed.value = true\n visible.value = false\n }\n\n if (props.beforeClose) {\n props.beforeClose(hide)\n } else {\n close()\n }\n }\n\n function onModalClick() {\n if (props.closeOnClickModal) {\n handleClose()\n }\n }\n\n function doOpen() {\n if (!isClient) return\n visible.value = true\n }\n\n function doClose() {\n visible.value = false\n }\n\n function onOpenAutoFocus() {\n emit('openAutoFocus')\n }\n\n function onCloseAutoFocus() {\n emit('closeAutoFocus')\n }\n\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n function onCloseRequested() {\n if (props.closeOnPressEscape) {\n handleClose()\n }\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n if (val) {\n closed.value = false\n open()\n rendered.value = true // enables lazy rendering\n
|
|
1
|
+
{"version":3,"file":"use-dialog.js","sources":["../../../../../../packages/components/dialog/src/use-dialog.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n ref,\n watch,\n} from 'vue'\nimport { isClient, useTimeoutFn } from '@vueuse/core'\n\nimport {\n defaultNamespace,\n useGlobalConfig,\n useId,\n useLockscreen,\n useZIndex,\n} from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { addUnit } from '@element-plus/utils'\n\nimport type { CSSProperties, Ref, SetupContext } from 'vue'\nimport type { DialogEmits, DialogProps } from './dialog'\n\nexport const useDialog = (\n props: DialogProps,\n targetRef: Ref<HTMLElement | undefined>\n) => {\n const instance = getCurrentInstance()!\n const emit = instance.emit as SetupContext<DialogEmits>['emit']\n const { nextZIndex } = useZIndex()\n\n let lastPosition = ''\n const titleId = useId()\n const bodyId = useId()\n const visible = ref(false)\n const closed = ref(false)\n const rendered = ref(false) // when desctroyOnClose is true, we initialize it as false vise versa\n const zIndex = ref(props.zIndex || nextZIndex())\n\n let openTimer: (() => void) | undefined = undefined\n let closeTimer: (() => void) | undefined = undefined\n\n const namespace = useGlobalConfig('namespace', defaultNamespace)\n\n const style = computed<CSSProperties>(() => {\n const style: CSSProperties = {}\n const varPrefix = `--${namespace.value}-dialog` as const\n if (!props.fullscreen) {\n if (props.top) {\n style[`${varPrefix}-margin-top`] = props.top\n }\n if (props.width) {\n style[`${varPrefix}-width`] = addUnit(props.width)\n }\n }\n return style\n })\n\n function afterEnter() {\n emit('opened')\n }\n\n function afterLeave() {\n emit('closed')\n emit(UPDATE_MODEL_EVENT, false)\n if (props.destroyOnClose) {\n rendered.value = false\n }\n }\n\n function beforeLeave() {\n emit('close')\n }\n\n function open() {\n closeTimer?.()\n openTimer?.()\n\n if (props.openDelay && props.openDelay > 0) {\n ;({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay))\n } else {\n doOpen()\n }\n }\n\n function close() {\n openTimer?.()\n closeTimer?.()\n\n if (props.closeDelay && props.closeDelay > 0) {\n ;({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay))\n } else {\n doClose()\n }\n }\n\n function handleClose() {\n function hide(shouldCancel?: boolean) {\n if (shouldCancel) return\n closed.value = true\n visible.value = false\n }\n\n if (props.beforeClose) {\n props.beforeClose(hide)\n } else {\n close()\n }\n }\n\n function onModalClick() {\n if (props.closeOnClickModal) {\n handleClose()\n }\n }\n\n function doOpen() {\n if (!isClient) return\n visible.value = true\n }\n\n function doClose() {\n visible.value = false\n }\n\n function onOpenAutoFocus() {\n emit('openAutoFocus')\n }\n\n function onCloseAutoFocus() {\n emit('closeAutoFocus')\n }\n\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n function onCloseRequested() {\n if (props.closeOnPressEscape) {\n handleClose()\n }\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n if (val) {\n closed.value = false\n open()\n rendered.value = true // enables lazy rendering\n zIndex.value = props.zIndex ? zIndex.value++ : nextZIndex()\n // this.$el.addEventListener('scroll', this.updatePopper)\n nextTick(() => {\n emit('open')\n if (targetRef.value) {\n targetRef.value.scrollTop = 0\n }\n })\n } else {\n // this.$el.removeEventListener('scroll', this.updatePopper\n if (visible.value) {\n close()\n }\n }\n }\n )\n\n watch(\n () => props.fullscreen,\n (val) => {\n if (!targetRef.value) return\n if (val) {\n lastPosition = targetRef.value.style.transform\n targetRef.value.style.transform = ''\n } else {\n targetRef.value.style.transform = lastPosition\n }\n }\n )\n\n onMounted(() => {\n if (props.modelValue) {\n visible.value = true\n rendered.value = true // enables lazy rendering\n open()\n }\n })\n\n return {\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n close,\n doClose,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onCloseRequested,\n titleId,\n bodyId,\n closed,\n style,\n rendered,\n visible,\n zIndex,\n }\n}\n"],"names":["getCurrentInstance","useZIndex","useId","ref","useGlobalConfig","defaultNamespace","style","computed","addUnit","UPDATE_MODEL_EVENT","useTimeoutFn","isClient","useLockscreen","watch","nextTick","onMounted"],"mappings":";;;;;;;;;;;;;;;;;AAkBY,MAAC,SAAS,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK;AAC/C,EAAE,MAAM,QAAQ,GAAGA,sBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC7B,EAAE,MAAM,EAAE,UAAU,EAAE,GAAGC,eAAS,EAAE,CAAC;AACrC,EAAE,IAAI,YAAY,GAAG,EAAE,CAAC;AACxB,EAAE,MAAM,OAAO,GAAGC,aAAK,EAAE,CAAC;A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,CAAC;AACb,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,UAAU;AACd,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,KAAK;AACT,IAAI,OAAO;AACX,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,OAAO;AACX,IAAI,MAAM;AACV,IAAI,MAAM;AACV,WAAIT,OAAK;AACT,IAAI,QAAQ;AACZ,IAAI,OAAO;AACX,IAAI,MAAM;AACV,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var imageViewer$1 = require('./src/image-
|
|
7
|
-
var imageViewer = require('./src/image-
|
|
6
|
+
var imageViewer$1 = require('./src/image-viewer.js');
|
|
7
|
+
var imageViewer = require('./src/image-viewer2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElImageViewer = install.withInstall(imageViewer$1["default"]);
|