@element-plus/nightly 0.0.20241203 → 0.0.20241204
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +3 -3
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3 -3
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +43 -64
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +64 -43
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +22 -79
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +79 -22
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +52 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -52
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/index.mjs +7 -7
- package/es/components/mention/index.mjs +2 -2
- package/es/components/mention/src/mention.mjs +282 -62
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +62 -282
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message.mjs +91 -145
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +145 -91
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +68 -142
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +142 -68
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +3 -3
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +209 -16
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +16 -209
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +258 -83
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +83 -258
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +7 -7
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +43 -64
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +64 -43
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +23 -79
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +79 -23
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +52 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -52
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/index.js +7 -7
- package/lib/components/mention/index.js +2 -2
- package/lib/components/mention/src/mention.js +280 -61
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention2.js +61 -280
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message.js +93 -144
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +144 -93
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +69 -141
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +141 -69
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +3 -3
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +209 -16
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +16 -209
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +257 -83
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +83 -257
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -31
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +31 -27
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +7 -7
- 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,84 +1,27 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { formatTime, getTime } from './utils.mjs';
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { rAF, cAF } from '../../../utils/raf.mjs';
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
3
|
+
import { isNumber } from '../../../utils/types.mjs';
|
7
4
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
if (timer) {
|
23
|
-
cAF(timer);
|
24
|
-
timer = void 0;
|
25
|
-
}
|
26
|
-
};
|
27
|
-
const startTimer = () => {
|
28
|
-
const timestamp = getTime(props.value);
|
29
|
-
const frameFunc = () => {
|
30
|
-
let diff = timestamp - Date.now();
|
31
|
-
emit("change", diff);
|
32
|
-
if (diff <= 0) {
|
33
|
-
diff = 0;
|
34
|
-
stopTimer();
|
35
|
-
emit("finish");
|
36
|
-
} else {
|
37
|
-
timer = rAF(frameFunc);
|
38
|
-
}
|
39
|
-
rawValue.value = diff;
|
40
|
-
};
|
41
|
-
timer = rAF(frameFunc);
|
42
|
-
};
|
43
|
-
onMounted(() => {
|
44
|
-
rawValue.value = getTime(props.value) - Date.now();
|
45
|
-
watch(() => [props.value, props.format], () => {
|
46
|
-
stopTimer();
|
47
|
-
startTimer();
|
48
|
-
}, {
|
49
|
-
immediate: true
|
50
|
-
});
|
51
|
-
});
|
52
|
-
onBeforeUnmount(() => {
|
53
|
-
stopTimer();
|
54
|
-
});
|
55
|
-
expose({
|
56
|
-
displayValue
|
57
|
-
});
|
58
|
-
return (_ctx, _cache) => {
|
59
|
-
return openBlock(), createBlock(unref(ElStatistic), {
|
60
|
-
value: rawValue.value,
|
61
|
-
title: _ctx.title,
|
62
|
-
prefix: _ctx.prefix,
|
63
|
-
suffix: _ctx.suffix,
|
64
|
-
"value-style": _ctx.valueStyle,
|
65
|
-
formatter
|
66
|
-
}, createSlots({
|
67
|
-
_: 2
|
68
|
-
}, [
|
69
|
-
renderList(_ctx.$slots, (_, name) => {
|
70
|
-
return {
|
71
|
-
name,
|
72
|
-
fn: withCtx(() => [
|
73
|
-
renderSlot(_ctx.$slots, name)
|
74
|
-
])
|
75
|
-
};
|
76
|
-
})
|
77
|
-
]), 1032, ["value", "title", "prefix", "suffix", "value-style"]);
|
78
|
-
};
|
5
|
+
const countdownProps = buildProps({
|
6
|
+
format: {
|
7
|
+
type: String,
|
8
|
+
default: "HH:mm:ss"
|
9
|
+
},
|
10
|
+
prefix: String,
|
11
|
+
suffix: String,
|
12
|
+
title: String,
|
13
|
+
value: {
|
14
|
+
type: definePropType([Number, Object]),
|
15
|
+
default: 0
|
16
|
+
},
|
17
|
+
valueStyle: {
|
18
|
+
type: definePropType([String, Object, Array])
|
79
19
|
}
|
80
20
|
});
|
81
|
-
|
21
|
+
const countdownEmits = {
|
22
|
+
finish: () => true,
|
23
|
+
[CHANGE_EVENT]: (value) => isNumber(value)
|
24
|
+
};
|
82
25
|
|
83
|
-
export {
|
26
|
+
export { countdownEmits, countdownProps };
|
84
27
|
//# sourceMappingURL=countdown.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"countdown.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.
|
1
|
+
{"version":3,"file":"countdown.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Countdown from './countdown.vue'\n\nexport const countdownProps = buildProps({\n /**\n * @description Formatting the countdown display\n */\n format: {\n type: String,\n default: 'HH:mm:ss',\n },\n /**\n * @description Sets the prefix of a countdown\n */\n prefix: String,\n /**\n * @description Sets the suffix of a countdown\n */\n suffix: String,\n /**\n * @description countdown titles\n */\n title: String,\n /**\n * @description target time\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Styles countdown values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type CountdownProps = ExtractPropTypes<typeof countdownProps>\n\nexport const countdownEmits = {\n finish: () => true,\n [CHANGE_EVENT]: (value: number) => isNumber(value),\n}\nexport type CountdownEmits = typeof countdownEmits\n\nexport type CountdownInstance = InstanceType<typeof Countdown>\n"],"names":[],"mappings":";;;;AAEY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC5C;;;;"}
|
@@ -1,27 +1,84 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
import { defineComponent, ref, computed, onMounted, watch, onBeforeUnmount, openBlock, createBlock, unref, createSlots, renderList, withCtx, renderSlot } from 'vue';
|
2
|
+
import { ElStatistic } from '../../statistic/index.mjs';
|
3
|
+
import { countdownProps, countdownEmits } from './countdown.mjs';
|
4
|
+
import { formatTime, getTime } from './utils.mjs';
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
+
import { rAF, cAF } from '../../../utils/raf.mjs';
|
4
7
|
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
8
|
+
const __default__ = defineComponent({
|
9
|
+
name: "ElCountdown"
|
10
|
+
});
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
12
|
+
...__default__,
|
13
|
+
props: countdownProps,
|
14
|
+
emits: countdownEmits,
|
15
|
+
setup(__props, { expose, emit }) {
|
16
|
+
const props = __props;
|
17
|
+
let timer;
|
18
|
+
const rawValue = ref(0);
|
19
|
+
const displayValue = computed(() => formatTime(rawValue.value, props.format));
|
20
|
+
const formatter = (val) => formatTime(val, props.format);
|
21
|
+
const stopTimer = () => {
|
22
|
+
if (timer) {
|
23
|
+
cAF(timer);
|
24
|
+
timer = void 0;
|
25
|
+
}
|
26
|
+
};
|
27
|
+
const startTimer = () => {
|
28
|
+
const timestamp = getTime(props.value);
|
29
|
+
const frameFunc = () => {
|
30
|
+
let diff = timestamp - Date.now();
|
31
|
+
emit("change", diff);
|
32
|
+
if (diff <= 0) {
|
33
|
+
diff = 0;
|
34
|
+
stopTimer();
|
35
|
+
emit("finish");
|
36
|
+
} else {
|
37
|
+
timer = rAF(frameFunc);
|
38
|
+
}
|
39
|
+
rawValue.value = diff;
|
40
|
+
};
|
41
|
+
timer = rAF(frameFunc);
|
42
|
+
};
|
43
|
+
onMounted(() => {
|
44
|
+
rawValue.value = getTime(props.value) - Date.now();
|
45
|
+
watch(() => [props.value, props.format], () => {
|
46
|
+
stopTimer();
|
47
|
+
startTimer();
|
48
|
+
}, {
|
49
|
+
immediate: true
|
50
|
+
});
|
51
|
+
});
|
52
|
+
onBeforeUnmount(() => {
|
53
|
+
stopTimer();
|
54
|
+
});
|
55
|
+
expose({
|
56
|
+
displayValue
|
57
|
+
});
|
58
|
+
return (_ctx, _cache) => {
|
59
|
+
return openBlock(), createBlock(unref(ElStatistic), {
|
60
|
+
value: rawValue.value,
|
61
|
+
title: _ctx.title,
|
62
|
+
prefix: _ctx.prefix,
|
63
|
+
suffix: _ctx.suffix,
|
64
|
+
"value-style": _ctx.valueStyle,
|
65
|
+
formatter
|
66
|
+
}, createSlots({
|
67
|
+
_: 2
|
68
|
+
}, [
|
69
|
+
renderList(_ctx.$slots, (_, name) => {
|
70
|
+
return {
|
71
|
+
name,
|
72
|
+
fn: withCtx(() => [
|
73
|
+
renderSlot(_ctx.$slots, name)
|
74
|
+
])
|
75
|
+
};
|
76
|
+
})
|
77
|
+
]), 1032, ["value", "title", "prefix", "suffix", "value-style"]);
|
78
|
+
};
|
19
79
|
}
|
20
80
|
});
|
21
|
-
|
22
|
-
finish: () => true,
|
23
|
-
[CHANGE_EVENT]: (value) => isNumber(value)
|
24
|
-
};
|
81
|
+
var Countdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "countdown.vue"]]);
|
25
82
|
|
26
|
-
export {
|
83
|
+
export { Countdown as default };
|
27
84
|
//# sourceMappingURL=countdown2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"countdown2.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.
|
1
|
+
{"version":3,"file":"countdown2.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.vue"],"sourcesContent":["<template>\n <el-statistic\n :value=\"rawValue\"\n :title=\"title\"\n :prefix=\"prefix\"\n :suffix=\"suffix\"\n :value-style=\"valueStyle\"\n :formatter=\"formatter\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]>\n <slot :name=\"name\" />\n </template>\n </el-statistic>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport { ElStatistic } from '@element-plus/components/statistic'\nimport { cAF, rAF } from '@element-plus/utils'\nimport { countdownEmits, countdownProps } from './countdown'\nimport { formatTime, getTime } from './utils'\n\ndefineOptions({\n name: 'ElCountdown',\n})\n\nconst props = defineProps(countdownProps)\nconst emit = defineEmits(countdownEmits)\n\nlet timer: ReturnType<typeof rAF> | undefined\nconst rawValue = ref<number>(0)\nconst displayValue = computed(() => formatTime(rawValue.value, props.format))\n\nconst formatter = (val: number) => formatTime(val, props.format)\n\nconst stopTimer = () => {\n if (timer) {\n cAF(timer)\n timer = undefined\n }\n}\n\nconst startTimer = () => {\n const timestamp = getTime(props.value)\n const frameFunc = () => {\n let diff = timestamp - Date.now()\n emit('change', diff)\n if (diff <= 0) {\n diff = 0\n stopTimer()\n emit('finish')\n } else {\n timer = rAF(frameFunc)\n }\n rawValue.value = diff\n }\n timer = rAF(frameFunc)\n}\n\nonMounted(() => {\n rawValue.value = getTime(props.value) - Date.now()\n\n watch(\n () => [props.value, props.format],\n () => {\n stopTimer()\n startTimer()\n },\n {\n immediate: true,\n }\n )\n})\n\nonBeforeUnmount(() => {\n stopTimer()\n})\n\ndefineExpose({\n /**\n * @description current display value\n */\n displayValue,\n})\n</script>\n"],"names":["_openBlock","_createBlock","_unref"],"mappings":";;;;;;;mCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAI,IAAA,KAAA,CAAA;AACJ,IAAM,MAAA,QAAA,GAAW,IAAY,CAAC,CAAA,CAAA;AAC9B,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM,UAAA,CAAW,SAAS,KAAO,EAAA,KAAA,CAAM,MAAM,CAAC,CAAA,CAAA;AAE5E,IAAA,MAAM,YAAY,CAAC,GAAA,KAAgB,UAAW,CAAA,GAAA,EAAK,MAAM,MAAM,CAAA,CAAA;AAE/D,IAAA,MAAM,YAAY,MAAM;AACtB,MAAA,IAAI,KAAO,EAAA;AACT,QAAA,GAAA,CAAI,KAAK,CAAA,CAAA;AACT,QAAQ,KAAA,GAAA,KAAA,CAAA,CAAA;AAAA,OACV;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,aAAa,MAAM;AACvB,MAAM,MAAA,SAAA,GAAY,OAAQ,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AACrC,MAAA,MAAM,YAAY,MAAM;AACtB,QAAI,IAAA,IAAA,GAAO,SAAY,GAAA,IAAA,CAAK,GAAI,EAAA,CAAA;AAChC,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,IAAI,QAAQ,CAAG,EAAA;AACb,UAAO,IAAA,GAAA,CAAA,CAAA;AACP,UAAU,SAAA,EAAA,CAAA;AACV,UAAA,IAAA,CAAK,QAAQ,CAAA,CAAA;AAAA,SACR,MAAA;AACL,UAAA,KAAA,GAAQ,IAAI,SAAS,CAAA,CAAA;AAAA,SACvB;AACA,QAAA,QAAA,CAAS,KAAQ,GAAA,IAAA,CAAA;AAAA,OACnB,CAAA;AACA,MAAA,KAAA,GAAQ,IAAI,SAAS,CAAA,CAAA;AAAA,KACvB,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,QAAA,CAAS,QAAQ,OAAQ,CAAA,KAAA,CAAM,KAAK,CAAA,GAAI,KAAK,GAAI,EAAA,CAAA;AAEjD,MAAA,KAAA,CAAA,MAAA,CAAA,KAAA,CAAA,KAAA,EAAA,KAAA,CAAA,MAAA,CAAA,EAAA,MAAA;AAAA,QACE,SAAa,EAAA,CAAA;AAAmB,QAChC,UAAM,EAAA,CAAA;AACJ,OAAU,EAAA;AACV,QAAW,SAAA,EAAA,IAAA;AAAA,OACb,CAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAAA,IAAA,eACa,CAAA,MAAA;AAAA,MACb,SAAA,EAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAAA,IACF,MAAC,CAAA;AAED,MAAA,YAAA;AACE,KAAU,CAAA,CAAA;AAAA,IACZ,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;AAED,MAAa,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAAAC,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,QAAA,KAAA,EAAA,QAAA,CAAA,KAAA;AAAA,QAAA,KAAA,EAAA,IAAA,CAAA,KAAA;AAAA,QAAA,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,QAIX,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,QACD,aAAA,EAAA,IAAA,CAAA,UAAA;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -3,7 +3,7 @@ import { ElIcon } from '../../icon/index.mjs';
|
|
3
3
|
import { dropdownItemProps, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY } from './dropdown2.mjs';
|
4
4
|
import { DROPDOWN_INJECTION_KEY } from './tokens.mjs';
|
5
5
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-
|
6
|
+
import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group2.mjs';
|
7
7
|
import { ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from '../../roving-focus-group/src/tokens.mjs';
|
8
8
|
import { COLLECTION_ITEM_SIGN } from '../../collection/src/collection.mjs';
|
9
9
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
@@ -4,7 +4,7 @@ import { dropdownMenuProps, DROPDOWN_COLLECTION_INJECTION_KEY as COLLECTION_INJE
|
|
4
4
|
import { useDropdown } from './useDropdown.mjs';
|
5
5
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
6
|
import { ROVING_FOCUS_GROUP_INJECTION_KEY } from '../../roving-focus-group/src/tokens.mjs';
|
7
|
-
import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-
|
7
|
+
import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group2.mjs';
|
8
8
|
import { focusFirst } from '../../roving-focus-group/src/utils.mjs';
|
9
9
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
10
10
|
import { FOCUS_TRAP_INJECTION_KEY } from '../../focus-trap/src/tokens.mjs';
|
@@ -3,7 +3,7 @@ import { ElButton } from '../../button/index.mjs';
|
|
3
3
|
import { ElTooltip } from '../../tooltip/index.mjs';
|
4
4
|
import { ElScrollbar } from '../../scrollbar/index.mjs';
|
5
5
|
import { ElIcon } from '../../icon/index.mjs';
|
6
|
-
import ElRovingFocusGroup from '../../roving-focus-group/src/roving-focus-
|
6
|
+
import ElRovingFocusGroup from '../../roving-focus-group/src/roving-focus-group.mjs';
|
7
7
|
import { ArrowDown } from '@element-plus/icons-vue';
|
8
8
|
import { ElCollection, dropdownProps } from './dropdown2.mjs';
|
9
9
|
import { DROPDOWN_INJECTION_KEY } from './tokens.mjs';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Empty from './src/
|
2
|
-
export { emptyProps } from './src/
|
1
|
+
import Empty from './src/empty.mjs';
|
2
|
+
export { emptyProps } from './src/empty2.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElEmpty = withInstall(Empty);
|
@@ -1,16 +1,57 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
|
2
|
+
import ImgEmpty from './img-empty.mjs';
|
3
|
+
import { emptyProps } from './empty2.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
7
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
2
8
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
const __default__ = defineComponent({
|
10
|
+
name: "ElEmpty"
|
11
|
+
});
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
13
|
+
...__default__,
|
14
|
+
props: emptyProps,
|
15
|
+
setup(__props) {
|
16
|
+
const props = __props;
|
17
|
+
const { t } = useLocale();
|
18
|
+
const ns = useNamespace("empty");
|
19
|
+
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
20
|
+
const imageStyle = computed(() => ({
|
21
|
+
width: addUnit(props.imageSize)
|
22
|
+
}));
|
23
|
+
return (_ctx, _cache) => {
|
24
|
+
return openBlock(), createElementBlock("div", {
|
25
|
+
class: normalizeClass(unref(ns).b())
|
26
|
+
}, [
|
27
|
+
createElementVNode("div", {
|
28
|
+
class: normalizeClass(unref(ns).e("image")),
|
29
|
+
style: normalizeStyle(unref(imageStyle))
|
30
|
+
}, [
|
31
|
+
_ctx.image ? (openBlock(), createElementBlock("img", {
|
32
|
+
key: 0,
|
33
|
+
src: _ctx.image,
|
34
|
+
ondragstart: "return false"
|
35
|
+
}, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
36
|
+
createVNode(ImgEmpty)
|
37
|
+
])
|
38
|
+
], 6),
|
39
|
+
createElementVNode("div", {
|
40
|
+
class: normalizeClass(unref(ns).e("description"))
|
41
|
+
}, [
|
42
|
+
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
|
43
|
+
], 2),
|
44
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
45
|
+
key: 0,
|
46
|
+
class: normalizeClass(unref(ns).e("bottom"))
|
47
|
+
}, [
|
48
|
+
renderSlot(_ctx.$slots, "default")
|
49
|
+
], 2)) : createCommentVNode("v-if", true)
|
50
|
+
], 2);
|
51
|
+
};
|
12
52
|
}
|
13
53
|
});
|
54
|
+
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
|
14
55
|
|
15
|
-
export {
|
56
|
+
export { Empty as default };
|
16
57
|
//# sourceMappingURL=empty.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
1
|
+
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA;AAAA,IAAA,MACjB,UAAqB,GAAA,QAAA,CAAA,OAAsB;AAAA,MACnD,KAAA,EAAA,OAAA,CAAA,KAAA,CAAA,SAAA,CAAA;AACA,KAAM,CAAA,CAAA,CAAA;AAA4C,IAChD,OAAA,CAAA,IAAe,EAAA,MAAA,KAAe;AAAA,MAC9B,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,57 +1,16 @@
|
|
1
|
-
import {
|
2
|
-
import ImgEmpty from './img-empty.mjs';
|
3
|
-
import { emptyProps } from './empty.mjs';
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
7
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
8
2
|
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
const ns = useNamespace("empty");
|
19
|
-
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
20
|
-
const imageStyle = computed(() => ({
|
21
|
-
width: addUnit(props.imageSize)
|
22
|
-
}));
|
23
|
-
return (_ctx, _cache) => {
|
24
|
-
return openBlock(), createElementBlock("div", {
|
25
|
-
class: normalizeClass(unref(ns).b())
|
26
|
-
}, [
|
27
|
-
createElementVNode("div", {
|
28
|
-
class: normalizeClass(unref(ns).e("image")),
|
29
|
-
style: normalizeStyle(unref(imageStyle))
|
30
|
-
}, [
|
31
|
-
_ctx.image ? (openBlock(), createElementBlock("img", {
|
32
|
-
key: 0,
|
33
|
-
src: _ctx.image,
|
34
|
-
ondragstart: "return false"
|
35
|
-
}, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
36
|
-
createVNode(ImgEmpty)
|
37
|
-
])
|
38
|
-
], 6),
|
39
|
-
createElementVNode("div", {
|
40
|
-
class: normalizeClass(unref(ns).e("description"))
|
41
|
-
}, [
|
42
|
-
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
|
43
|
-
], 2),
|
44
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
45
|
-
key: 0,
|
46
|
-
class: normalizeClass(unref(ns).e("bottom"))
|
47
|
-
}, [
|
48
|
-
renderSlot(_ctx.$slots, "default")
|
49
|
-
], 2)) : createCommentVNode("v-if", true)
|
50
|
-
], 2);
|
51
|
-
};
|
3
|
+
const emptyProps = buildProps({
|
4
|
+
image: {
|
5
|
+
type: String,
|
6
|
+
default: ""
|
7
|
+
},
|
8
|
+
imageSize: Number,
|
9
|
+
description: {
|
10
|
+
type: String,
|
11
|
+
default: ""
|
52
12
|
}
|
53
13
|
});
|
54
|
-
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
|
55
14
|
|
56
|
-
export {
|
15
|
+
export { emptyProps };
|
57
16
|
//# sourceMappingURL=empty2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
1
|
+
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
package/es/components/index.mjs
CHANGED
@@ -105,7 +105,7 @@ export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag.mjs';
|
|
105
105
|
export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
|
106
106
|
export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
|
107
107
|
export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
|
108
|
-
export { colProps } from './col/src/
|
108
|
+
export { colProps } from './col/src/col.mjs';
|
109
109
|
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
|
110
110
|
export { collapseItemProps } from './collapse/src/collapse-item.mjs';
|
111
111
|
export { collapseContextKey } from './collapse/src/constants.mjs';
|
@@ -114,7 +114,7 @@ export { messageConfig } from './config-provider/src/config-provider.mjs';
|
|
114
114
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
115
115
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
116
116
|
export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
|
117
|
-
export { countdownEmits, countdownProps } from './countdown/src/
|
117
|
+
export { countdownEmits, countdownProps } from './countdown/src/countdown.mjs';
|
118
118
|
export { ROOT_PICKER_INJECTION_KEY } from './date-picker/src/constants.mjs';
|
119
119
|
export { datePickerProps } from './date-picker/src/props/date-picker.mjs';
|
120
120
|
export { descriptionProps } from './descriptions/src/description.mjs';
|
@@ -126,7 +126,7 @@ export { dividerProps } from './divider/src/divider.mjs';
|
|
126
126
|
export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
|
127
127
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown2.mjs';
|
128
128
|
export { DROPDOWN_INJECTION_KEY } from './dropdown/src/tokens.mjs';
|
129
|
-
export { emptyProps } from './empty/src/
|
129
|
+
export { emptyProps } from './empty/src/empty2.mjs';
|
130
130
|
export { formEmits, formMetaProps, formProps } from './form/src/form.mjs';
|
131
131
|
export { formItemProps, formItemValidateStates } from './form/src/form-item.mjs';
|
132
132
|
export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
|
@@ -161,7 +161,7 @@ export { radioEmits, radioProps, radioPropsBase } from './radio/src/radio.mjs';
|
|
161
161
|
export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group.mjs';
|
162
162
|
export { radioButtonProps } from './radio/src/radio-button.mjs';
|
163
163
|
export { radioGroupKey } from './radio/src/constants.mjs';
|
164
|
-
export { rateEmits, rateProps } from './rate/src/
|
164
|
+
export { rateEmits, rateProps } from './rate/src/rate2.mjs';
|
165
165
|
export { IconComponentMap, IconMap, resultProps } from './result/src/result.mjs';
|
166
166
|
export { RowAlign, RowJustify, rowProps } from './row/src/row.mjs';
|
167
167
|
export { rowContextKey } from './row/src/constants.mjs';
|
@@ -221,10 +221,10 @@ export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
|
|
221
221
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
|
222
222
|
export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
|
223
223
|
export { segmentedEmits, segmentedProps } from './segmented/src/segmented.mjs';
|
224
|
-
export { mentionEmits, mentionProps } from './mention/src/
|
224
|
+
export { mentionEmits, mentionProps } from './mention/src/mention2.mjs';
|
225
225
|
export { vLoading as ElLoadingDirective, vLoading } from './loading/src/directive.mjs';
|
226
226
|
export { Loading as ElLoadingService } from './loading/src/service.mjs';
|
227
|
-
export { messageDefaults, messageEmits, messageProps, messageTypes } from './message/src/
|
228
|
-
export { notificationEmits, notificationProps, notificationTypes } from './notification/src/
|
227
|
+
export { messageDefaults, messageEmits, messageProps, messageTypes } from './message/src/message.mjs';
|
228
|
+
export { notificationEmits, notificationProps, notificationTypes } from './notification/src/notification.mjs';
|
229
229
|
export { popoverEmits, popoverProps } from './popover/src/popover.mjs';
|
230
230
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Mention from './src/
|
2
|
-
export { mentionEmits, mentionProps } from './src/
|
1
|
+
import Mention from './src/mention.mjs';
|
2
|
+
export { mentionEmits, mentionProps } from './src/mention2.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElMention = withInstall(Mention);
|