@element-plus/nightly 0.0.20221021 → 0.0.20221022
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.css +1 -1
- package/dist/index.full.js +42 -44
- package/dist/index.full.min.js +9 -9
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +14 -14
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +42 -44
- 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/calendar/index.d.ts +1 -1
- package/es/components/calendar/src/calendar.vue.d.ts +3 -3
- package/es/components/calendar/src/calendar2.mjs +7 -3
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/use-calendar.d.ts +0 -2
- package/es/components/calendar/src/use-calendar.mjs +30 -35
- package/es/components/calendar/src/use-calendar.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/pagination/src/components/next.mjs +19 -34
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +34 -19
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popover/style/css.d.ts +1 -1
- package/es/components/popover/style/css.mjs +1 -1
- package/es/components/popover/style/index.d.ts +1 -1
- package/es/components/popover/style/index.mjs +1 -1
- package/es/components/select-v2/index.d.ts +2 -2
- package/es/components/select-v2/src/select.vue.d.ts +1 -1
- package/es/components/select-v2/src/useSelect.d.ts +1 -1
- package/es/components/select-v2/src/useSelect.mjs +5 -5
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +131 -19
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +19 -131
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/upload/index.mjs +3 -3
- package/es/components/upload/src/upload-content.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +2 -2
- package/es/components/upload/src/upload-dragger.mjs +70 -11
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +11 -70
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +1 -1
- package/es/components/upload/src/upload.mjs +120 -105
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +105 -120
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.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/calendar/index.d.ts +1 -1
- package/lib/components/calendar/src/calendar.vue.d.ts +3 -3
- package/lib/components/calendar/src/calendar2.js +11 -7
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/use-calendar.d.ts +0 -2
- package/lib/components/calendar/src/use-calendar.js +30 -35
- package/lib/components/calendar/src/use-calendar.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/pagination/src/components/next.js +19 -34
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +34 -19
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popover/style/css.d.ts +1 -1
- package/lib/components/popover/style/css.js +1 -1
- package/lib/components/popover/style/index.d.ts +1 -1
- package/lib/components/popover/style/index.js +1 -1
- package/lib/components/select-v2/index.d.ts +2 -2
- package/lib/components/select-v2/src/select.vue.d.ts +1 -1
- package/lib/components/select-v2/src/useSelect.d.ts +1 -1
- package/lib/components/select-v2/src/useSelect.js +5 -5
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +131 -21
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +21 -131
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/upload/index.js +3 -3
- package/lib/components/upload/src/upload-content.js +1 -1
- package/lib/components/upload/src/upload-content2.js +2 -2
- package/lib/components/upload/src/upload-dragger.js +70 -12
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +12 -70
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +1 -1
- package/lib/components/upload/src/upload.js +120 -108
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +108 -120
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.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/tags.json +1 -1
- package/theme-chalk/el-popover.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/popover.scss +10 -1
- package/web-types.json +1 -1
|
@@ -1,126 +1,111 @@
|
|
|
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 { useDisabled } from '../../../hooks/use-common-props/index.mjs';
|
|
10
|
-
import { uploadContextKey } from '../../../tokens/upload.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';
|
|
11
6
|
|
|
12
|
-
const
|
|
13
|
-
|
|
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: Object,
|
|
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
|
+
type: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "select"
|
|
50
|
+
},
|
|
51
|
+
fileList: {
|
|
52
|
+
type: definePropType(Array),
|
|
53
|
+
default: () => mutable([])
|
|
54
|
+
},
|
|
55
|
+
autoUpload: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
59
|
+
listType: {
|
|
60
|
+
type: String,
|
|
61
|
+
values: uploadListTypes,
|
|
62
|
+
default: "text"
|
|
63
|
+
},
|
|
64
|
+
httpRequest: {
|
|
65
|
+
type: definePropType(Function),
|
|
66
|
+
default: ajaxUpload
|
|
67
|
+
},
|
|
68
|
+
disabled: Boolean,
|
|
69
|
+
limit: Number
|
|
14
70
|
});
|
|
15
|
-
const
|
|
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
|
-
|
|
51
|
-
accept: toRef(props, "accept")
|
|
52
|
-
});
|
|
53
|
-
expose({
|
|
54
|
-
abort,
|
|
55
|
-
submit,
|
|
56
|
-
clearFiles,
|
|
57
|
-
handleStart,
|
|
58
|
-
handleRemove
|
|
59
|
-
});
|
|
60
|
-
return (_ctx, _cache) => {
|
|
61
|
-
return openBlock(), createElementBlock("div", null, [
|
|
62
|
-
unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
|
|
63
|
-
key: 0,
|
|
64
|
-
disabled: unref(disabled),
|
|
65
|
-
"list-type": _ctx.listType,
|
|
66
|
-
files: unref(uploadFiles),
|
|
67
|
-
"handle-preview": _ctx.onPreview,
|
|
68
|
-
onRemove: unref(handleRemove)
|
|
69
|
-
}, createSlots({
|
|
70
|
-
append: withCtx(() => [
|
|
71
|
-
createVNode(UploadContent, mergeProps({
|
|
72
|
-
ref_key: "uploadRef",
|
|
73
|
-
ref: uploadRef
|
|
74
|
-
}, unref(uploadContentProps)), {
|
|
75
|
-
default: withCtx(() => [
|
|
76
|
-
unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
|
|
77
|
-
!unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
|
|
78
|
-
]),
|
|
79
|
-
_: 3
|
|
80
|
-
}, 16)
|
|
81
|
-
]),
|
|
82
|
-
_: 2
|
|
83
|
-
}, [
|
|
84
|
-
_ctx.$slots.file ? {
|
|
85
|
-
name: "default",
|
|
86
|
-
fn: withCtx(({ file }) => [
|
|
87
|
-
renderSlot(_ctx.$slots, "file", { file })
|
|
88
|
-
])
|
|
89
|
-
} : void 0
|
|
90
|
-
]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true),
|
|
91
|
-
!unref(isPictureCard) || unref(isPictureCard) && !_ctx.showFileList ? (openBlock(), createBlock(UploadContent, mergeProps({
|
|
92
|
-
key: 1,
|
|
93
|
-
ref_key: "uploadRef",
|
|
94
|
-
ref: uploadRef
|
|
95
|
-
}, unref(uploadContentProps)), {
|
|
96
|
-
default: withCtx(() => [
|
|
97
|
-
unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
|
|
98
|
-
!unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
|
|
99
|
-
]),
|
|
100
|
-
_: 3
|
|
101
|
-
}, 16)) : createCommentVNode("v-if", true),
|
|
102
|
-
_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true),
|
|
103
|
-
renderSlot(_ctx.$slots, "tip"),
|
|
104
|
-
!unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
|
|
105
|
-
key: 3,
|
|
106
|
-
disabled: unref(disabled),
|
|
107
|
-
"list-type": _ctx.listType,
|
|
108
|
-
files: unref(uploadFiles),
|
|
109
|
-
"handle-preview": _ctx.onPreview,
|
|
110
|
-
onRemove: unref(handleRemove)
|
|
111
|
-
}, createSlots({ _: 2 }, [
|
|
112
|
-
_ctx.$slots.file ? {
|
|
113
|
-
name: "default",
|
|
114
|
-
fn: withCtx(({ file }) => [
|
|
115
|
-
renderSlot(_ctx.$slots, "file", { file })
|
|
116
|
-
])
|
|
117
|
-
} : void 0
|
|
118
|
-
]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true)
|
|
119
|
-
]);
|
|
120
|
-
};
|
|
71
|
+
const uploadProps = buildProps({
|
|
72
|
+
...uploadBaseProps,
|
|
73
|
+
beforeUpload: {
|
|
74
|
+
type: definePropType(Function),
|
|
75
|
+
default: NOOP
|
|
76
|
+
},
|
|
77
|
+
beforeRemove: {
|
|
78
|
+
type: definePropType(Function)
|
|
79
|
+
},
|
|
80
|
+
onRemove: {
|
|
81
|
+
type: definePropType(Function),
|
|
82
|
+
default: NOOP
|
|
83
|
+
},
|
|
84
|
+
onChange: {
|
|
85
|
+
type: definePropType(Function),
|
|
86
|
+
default: NOOP
|
|
87
|
+
},
|
|
88
|
+
onPreview: {
|
|
89
|
+
type: definePropType(Function),
|
|
90
|
+
default: NOOP
|
|
91
|
+
},
|
|
92
|
+
onSuccess: {
|
|
93
|
+
type: definePropType(Function),
|
|
94
|
+
default: NOOP
|
|
95
|
+
},
|
|
96
|
+
onProgress: {
|
|
97
|
+
type: definePropType(Function),
|
|
98
|
+
default: NOOP
|
|
99
|
+
},
|
|
100
|
+
onError: {
|
|
101
|
+
type: definePropType(Function),
|
|
102
|
+
default: NOOP
|
|
103
|
+
},
|
|
104
|
+
onExceed: {
|
|
105
|
+
type: definePropType(Function),
|
|
106
|
+
default: NOOP
|
|
121
107
|
}
|
|
122
108
|
});
|
|
123
|
-
var Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]);
|
|
124
109
|
|
|
125
|
-
export {
|
|
110
|
+
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps };
|
|
126
111
|
//# 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'\n\nimport type { UploadAjaxError } from './ajax'\nimport type { Awaitable } from '@element-plus/utils'\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: File\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 const uploadBaseProps = buildProps({\n action: {\n type: String,\n default: '#',\n },\n headers: {\n type: definePropType<Headers | Record<string, any>>(Object),\n },\n method: {\n type: String,\n default: 'post',\n },\n data: {\n type: Object,\n default: () => mutable({} as const),\n },\n multiple: {\n type: Boolean,\n default: false,\n },\n name: {\n type: String,\n default: 'file',\n },\n drag: {\n type: Boolean,\n default: false,\n },\n withCredentials: Boolean,\n showFileList: {\n type: Boolean,\n default: true,\n },\n accept: {\n type: String,\n default: '',\n },\n type: {\n type: String,\n default: 'select',\n },\n fileList: {\n type: definePropType<UploadUserFile[]>(Array),\n default: () => mutable([] as const),\n },\n autoUpload: {\n type: Boolean,\n default: true,\n },\n listType: {\n type: String,\n values: uploadListTypes,\n default: 'text',\n },\n httpRequest: {\n type: definePropType<UploadRequestHandler>(Function),\n default: ajaxUpload,\n },\n disabled: Boolean,\n limit: Number,\n} as const)\n\nexport const uploadProps = buildProps({\n ...uploadBaseProps,\n beforeUpload: {\n type: definePropType<UploadHooks['beforeUpload']>(Function),\n default: NOOP,\n },\n beforeRemove: {\n type: definePropType<UploadHooks['beforeRemove']>(Function),\n },\n onRemove: {\n type: definePropType<UploadHooks['onRemove']>(Function),\n default: NOOP,\n },\n onChange: {\n type: definePropType<UploadHooks['onChange']>(Function),\n default: NOOP,\n },\n onPreview: {\n type: definePropType<UploadHooks['onPreview']>(Function),\n default: NOOP,\n },\n onSuccess: {\n type: definePropType<UploadHooks['onSuccess']>(Function),\n default: NOOP,\n },\n onProgress: {\n type: definePropType<UploadHooks['onProgress']>(Function),\n default: NOOP,\n },\n onError: {\n type: definePropType<UploadHooks['onError']>(Function),\n default: NOOP,\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,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG;AACzC,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,M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IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { watch } from 'vue';
|
|
2
2
|
import { useVModel } from '@vueuse/core';
|
|
3
3
|
import '../../../utils/index.mjs';
|
|
4
|
-
import { genFileId } from './
|
|
4
|
+
import { genFileId } from './upload2.mjs';
|
|
5
5
|
import { debugWarn, throwError } from '../../../utils/error.mjs';
|
|
6
6
|
|
|
7
7
|
const SCOPE = "ElUpload";
|
package/es/index.mjs
CHANGED
|
@@ -168,10 +168,10 @@ export { ElTransfer } from './components/transfer/index.mjs';
|
|
|
168
168
|
export { ElTree } from './components/tree/index.mjs';
|
|
169
169
|
export { ElTreeSelect } from './components/tree-select/index.mjs';
|
|
170
170
|
export { ElTreeV2 } from './components/tree-v2/index.mjs';
|
|
171
|
-
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './components/upload/src/
|
|
171
|
+
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './components/upload/src/upload2.mjs';
|
|
172
172
|
export { uploadContentProps } from './components/upload/src/upload-content.mjs';
|
|
173
173
|
export { uploadListEmits, uploadListProps } from './components/upload/src/upload-list.mjs';
|
|
174
|
-
export { uploadDraggerEmits, uploadDraggerProps } from './components/upload/src/upload-
|
|
174
|
+
export { uploadDraggerEmits, uploadDraggerProps } from './components/upload/src/upload-dragger2.mjs';
|
|
175
175
|
export { ElUpload } from './components/upload/index.mjs';
|
|
176
176
|
export { default as FixedSizeList } from './components/virtual-list/src/components/fixed-size-list.mjs';
|
|
177
177
|
export { default as DynamicSizeList } from './components/virtual-list/src/components/dynamic-size-list.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20221022";
|
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.20221022'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -54,9 +54,9 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
54
54
|
pickDay: (day: import("dayjs").Dayjs) => void;
|
|
55
55
|
realSelectedDay: import("vue").WritableComputedRef<import("dayjs").Dayjs | undefined>;
|
|
56
56
|
selectDate: (type: import("./src/calendar").CalendarDateType) => void;
|
|
57
|
+
validatedRange: import("vue").ComputedRef<[import("dayjs").Dayjs, import("dayjs").Dayjs][]>;
|
|
57
58
|
t: import("../..").Translator;
|
|
58
59
|
i18nDate: import("vue").ComputedRef<string>;
|
|
59
|
-
validatedRange: import("vue").ComputedRef<[import("dayjs").Dayjs, import("dayjs").Dayjs][]>;
|
|
60
60
|
ElButton: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
61
61
|
readonly size: {
|
|
62
62
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -54,9 +54,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
pickDay: (day: import("dayjs").Dayjs) => void;
|
|
55
55
|
realSelectedDay: import("vue").WritableComputedRef<import("dayjs").Dayjs | undefined>;
|
|
56
56
|
selectDate: (type: import("./calendar").CalendarDateType) => void;
|
|
57
|
+
validatedRange: import("vue").ComputedRef<[import("dayjs").Dayjs, import("dayjs").Dayjs][]>;
|
|
57
58
|
t: import("element-plus/es/hooks").Translator;
|
|
58
59
|
i18nDate: import("vue").ComputedRef<string>;
|
|
59
|
-
validatedRange: import("vue").ComputedRef<[import("dayjs").Dayjs, import("dayjs").Dayjs][]>;
|
|
60
60
|
ElButton: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
61
61
|
readonly size: {
|
|
62
62
|
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -118,7 +118,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
118
118
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
119
119
|
}>>;
|
|
120
120
|
emit: (event: "click", evt: MouseEvent) => void;
|
|
121
|
-
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
121
|
+
buttonStyle: import("vue").ComputedRef<Record<string, string>>; /** @description currently selected date */
|
|
122
122
|
ns: {
|
|
123
123
|
namespace: import("vue").Ref<string>;
|
|
124
124
|
b: (blockSuffix?: string) => string;
|
|
@@ -411,7 +411,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
411
411
|
isInRange: import("vue").ComputedRef<boolean>;
|
|
412
412
|
now: import("dayjs").Dayjs;
|
|
413
413
|
rows: import("vue").ComputedRef<import("./date-table").CalendarDateCell[][]>;
|
|
414
|
-
weekDays: import("vue").ComputedRef<string[]>;
|
|
414
|
+
weekDays: import("vue").ComputedRef<string[]>; /** @description Calculate the validate date range according to the start and end dates */
|
|
415
415
|
getFormattedDate: (day: number, type: import("./date-table").CalendarDateCellType) => import("dayjs").Dayjs;
|
|
416
416
|
handlePickDay: ({ text, type }: import("./date-table").CalendarDateCell) => void;
|
|
417
417
|
getSlotData: ({ text, type }: import("./date-table").CalendarDateCell) => {
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var index$
|
|
6
|
+
var index$2 = require('../../button/index.js');
|
|
7
7
|
require('../../../hooks/index.js');
|
|
8
8
|
var dateTable = require('./date-table2.js');
|
|
9
9
|
var useCalendar = require('./use-calendar.js');
|
|
10
10
|
var calendar = require('./calendar.js');
|
|
11
11
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
12
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
|
+
var index$1 = require('../../../hooks/use-locale/index.js');
|
|
13
14
|
|
|
14
15
|
const COMPONENT_NAME = "ElCalendar";
|
|
15
16
|
const __default__ = vue.defineComponent({
|
|
@@ -28,10 +29,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
28
29
|
pickDay,
|
|
29
30
|
realSelectedDay,
|
|
30
31
|
selectDate,
|
|
31
|
-
t,
|
|
32
|
-
i18nDate,
|
|
33
32
|
validatedRange
|
|
34
33
|
} = useCalendar.useCalendar(props, emit, COMPONENT_NAME);
|
|
34
|
+
const { t } = index$1.useLocale();
|
|
35
|
+
const i18nDate = vue.computed(() => {
|
|
36
|
+
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
37
|
+
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
38
|
+
});
|
|
35
39
|
expose({
|
|
36
40
|
selectedDay: realSelectedDay,
|
|
37
41
|
pickDay,
|
|
@@ -53,9 +57,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
57
|
key: 0,
|
|
54
58
|
class: vue.normalizeClass(vue.unref(ns).e("button-group"))
|
|
55
59
|
}, [
|
|
56
|
-
vue.createVNode(vue.unref(index$
|
|
60
|
+
vue.createVNode(vue.unref(index$2.ElButtonGroup), null, {
|
|
57
61
|
default: vue.withCtx(() => [
|
|
58
|
-
vue.createVNode(vue.unref(index$
|
|
62
|
+
vue.createVNode(vue.unref(index$2.ElButton), {
|
|
59
63
|
size: "small",
|
|
60
64
|
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(selectDate)("prev-month"))
|
|
61
65
|
}, {
|
|
@@ -64,7 +68,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
64
68
|
]),
|
|
65
69
|
_: 1
|
|
66
70
|
}),
|
|
67
|
-
vue.createVNode(vue.unref(index$
|
|
71
|
+
vue.createVNode(vue.unref(index$2.ElButton), {
|
|
68
72
|
size: "small",
|
|
69
73
|
onClick: _cache[1] || (_cache[1] = ($event) => vue.unref(selectDate)("today"))
|
|
70
74
|
}, {
|
|
@@ -73,7 +77,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
73
77
|
]),
|
|
74
78
|
_: 1
|
|
75
79
|
}),
|
|
76
|
-
vue.createVNode(vue.unref(index$
|
|
80
|
+
vue.createVNode(vue.unref(index$2.ElButton), {
|
|
77
81
|
size: "small",
|
|
78
82
|
onClick: _cache[2] || (_cache[2] = ($event) => vue.unref(selectDate)("next-month"))
|
|
79
83
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar2.js","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport DateTable from './date-table.vue'\nimport { useCalendar } from './use-calendar'\nimport { calendarEmits, calendarProps } from './calendar'\n\nconst ns = useNamespace('calendar')\n\nconst COMPONENT_NAME = 'ElCalendar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst {\n calculateValidatedDateRange,\n date,\n pickDay,\n realSelectedDay,\n selectDate,\n
|
|
1
|
+
{"version":3,"file":"calendar2.js","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template\n v-if=\"$slots['date-cell'] || $slots.dateCell\"\n #date-cell=\"data\"\n >\n <slot v-if=\"$slots['date-cell']\" name=\"date-cell\" v-bind=\"data\" />\n <slot v-else name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\n\nimport DateTable from './date-table.vue'\nimport { useCalendar } from './use-calendar'\nimport { calendarEmits, calendarProps } from './calendar'\n\nconst ns = useNamespace('calendar')\n\nconst COMPONENT_NAME = 'ElCalendar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst {\n calculateValidatedDateRange,\n date,\n pickDay,\n realSelectedDay,\n selectDate,\n validatedRange,\n} = useCalendar(props, emit, COMPONENT_NAME)\n\nconst { t } = useLocale()\n\nconst i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n})\n\ndefineExpose({\n /** @description currently selected date */\n selectedDay: realSelectedDay,\n /** @description select a specific date */\n pickDay,\n /** @description select date */\n selectDate,\n /** @description Calculate the validate date range according to the start and end dates */\n calculateValidatedDateRange,\n})\n</script>\n"],"names":["useNamespace","useCalendar","useLocale","computed"],"mappings":";;;;;;;;;;;;;;;uCAiEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AALA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAUlC,IAAM,MAAA;AAAA,MACJ,2BAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,KACE,GAAAC,uBAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAE3C,IAAM,MAAA,EAAE,MAAMC,iBAAU,EAAA,CAAA;AAExB,IAAM,MAAA,QAAA,GAAWC,aAAS,MAAM;AAC9B,MAAA,MAAM,WAAc,GAAA,CAAA,mBAAA,EAAsB,IAAK,CAAA,KAAA,CAAM,OAAO,GAAG,CAAA,CAAA,CAAA,CAAA;AAC/D,MAAO,OAAA,CAAA,EAAG,KAAK,KAAM,CAAA,IAAA,MAAU,CAAE,CAAA,oBAAoB,CAAK,CAAA,CAAA,EAAA,CAAA,CAAE,WAAW,CAAA,CAAA,CAAA,CAAA;AAAA,KACxE,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,WAAa,EAAA,eAAA;AAAA,MAEb,OAAA;AAAA,MAEA,UAAA;AAAA,MAEA,2BAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,6 +9,4 @@ export declare const useCalendar: (props: CalendarProps, emit: SetupContext<Cale
|
|
|
9
9
|
pickDay: (day: Dayjs) => void;
|
|
10
10
|
selectDate: (type: CalendarDateType) => void;
|
|
11
11
|
validatedRange: ComputedRef<[dayjs.Dayjs, dayjs.Dayjs][]>;
|
|
12
|
-
t: import("element-plus/es/hooks").Translator;
|
|
13
|
-
i18nDate: ComputedRef<string>;
|
|
14
12
|
};
|
|
@@ -16,9 +16,32 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
16
|
|
|
17
17
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
18
18
|
|
|
19
|
+
const adjacentMonth = (start, end) => {
|
|
20
|
+
const firstMonthLastDay = start.endOf("month");
|
|
21
|
+
const lastMonthFirstDay = end.startOf("month");
|
|
22
|
+
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
|
|
23
|
+
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
24
|
+
return [
|
|
25
|
+
[start, firstMonthLastDay],
|
|
26
|
+
[lastMonthStartDay.startOf("week"), end]
|
|
27
|
+
];
|
|
28
|
+
};
|
|
29
|
+
const threeConsecutiveMonth = (start, end) => {
|
|
30
|
+
const firstMonthLastDay = start.endOf("month");
|
|
31
|
+
const secondMonthFirstDay = start.add(1, "month").startOf("month");
|
|
32
|
+
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
|
|
33
|
+
const secondMonthLastDay = secondMonthStartDay.endOf("month");
|
|
34
|
+
const lastMonthFirstDay = end.startOf("month");
|
|
35
|
+
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
36
|
+
return [
|
|
37
|
+
[start, firstMonthLastDay],
|
|
38
|
+
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
|
|
39
|
+
[lastMonthStartDay.startOf("week"), end]
|
|
40
|
+
];
|
|
41
|
+
};
|
|
19
42
|
const useCalendar = (props, emit, componentName) => {
|
|
20
|
-
const
|
|
21
|
-
const {
|
|
43
|
+
const slots = vue.useSlots();
|
|
44
|
+
const { lang } = index.useLocale();
|
|
22
45
|
const selectedDay = vue.ref();
|
|
23
46
|
const now = dayjs__default["default"]().locale(lang.value);
|
|
24
47
|
const realSelectedDay = vue.computed({
|
|
@@ -57,12 +80,7 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
57
80
|
});
|
|
58
81
|
const date = vue.computed(() => {
|
|
59
82
|
if (!props.modelValue) {
|
|
60
|
-
|
|
61
|
-
return realSelectedDay.value;
|
|
62
|
-
} else if (validatedRange.value.length) {
|
|
63
|
-
return validatedRange.value[0][0];
|
|
64
|
-
}
|
|
65
|
-
return now;
|
|
83
|
+
return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now);
|
|
66
84
|
} else {
|
|
67
85
|
return dayjs__default["default"](props.modelValue).locale(lang.value);
|
|
68
86
|
}
|
|
@@ -71,10 +89,6 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
71
89
|
const nextMonthDayjs = vue.computed(() => date.value.add(1, "month").date(1));
|
|
72
90
|
const prevYearDayjs = vue.computed(() => date.value.subtract(1, "year").date(1));
|
|
73
91
|
const nextYearDayjs = vue.computed(() => date.value.add(1, "year").date(1));
|
|
74
|
-
const i18nDate = vue.computed(() => {
|
|
75
|
-
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
76
|
-
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
77
|
-
});
|
|
78
92
|
const calculateValidatedDateRange = (startDayjs, endDayjs) => {
|
|
79
93
|
const firstDay = startDayjs.startOf("week");
|
|
80
94
|
const lastDay = endDayjs.endOf("week");
|
|
@@ -83,26 +97,9 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
83
97
|
if (firstMonth === lastMonth) {
|
|
84
98
|
return [[firstDay, lastDay]];
|
|
85
99
|
} else if (firstMonth + 1 === lastMonth) {
|
|
86
|
-
|
|
87
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
88
|
-
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
|
|
89
|
-
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
90
|
-
return [
|
|
91
|
-
[firstDay, firstMonthLastDay],
|
|
92
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
93
|
-
];
|
|
100
|
+
return adjacentMonth(firstDay, lastDay);
|
|
94
101
|
} else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) {
|
|
95
|
-
|
|
96
|
-
const secondMonthFirstDay = firstDay.add(1, "month").startOf("month");
|
|
97
|
-
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
|
|
98
|
-
const secondMonthLastDay = secondMonthStartDay.endOf("month");
|
|
99
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
100
|
-
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
101
|
-
return [
|
|
102
|
-
[firstDay, firstMonthLastDay],
|
|
103
|
-
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
|
|
104
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
105
|
-
];
|
|
102
|
+
return threeConsecutiveMonth(firstDay, lastDay);
|
|
106
103
|
} else {
|
|
107
104
|
error.debugWarn(componentName, "start time and end time interval must not exceed two months");
|
|
108
105
|
return [];
|
|
@@ -131,16 +128,14 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
131
128
|
version: "2.3.0",
|
|
132
129
|
ref: "https://element-plus.org/en-US/component/calendar.html#slots",
|
|
133
130
|
type: "Slot"
|
|
134
|
-
}, vue.computed(() => !!
|
|
131
|
+
}, vue.computed(() => !!slots.dateCell));
|
|
135
132
|
return {
|
|
136
133
|
calculateValidatedDateRange,
|
|
137
134
|
date,
|
|
138
135
|
realSelectedDay,
|
|
139
136
|
pickDay,
|
|
140
137
|
selectDate,
|
|
141
|
-
validatedRange
|
|
142
|
-
t,
|
|
143
|
-
i18nDate
|
|
138
|
+
validatedRange
|
|
144
139
|
};
|
|
145
140
|
};
|
|
146
141
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-calendar.js","sources":["../../../../../../packages/components/calendar/src/use-calendar.ts"],"sourcesContent":["import { computed, ref, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { useDeprecated, useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { CalendarDateType, CalendarEmits, CalendarProps } from './calendar'\n\nexport const useCalendar = (\n props: CalendarProps,\n emit: SetupContext<CalendarEmits>['emit'],\n componentName: string\n) => {\n const solts = useSlots()\n const { t, lang } = useLocale()\n\n const selectedDay = ref<Dayjs>()\n const now = dayjs().locale(lang.value)\n\n const realSelectedDay = computed<Dayjs | undefined>({\n get() {\n if (!props.modelValue) return selectedDay.value\n return date.value\n },\n set(val) {\n if (!val) return\n selectedDay.value = val\n const result = val.toDate()\n\n emit(INPUT_EVENT, result)\n emit(UPDATE_MODEL_EVENT, result)\n },\n })\n\n // if range is valid, we get a two-digit array\n const validatedRange = computed(() => {\n if (!props.range) return []\n const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value))\n const [startDayjs, endDayjs] = rangeArrDayjs\n if (startDayjs.isAfter(endDayjs)) {\n debugWarn(componentName, 'end time should be greater than start time')\n return []\n }\n if (startDayjs.isSame(endDayjs, 'month')) {\n // same month\n return calculateValidatedDateRange(startDayjs, endDayjs)\n } else {\n // two months\n if (startDayjs.add(1, 'month').month() !== endDayjs.month()) {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n return calculateValidatedDateRange(startDayjs, endDayjs)\n }\n })\n\n const date: ComputedRef<Dayjs> = computed(() => {\n if (!props.modelValue) {\n if (realSelectedDay.value) {\n return realSelectedDay.value\n } else if (validatedRange.value.length) {\n return validatedRange.value[0][0]\n }\n return now\n } else {\n return dayjs(props.modelValue).locale(lang.value)\n }\n })\n const prevMonthDayjs = computed(() => date.value.subtract(1, 'month').date(1))\n const nextMonthDayjs = computed(() => date.value.add(1, 'month').date(1))\n const prevYearDayjs = computed(() => date.value.subtract(1, 'year').date(1))\n const nextYearDayjs = computed(() => date.value.add(1, 'year').date(1))\n\n const i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n })\n\n // https://github.com/element-plus/element-plus/issues/3155\n // Calculate the validate date range according to the start and end dates\n const calculateValidatedDateRange = (\n startDayjs: Dayjs,\n endDayjs: Dayjs\n ): [Dayjs, Dayjs][] => {\n const firstDay = startDayjs.startOf('week')\n const lastDay = endDayjs.endOf('week')\n const firstMonth = firstDay.get('month')\n const lastMonth = lastDay.get('month')\n\n // Current mouth\n if (firstMonth === lastMonth) {\n return [[firstDay, lastDay]]\n }\n // Two adjacent months\n else if (firstMonth + 1 === lastMonth) {\n const firstMonthLastDay = firstDay.endOf('month')\n const lastMonthFirstDay = lastDay.startOf('month')\n\n // Whether the last day of the first month and the first day of the last month is in the same week\n const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, 'week')\n const lastMonthStartDay = isSameWeek\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [firstDay, firstMonthLastDay],\n [lastMonthStartDay.startOf('week'), lastDay],\n ]\n }\n // Three consecutive months (compatible: 2021-01-30 to 2021-02-28)\n else if (\n firstMonth + 2 === lastMonth ||\n (firstMonth + 1) % 11 === lastMonth\n ) {\n const firstMonthLastDay = firstDay.endOf('month')\n const secondMonthFirstDay = firstDay.add(1, 'month').startOf('month')\n\n // Whether the last day of the first month and the second month is in the same week\n const secondMonthStartDay = firstMonthLastDay.isSame(\n secondMonthFirstDay,\n 'week'\n )\n ? secondMonthFirstDay.add(1, 'week')\n : secondMonthFirstDay\n\n const secondMonthLastDay = secondMonthStartDay.endOf('month')\n const lastMonthFirstDay = lastDay.startOf('month')\n\n // Whether the last day of the second month and the last day of the last month is in the same week\n const lastMonthStartDay = secondMonthLastDay.isSame(\n lastMonthFirstDay,\n 'week'\n )\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [firstDay, firstMonthLastDay],\n [secondMonthStartDay.startOf('week'), secondMonthLastDay],\n [lastMonthStartDay.startOf('week'), lastDay],\n ]\n }\n // Other cases\n else {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n }\n\n const pickDay = (day: Dayjs) => {\n realSelectedDay.value = day\n }\n\n const selectDate = (type: CalendarDateType) => {\n const dateMap: Record<CalendarDateType, Dayjs> = {\n 'prev-month': prevMonthDayjs.value,\n 'next-month': nextMonthDayjs.value,\n 'prev-year': prevYearDayjs.value,\n 'next-year': nextYearDayjs.value,\n today: now,\n }\n\n const day = dateMap[type]\n\n if (!day.isSame(date.value, 'day')) {\n pickDay(day)\n }\n }\n\n useDeprecated(\n {\n from: '\"dateCell\"',\n replacement: '\"date-cell\"',\n scope: 'ElCalendar',\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/calendar.html#slots',\n type: 'Slot',\n },\n computed(() => !!solts.dateCell)\n )\n\n return {\n calculateValidatedDateRange,\n date,\n realSelectedDay,\n pickDay,\n selectDate,\n validatedRange,\n t,\n i18nDate,\n }\n}\n"],"names":["useSlots","useLocale","ref","dayjs","computed","INPUT_EVENT","UPDATE_MODEL_EVENT","debugWarn","useDeprecated"],"mappings":";;;;;;;;;;;;;;;;;;AAKY,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC3D,EAAE,MAAM,KAAK,GAAGA,YAAQ,EAAE,CAAC;AAC3B,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAGC,eAAS,EAAE,CAAC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E,OAAO;AACpB,IAAI,GAAG,EAAE,8DAA8D;AACvE,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG,EAAEJ,YAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AACvC,EAAE,OAAO;AACT,IAAI,2BAA2B;AAC/B,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,CAAC;AACL,IAAI,QAAQ;AACZ,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"use-calendar.js","sources":["../../../../../../packages/components/calendar/src/use-calendar.ts"],"sourcesContent":["import { computed, ref, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { useDeprecated, useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { CalendarDateType, CalendarEmits, CalendarProps } from './calendar'\n\nconst adjacentMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the first month and the first day of the last month is in the same week\n const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, 'week')\n const lastMonthStartDay = isSameWeek\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nconst threeConsecutiveMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const secondMonthFirstDay = start.add(1, 'month').startOf('month')\n\n // Whether the last day of the first month and the second month is in the same week\n const secondMonthStartDay = firstMonthLastDay.isSame(\n secondMonthFirstDay,\n 'week'\n )\n ? secondMonthFirstDay.add(1, 'week')\n : secondMonthFirstDay\n\n const secondMonthLastDay = secondMonthStartDay.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the second month and the last day of the last month is in the same week\n const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, 'week')\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [secondMonthStartDay.startOf('week'), secondMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nexport const useCalendar = (\n props: CalendarProps,\n emit: SetupContext<CalendarEmits>['emit'],\n componentName: string\n) => {\n const slots = useSlots()\n const { lang } = useLocale()\n\n const selectedDay = ref<Dayjs>()\n const now = dayjs().locale(lang.value)\n\n const realSelectedDay = computed<Dayjs | undefined>({\n get() {\n if (!props.modelValue) return selectedDay.value\n return date.value\n },\n set(val) {\n if (!val) return\n selectedDay.value = val\n const result = val.toDate()\n\n emit(INPUT_EVENT, result)\n emit(UPDATE_MODEL_EVENT, result)\n },\n })\n\n // if range is valid, we get a two-digit array\n const validatedRange = computed(() => {\n if (!props.range) return []\n const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value))\n const [startDayjs, endDayjs] = rangeArrDayjs\n if (startDayjs.isAfter(endDayjs)) {\n debugWarn(componentName, 'end time should be greater than start time')\n return []\n }\n if (startDayjs.isSame(endDayjs, 'month')) {\n // same month\n return calculateValidatedDateRange(startDayjs, endDayjs)\n } else {\n // two months\n if (startDayjs.add(1, 'month').month() !== endDayjs.month()) {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n return calculateValidatedDateRange(startDayjs, endDayjs)\n }\n })\n\n const date: ComputedRef<Dayjs> = computed(() => {\n if (!props.modelValue) {\n return (\n realSelectedDay.value ||\n (validatedRange.value.length ? validatedRange.value[0][0] : now)\n )\n } else {\n return dayjs(props.modelValue).locale(lang.value)\n }\n })\n const prevMonthDayjs = computed(() => date.value.subtract(1, 'month').date(1))\n const nextMonthDayjs = computed(() => date.value.add(1, 'month').date(1))\n const prevYearDayjs = computed(() => date.value.subtract(1, 'year').date(1))\n const nextYearDayjs = computed(() => date.value.add(1, 'year').date(1))\n\n // https://github.com/element-plus/element-plus/issues/3155\n // Calculate the validate date range according to the start and end dates\n const calculateValidatedDateRange = (\n startDayjs: Dayjs,\n endDayjs: Dayjs\n ): [Dayjs, Dayjs][] => {\n const firstDay = startDayjs.startOf('week')\n const lastDay = endDayjs.endOf('week')\n const firstMonth = firstDay.get('month')\n const lastMonth = lastDay.get('month')\n\n // Current mouth\n if (firstMonth === lastMonth) {\n return [[firstDay, lastDay]]\n }\n // Two adjacent months\n else if (firstMonth + 1 === lastMonth) {\n return adjacentMonth(firstDay, lastDay)\n }\n // Three consecutive months (compatible: 2021-01-30 to 2021-02-28)\n else if (\n firstMonth + 2 === lastMonth ||\n (firstMonth + 1) % 11 === lastMonth\n ) {\n return threeConsecutiveMonth(firstDay, lastDay)\n }\n // Other cases\n else {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n }\n\n const pickDay = (day: Dayjs) => {\n realSelectedDay.value = day\n }\n\n const selectDate = (type: CalendarDateType) => {\n const dateMap: Record<CalendarDateType, Dayjs> = {\n 'prev-month': prevMonthDayjs.value,\n 'next-month': nextMonthDayjs.value,\n 'prev-year': prevYearDayjs.value,\n 'next-year': nextYearDayjs.value,\n today: now,\n }\n\n const day = dateMap[type]\n\n if (!day.isSame(date.value, 'day')) {\n pickDay(day)\n }\n }\n\n useDeprecated(\n {\n from: '\"dateCell\"',\n replacement: '\"date-cell\"',\n scope: 'ElCalendar',\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/calendar.html#slots',\n type: 'Slot',\n },\n computed(() => !!slots.dateCell)\n )\n\n return {\n calculateValidatedDateRange,\n date,\n realSelectedDay,\n pickDay,\n selectDate,\n validatedRange,\n }\n}\n"],"names":["useSlots","useLocale","ref","dayjs","computed","INPUT_EVENT","UPD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