@element-plus/nightly 0.0.20241015 → 0.0.20241017
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/README.md +5 -0
- package/dist/index.full.js +10 -7
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +10 -7
- 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/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/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +26 -119
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +119 -26
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +32 -66
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +66 -32
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +32 -69
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +69 -32
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +18 -135
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +135 -18
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +42 -401
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +401 -42
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +79 -23
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +23 -79
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/index.mjs +7 -7
- package/es/components/pagination/src/components/next.mjs +36 -19
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +19 -36
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +210 -17
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +17 -210
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +36 -18
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +18 -36
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/segmented/src/segmented2.mjs +4 -3
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.mjs +5 -3
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/arrow.mjs +37 -22
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +22 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- 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/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +1 -1
- package/es/components/transfer/src/transfer.mjs +161 -69
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +69 -161
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +35 -7
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +7 -35
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +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/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +27 -119
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +119 -27
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +33 -66
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +66 -33
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +32 -69
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +69 -32
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +19 -135
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +135 -19
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +42 -399
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +399 -42
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +79 -24
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +24 -79
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/index.js +7 -7
- package/lib/components/pagination/src/components/next.js +36 -19
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +19 -36
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +210 -17
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +17 -210
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +36 -19
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +19 -36
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/segmented/src/segmented2.js +3 -2
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.js +5 -3
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/arrow.js +37 -23
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +23 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- 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/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +1 -1
- package/lib/components/transfer/src/transfer.js +161 -73
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +73 -161
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +35 -7
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +7 -35
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +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 +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.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;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,85 +1,29 @@
|
|
|
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
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
5
|
+
import { isNumber } from '../../../utils/types.mjs';
|
|
8
6
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (timer) {
|
|
24
|
-
cAF(timer);
|
|
25
|
-
timer = void 0;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const startTimer = () => {
|
|
29
|
-
const timestamp = getTime(props.value);
|
|
30
|
-
const frameFunc = () => {
|
|
31
|
-
let diff = timestamp - Date.now();
|
|
32
|
-
emit("change", diff);
|
|
33
|
-
if (diff <= 0) {
|
|
34
|
-
diff = 0;
|
|
35
|
-
stopTimer();
|
|
36
|
-
emit("finish");
|
|
37
|
-
} else {
|
|
38
|
-
timer = rAF(frameFunc);
|
|
39
|
-
}
|
|
40
|
-
rawValue.value = diff;
|
|
41
|
-
};
|
|
42
|
-
timer = rAF(frameFunc);
|
|
43
|
-
};
|
|
44
|
-
onMounted(() => {
|
|
45
|
-
rawValue.value = getTime(props.value) - Date.now();
|
|
46
|
-
watch(() => [props.value, props.format], () => {
|
|
47
|
-
stopTimer();
|
|
48
|
-
startTimer();
|
|
49
|
-
}, {
|
|
50
|
-
immediate: true
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
onBeforeUnmount(() => {
|
|
54
|
-
stopTimer();
|
|
55
|
-
});
|
|
56
|
-
expose({
|
|
57
|
-
displayValue
|
|
58
|
-
});
|
|
59
|
-
return (_ctx, _cache) => {
|
|
60
|
-
return openBlock(), createBlock(unref(ElStatistic), {
|
|
61
|
-
value: rawValue.value,
|
|
62
|
-
title: _ctx.title,
|
|
63
|
-
prefix: _ctx.prefix,
|
|
64
|
-
suffix: _ctx.suffix,
|
|
65
|
-
"value-style": _ctx.valueStyle,
|
|
66
|
-
formatter
|
|
67
|
-
}, createSlots({
|
|
68
|
-
_: 2
|
|
69
|
-
}, [
|
|
70
|
-
renderList(_ctx.$slots, (_, name) => {
|
|
71
|
-
return {
|
|
72
|
-
name,
|
|
73
|
-
fn: withCtx(() => [
|
|
74
|
-
renderSlot(_ctx.$slots, name)
|
|
75
|
-
])
|
|
76
|
-
};
|
|
77
|
-
})
|
|
78
|
-
]), 1032, ["value", "title", "prefix", "suffix", "value-style"]);
|
|
79
|
-
};
|
|
7
|
+
const countdownProps = buildProps({
|
|
8
|
+
format: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "HH:mm:ss"
|
|
11
|
+
},
|
|
12
|
+
prefix: String,
|
|
13
|
+
suffix: String,
|
|
14
|
+
title: String,
|
|
15
|
+
value: {
|
|
16
|
+
type: definePropType([Number, Object]),
|
|
17
|
+
default: 0
|
|
18
|
+
},
|
|
19
|
+
valueStyle: {
|
|
20
|
+
type: definePropType([String, Object, Array])
|
|
80
21
|
}
|
|
81
22
|
});
|
|
82
|
-
|
|
23
|
+
const countdownEmits = {
|
|
24
|
+
finish: () => true,
|
|
25
|
+
[CHANGE_EVENT]: (value) => isNumber(value)
|
|
26
|
+
};
|
|
83
27
|
|
|
84
|
-
export {
|
|
28
|
+
export { countdownEmits, countdownProps };
|
|
85
29
|
//# 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.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;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -80,18 +80,18 @@ export { ElMessage } from './message/index.mjs';
|
|
|
80
80
|
export { ElMessageBox } from './message-box/index.mjs';
|
|
81
81
|
export { ElNotification } from './notification/index.mjs';
|
|
82
82
|
export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
|
|
83
|
-
export { affixEmits, affixProps } from './affix/src/
|
|
83
|
+
export { affixEmits, affixProps } from './affix/src/affix.mjs';
|
|
84
84
|
export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
|
|
85
85
|
export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
|
|
86
|
-
export { avatarEmits, avatarProps } from './avatar/src/
|
|
86
|
+
export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
|
|
87
87
|
export { backtopEmits, backtopProps } from './backtop/src/backtop.mjs';
|
|
88
|
-
export { badgeProps } from './badge/src/
|
|
88
|
+
export { badgeProps } from './badge/src/badge.mjs';
|
|
89
89
|
export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
|
|
90
90
|
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
|
|
91
91
|
export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
|
|
92
92
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
|
|
93
93
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
|
94
|
-
export { calendarEmits, calendarProps } from './calendar/src/
|
|
94
|
+
export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
|
|
95
95
|
export { cardProps } from './card/src/card.mjs';
|
|
96
96
|
export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
|
|
97
97
|
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
|
|
@@ -107,12 +107,12 @@ export { colProps } from './col/src/col.mjs';
|
|
|
107
107
|
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
|
|
108
108
|
export { collapseItemProps } from './collapse/src/collapse-item.mjs';
|
|
109
109
|
export { collapseContextKey } from './collapse/src/constants.mjs';
|
|
110
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-
|
|
110
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
|
|
111
111
|
export { messageConfig } from './config-provider/src/config-provider.mjs';
|
|
112
112
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
|
113
113
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
|
114
114
|
export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
|
|
115
|
-
export { countdownEmits, countdownProps } from './countdown/src/
|
|
115
|
+
export { countdownEmits, countdownProps } from './countdown/src/countdown2.mjs';
|
|
116
116
|
export { ROOT_PICKER_INJECTION_KEY } from './date-picker/src/constants.mjs';
|
|
117
117
|
export { datePickerProps } from './date-picker/src/props/date-picker.mjs';
|
|
118
118
|
export { descriptionProps } from './descriptions/src/description.mjs';
|
|
@@ -203,7 +203,7 @@ export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useToo
|
|
|
203
203
|
export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
|
|
204
204
|
export { useTooltipContentProps } from './tooltip/src/content.mjs';
|
|
205
205
|
export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
|
|
206
|
-
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/
|
|
206
|
+
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer2.mjs';
|
|
207
207
|
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
|
|
208
208
|
export { uploadContentProps } from './upload/src/upload-content.mjs';
|
|
209
209
|
export { uploadListEmits, uploadListProps } from './upload/src/upload-list.mjs';
|
|
@@ -1,24 +1,41 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, unref, toDisplayString, createBlock, withCtx, resolveDynamicComponent } from 'vue';
|
|
2
|
+
import '../../../../hooks/index.mjs';
|
|
3
|
+
import { ElIcon } from '../../../icon/index.mjs';
|
|
4
|
+
import { paginationNextProps } from './next2.mjs';
|
|
5
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
|
4
7
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
const __default__ = defineComponent({
|
|
9
|
+
name: "ElPaginationNext"
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: paginationNextProps,
|
|
14
|
+
emits: ["click"],
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const { t } = useLocale();
|
|
18
|
+
const internalDisabled = computed(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createElementBlock("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
class: "btn-next",
|
|
23
|
+
disabled: unref(internalDisabled),
|
|
24
|
+
"aria-label": _ctx.nextText || unref(t)("el.pagination.next"),
|
|
25
|
+
"aria-disabled": unref(internalDisabled),
|
|
26
|
+
onClick: ($event) => _ctx.$emit("click", $event)
|
|
27
|
+
}, [
|
|
28
|
+
_ctx.nextText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
29
|
+
default: withCtx(() => [
|
|
30
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon)))
|
|
31
|
+
]),
|
|
32
|
+
_: 1
|
|
33
|
+
}))
|
|
34
|
+
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]);
|
|
35
|
+
};
|
|
20
36
|
}
|
|
21
37
|
});
|
|
38
|
+
var Next = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "next.vue"]]);
|
|
22
39
|
|
|
23
|
-
export {
|
|
40
|
+
export { Next as default };
|
|
24
41
|
//# sourceMappingURL=next.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.mjs","sources":["../../../../../../../packages/components/pagination/src/components/next.
|
|
1
|
+
{"version":3,"file":"next.mjs","sources":["../../../../../../../packages/components/pagination/src/components/next.vue"],"sourcesContent":["<template>\n <button\n type=\"button\"\n class=\"btn-next\"\n :disabled=\"internalDisabled\"\n :aria-label=\"nextText || t('el.pagination.next')\"\n :aria-disabled=\"internalDisabled\"\n @click=\"$emit('click', $event)\"\n >\n <span v-if=\"nextText\">{{ nextText }}</span>\n <el-icon v-else>\n <component :is=\"nextIcon\" />\n </el-icon>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { paginationNextProps } from './next'\n\ndefineOptions({\n name: 'ElPaginationNext',\n})\n\nconst props = defineProps(paginationNextProps)\n\ndefineEmits(['click'])\n\nconst { t } = useLocale()\n\nconst internalDisabled = computed(\n () =>\n props.disabled ||\n props.currentPage === props.pageCount ||\n props.pageCount === 0\n)\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;mCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AAExB,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,QAAA,IAAA,KAAA,CAAA,WAAA,KAAA,KAAA,CAAA,SAAA,IAAA,KAAA,CAAA,SAAA,KAAA,CAAA,CAAA,CAAA;AAAA,IACvB,OAAA,CACE,MAAM,MACN,KAAA;AACoB,MACxB,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,41 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '../../../../
|
|
3
|
-
import {
|
|
4
|
-
import { paginationNextProps } from './next.mjs';
|
|
5
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
|
1
|
+
import '../../../../utils/index.mjs';
|
|
2
|
+
import { buildProps } from '../../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { iconPropType } from '../../../../utils/vue/icon.mjs';
|
|
7
4
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
disabled: unref(internalDisabled),
|
|
24
|
-
"aria-label": _ctx.nextText || unref(t)("el.pagination.next"),
|
|
25
|
-
"aria-disabled": unref(internalDisabled),
|
|
26
|
-
onClick: ($event) => _ctx.$emit("click", $event)
|
|
27
|
-
}, [
|
|
28
|
-
_ctx.nextText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
|
29
|
-
default: withCtx(() => [
|
|
30
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon)))
|
|
31
|
-
]),
|
|
32
|
-
_: 1
|
|
33
|
-
}))
|
|
34
|
-
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]);
|
|
35
|
-
};
|
|
5
|
+
const paginationNextProps = buildProps({
|
|
6
|
+
disabled: Boolean,
|
|
7
|
+
currentPage: {
|
|
8
|
+
type: Number,
|
|
9
|
+
default: 1
|
|
10
|
+
},
|
|
11
|
+
pageCount: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 50
|
|
14
|
+
},
|
|
15
|
+
nextText: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
nextIcon: {
|
|
19
|
+
type: iconPropType
|
|
36
20
|
}
|
|
37
21
|
});
|
|
38
|
-
var Next = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "next.vue"]]);
|
|
39
22
|
|
|
40
|
-
export {
|
|
23
|
+
export { paginationNextProps };
|
|
41
24
|
//# sourceMappingURL=next2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/next.
|
|
1
|
+
{"version":3,"file":"next2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/next.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Next from './next.vue'\n\nexport const paginationNextProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n default: 50,\n },\n nextText: {\n type: String,\n },\n nextIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport type PaginationNextProps = ExtractPropTypes<typeof paginationNextProps>\n\nexport type NextInstance = InstanceType<typeof Next>\n"],"names":[],"mappings":";;;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,21 +1,214 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, watchEffect, openBlock, createElementBlock, normalizeClass, unref, withKeys, createCommentVNode, createBlock, Fragment, renderList, toDisplayString } from 'vue';
|
|
2
|
+
import { DArrowLeft, MoreFilled, DArrowRight } from '@element-plus/icons-vue';
|
|
3
|
+
import '../../../../hooks/index.mjs';
|
|
4
|
+
import { paginationPagerProps } from './pager2.mjs';
|
|
5
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
|
|
7
|
+
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
|
3
8
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
type: Number,
|
|
7
|
-
default: 1
|
|
8
|
-
},
|
|
9
|
-
pageCount: {
|
|
10
|
-
type: Number,
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
pagerCount: {
|
|
14
|
-
type: Number,
|
|
15
|
-
default: 7
|
|
16
|
-
},
|
|
17
|
-
disabled: Boolean
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "ElPaginationPager"
|
|
18
11
|
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: paginationPagerProps,
|
|
15
|
+
emits: ["change"],
|
|
16
|
+
setup(__props, { emit }) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const nsPager = useNamespace("pager");
|
|
19
|
+
const nsIcon = useNamespace("icon");
|
|
20
|
+
const { t } = useLocale();
|
|
21
|
+
const showPrevMore = ref(false);
|
|
22
|
+
const showNextMore = ref(false);
|
|
23
|
+
const quickPrevHover = ref(false);
|
|
24
|
+
const quickNextHover = ref(false);
|
|
25
|
+
const quickPrevFocus = ref(false);
|
|
26
|
+
const quickNextFocus = ref(false);
|
|
27
|
+
const pagers = computed(() => {
|
|
28
|
+
const pagerCount = props.pagerCount;
|
|
29
|
+
const halfPagerCount = (pagerCount - 1) / 2;
|
|
30
|
+
const currentPage = Number(props.currentPage);
|
|
31
|
+
const pageCount = Number(props.pageCount);
|
|
32
|
+
let showPrevMore2 = false;
|
|
33
|
+
let showNextMore2 = false;
|
|
34
|
+
if (pageCount > pagerCount) {
|
|
35
|
+
if (currentPage > pagerCount - halfPagerCount) {
|
|
36
|
+
showPrevMore2 = true;
|
|
37
|
+
}
|
|
38
|
+
if (currentPage < pageCount - halfPagerCount) {
|
|
39
|
+
showNextMore2 = true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const array = [];
|
|
43
|
+
if (showPrevMore2 && !showNextMore2) {
|
|
44
|
+
const startPage = pageCount - (pagerCount - 2);
|
|
45
|
+
for (let i = startPage; i < pageCount; i++) {
|
|
46
|
+
array.push(i);
|
|
47
|
+
}
|
|
48
|
+
} else if (!showPrevMore2 && showNextMore2) {
|
|
49
|
+
for (let i = 2; i < pagerCount; i++) {
|
|
50
|
+
array.push(i);
|
|
51
|
+
}
|
|
52
|
+
} else if (showPrevMore2 && showNextMore2) {
|
|
53
|
+
const offset = Math.floor(pagerCount / 2) - 1;
|
|
54
|
+
for (let i = currentPage - offset; i <= currentPage + offset; i++) {
|
|
55
|
+
array.push(i);
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
for (let i = 2; i < pageCount; i++) {
|
|
59
|
+
array.push(i);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return array;
|
|
63
|
+
});
|
|
64
|
+
const prevMoreKls = computed(() => [
|
|
65
|
+
"more",
|
|
66
|
+
"btn-quickprev",
|
|
67
|
+
nsIcon.b(),
|
|
68
|
+
nsPager.is("disabled", props.disabled)
|
|
69
|
+
]);
|
|
70
|
+
const nextMoreKls = computed(() => [
|
|
71
|
+
"more",
|
|
72
|
+
"btn-quicknext",
|
|
73
|
+
nsIcon.b(),
|
|
74
|
+
nsPager.is("disabled", props.disabled)
|
|
75
|
+
]);
|
|
76
|
+
const tabindex = computed(() => props.disabled ? -1 : 0);
|
|
77
|
+
watchEffect(() => {
|
|
78
|
+
const halfPagerCount = (props.pagerCount - 1) / 2;
|
|
79
|
+
showPrevMore.value = false;
|
|
80
|
+
showNextMore.value = false;
|
|
81
|
+
if (props.pageCount > props.pagerCount) {
|
|
82
|
+
if (props.currentPage > props.pagerCount - halfPagerCount) {
|
|
83
|
+
showPrevMore.value = true;
|
|
84
|
+
}
|
|
85
|
+
if (props.currentPage < props.pageCount - halfPagerCount) {
|
|
86
|
+
showNextMore.value = true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
function onMouseEnter(forward = false) {
|
|
91
|
+
if (props.disabled)
|
|
92
|
+
return;
|
|
93
|
+
if (forward) {
|
|
94
|
+
quickPrevHover.value = true;
|
|
95
|
+
} else {
|
|
96
|
+
quickNextHover.value = true;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function onFocus(forward = false) {
|
|
100
|
+
if (forward) {
|
|
101
|
+
quickPrevFocus.value = true;
|
|
102
|
+
} else {
|
|
103
|
+
quickNextFocus.value = true;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function onEnter(e) {
|
|
107
|
+
const target = e.target;
|
|
108
|
+
if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("number")) {
|
|
109
|
+
const newPage = Number(target.textContent);
|
|
110
|
+
if (newPage !== props.currentPage) {
|
|
111
|
+
emit("change", newPage);
|
|
112
|
+
}
|
|
113
|
+
} else if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("more")) {
|
|
114
|
+
onPagerClick(e);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function onPagerClick(event) {
|
|
118
|
+
const target = event.target;
|
|
119
|
+
if (target.tagName.toLowerCase() === "ul" || props.disabled) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
let newPage = Number(target.textContent);
|
|
123
|
+
const pageCount = props.pageCount;
|
|
124
|
+
const currentPage = props.currentPage;
|
|
125
|
+
const pagerCountOffset = props.pagerCount - 2;
|
|
126
|
+
if (target.className.includes("more")) {
|
|
127
|
+
if (target.className.includes("quickprev")) {
|
|
128
|
+
newPage = currentPage - pagerCountOffset;
|
|
129
|
+
} else if (target.className.includes("quicknext")) {
|
|
130
|
+
newPage = currentPage + pagerCountOffset;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (!Number.isNaN(+newPage)) {
|
|
134
|
+
if (newPage < 1) {
|
|
135
|
+
newPage = 1;
|
|
136
|
+
}
|
|
137
|
+
if (newPage > pageCount) {
|
|
138
|
+
newPage = pageCount;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (newPage !== currentPage) {
|
|
142
|
+
emit("change", newPage);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return (_ctx, _cache) => {
|
|
146
|
+
return openBlock(), createElementBlock("ul", {
|
|
147
|
+
class: normalizeClass(unref(nsPager).b()),
|
|
148
|
+
onClick: onPagerClick,
|
|
149
|
+
onKeyup: withKeys(onEnter, ["enter"])
|
|
150
|
+
}, [
|
|
151
|
+
_ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: normalizeClass([[
|
|
154
|
+
unref(nsPager).is("active", _ctx.currentPage === 1),
|
|
155
|
+
unref(nsPager).is("disabled", _ctx.disabled)
|
|
156
|
+
], "number"]),
|
|
157
|
+
"aria-current": _ctx.currentPage === 1,
|
|
158
|
+
"aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }),
|
|
159
|
+
tabindex: unref(tabindex)
|
|
160
|
+
}, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true),
|
|
161
|
+
showPrevMore.value ? (openBlock(), createElementBlock("li", {
|
|
162
|
+
key: 1,
|
|
163
|
+
class: normalizeClass(unref(prevMoreKls)),
|
|
164
|
+
tabindex: unref(tabindex),
|
|
165
|
+
"aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
|
|
166
|
+
onMouseenter: ($event) => onMouseEnter(true),
|
|
167
|
+
onMouseleave: ($event) => quickPrevHover.value = false,
|
|
168
|
+
onFocus: ($event) => onFocus(true),
|
|
169
|
+
onBlur: ($event) => quickPrevFocus.value = false
|
|
170
|
+
}, [
|
|
171
|
+
(quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(DArrowLeft), { key: 0 })) : (openBlock(), createBlock(unref(MoreFilled), { key: 1 }))
|
|
172
|
+
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true),
|
|
173
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagers), (pager) => {
|
|
174
|
+
return openBlock(), createElementBlock("li", {
|
|
175
|
+
key: pager,
|
|
176
|
+
class: normalizeClass([[
|
|
177
|
+
unref(nsPager).is("active", _ctx.currentPage === pager),
|
|
178
|
+
unref(nsPager).is("disabled", _ctx.disabled)
|
|
179
|
+
], "number"]),
|
|
180
|
+
"aria-current": _ctx.currentPage === pager,
|
|
181
|
+
"aria-label": unref(t)("el.pagination.currentPage", { pager }),
|
|
182
|
+
tabindex: unref(tabindex)
|
|
183
|
+
}, toDisplayString(pager), 11, ["aria-current", "aria-label", "tabindex"]);
|
|
184
|
+
}), 128)),
|
|
185
|
+
showNextMore.value ? (openBlock(), createElementBlock("li", {
|
|
186
|
+
key: 2,
|
|
187
|
+
class: normalizeClass(unref(nextMoreKls)),
|
|
188
|
+
tabindex: unref(tabindex),
|
|
189
|
+
"aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
|
|
190
|
+
onMouseenter: ($event) => onMouseEnter(),
|
|
191
|
+
onMouseleave: ($event) => quickNextHover.value = false,
|
|
192
|
+
onFocus: ($event) => onFocus(),
|
|
193
|
+
onBlur: ($event) => quickNextFocus.value = false
|
|
194
|
+
}, [
|
|
195
|
+
(quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(DArrowRight), { key: 0 })) : (openBlock(), createBlock(unref(MoreFilled), { key: 1 }))
|
|
196
|
+
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true),
|
|
197
|
+
_ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
|
|
198
|
+
key: 3,
|
|
199
|
+
class: normalizeClass([[
|
|
200
|
+
unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount),
|
|
201
|
+
unref(nsPager).is("disabled", _ctx.disabled)
|
|
202
|
+
], "number"]),
|
|
203
|
+
"aria-current": _ctx.currentPage === _ctx.pageCount,
|
|
204
|
+
"aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
|
|
205
|
+
tabindex: unref(tabindex)
|
|
206
|
+
}, toDisplayString(_ctx.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true)
|
|
207
|
+
], 42, ["onKeyup"]);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
var Pager = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "pager.vue"]]);
|
|
19
212
|
|
|
20
|
-
export {
|
|
213
|
+
export { Pager as default };
|
|
21
214
|
//# sourceMappingURL=pager.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pager.mjs","sources":["../../../../../../../packages/components/pagination/src/components/pager.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Pager from './pager.vue'\n\nexport const paginationPagerProps = buildProps({\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n required: true,\n },\n pagerCount: {\n type: Number,\n default: 7,\n },\n disabled: Boolean,\n} as const)\n\nexport type PaginationPagerProps = ExtractPropTypes<typeof paginationPagerProps>\n\nexport type PagerInstance = InstanceType<typeof Pager>\n"],"names":[],"mappings":";;;AACY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"pager.mjs","sources":["../../../../../../../packages/components/pagination/src/components/pager.vue"],"sourcesContent":["<template>\n <ul :class=\"nsPager.b()\" @click=\"onPagerClick\" @keyup.enter=\"onEnter\">\n <li\n v-if=\"pageCount > 0\"\n :class=\"[\n nsPager.is('active', currentPage === 1),\n nsPager.is('disabled', disabled),\n ]\"\n class=\"number\"\n :aria-current=\"currentPage === 1\"\n :aria-label=\"t('el.pagination.currentPage', { pager: 1 })\"\n :tabindex=\"tabindex\"\n >\n 1\n </li>\n <li\n v-if=\"showPrevMore\"\n :class=\"prevMoreKls\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.pagination.prevPages', { pager: pagerCount - 2 })\"\n @mouseenter=\"onMouseEnter(true)\"\n @mouseleave=\"quickPrevHover = false\"\n @focus=\"onFocus(true)\"\n @blur=\"quickPrevFocus = false\"\n >\n <d-arrow-left v-if=\"(quickPrevHover || quickPrevFocus) && !disabled\" />\n <more-filled v-else />\n </li>\n <li\n v-for=\"pager in pagers\"\n :key=\"pager\"\n :class=\"[\n nsPager.is('active', currentPage === pager),\n nsPager.is('disabled', disabled),\n ]\"\n class=\"number\"\n :aria-current=\"currentPage === pager\"\n :aria-label=\"t('el.pagination.currentPage', { pager })\"\n :tabindex=\"tabindex\"\n >\n {{ pager }}\n </li>\n <li\n v-if=\"showNextMore\"\n :class=\"nextMoreKls\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.pagination.nextPages', { pager: pagerCount - 2 })\"\n @mouseenter=\"onMouseEnter()\"\n @mouseleave=\"quickNextHover = false\"\n @focus=\"onFocus()\"\n @blur=\"quickNextFocus = false\"\n >\n <d-arrow-right v-if=\"(quickNextHover || quickNextFocus) && !disabled\" />\n <more-filled v-else />\n </li>\n <li\n v-if=\"pageCount > 1\"\n :class=\"[\n nsPager.is('active', currentPage === pageCount),\n nsPager.is('disabled', disabled),\n ]\"\n class=\"number\"\n :aria-current=\"currentPage === pageCount\"\n :aria-label=\"t('el.pagination.currentPage', { pager: pageCount })\"\n :tabindex=\"tabindex\"\n >\n {{ pageCount }}\n </li>\n </ul>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, watchEffect } from 'vue'\nimport { DArrowLeft, DArrowRight, MoreFilled } from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { paginationPagerProps } from './pager'\ndefineOptions({\n name: 'ElPaginationPager',\n})\nconst props = defineProps(paginationPagerProps)\nconst emit = defineEmits(['change'])\nconst nsPager = useNamespace('pager')\nconst nsIcon = useNamespace('icon')\nconst { t } = useLocale()\n\nconst showPrevMore = ref(false)\nconst showNextMore = ref(false)\nconst quickPrevHover = ref(false)\nconst quickNextHover = ref(false)\nconst quickPrevFocus = ref(false)\nconst quickNextFocus = ref(false)\nconst pagers = computed(() => {\n const pagerCount = props.pagerCount\n const halfPagerCount = (pagerCount - 1) / 2\n const currentPage = Number(props.currentPage)\n const pageCount = Number(props.pageCount)\n let showPrevMore = false\n let showNextMore = false\n if (pageCount > pagerCount) {\n if (currentPage > pagerCount - halfPagerCount) {\n showPrevMore = true\n }\n if (currentPage < pageCount - halfPagerCount) {\n showNextMore = true\n }\n }\n const array: number[] = []\n if (showPrevMore && !showNextMore) {\n const startPage = pageCount - (pagerCount - 2)\n for (let i = startPage; i < pageCount; i++) {\n array.push(i)\n }\n } else if (!showPrevMore && showNextMore) {\n for (let i = 2; i < pagerCount; i++) {\n array.push(i)\n }\n } else if (showPrevMore && showNextMore) {\n const offset = Math.floor(pagerCount / 2) - 1\n for (let i = currentPage - offset; i <= currentPage + offset; i++) {\n array.push(i)\n }\n } else {\n for (let i = 2; i < pageCount; i++) {\n array.push(i)\n }\n }\n return array\n})\n\nconst prevMoreKls = computed(() => [\n 'more',\n 'btn-quickprev',\n nsIcon.b(),\n nsPager.is('disabled', props.disabled),\n])\nconst nextMoreKls = computed(() => [\n 'more',\n 'btn-quicknext',\n nsIcon.b(),\n nsPager.is('disabled', props.disabled),\n])\n\nconst tabindex = computed(() => (props.disabled ? -1 : 0))\nwatchEffect(() => {\n const halfPagerCount = (props.pagerCount - 1) / 2\n showPrevMore.value = false\n showNextMore.value = false\n if (props.pageCount! > props.pagerCount) {\n if (props.currentPage > props.pagerCount - halfPagerCount) {\n showPrevMore.value = true\n }\n if (props.currentPage < props.pageCount! - halfPagerCount) {\n showNextMore.value = true\n }\n }\n})\nfunction onMouseEnter(forward = false) {\n if (props.disabled) return\n if (forward) {\n quickPrevHover.value = true\n } else {\n quickNextHover.value = true\n }\n}\nfunction onFocus(forward = false) {\n if (forward) {\n quickPrevFocus.value = true\n } else {\n quickNextFocus.value = true\n }\n}\nfunction onEnter(e: UIEvent) {\n const target = e.target as HTMLElement\n if (\n target.tagName.toLowerCase() === 'li' &&\n Array.from(target.classList).includes('number')\n ) {\n const newPage = Number(target.textContent)\n if (newPage !== props.currentPage) {\n emit('change', newPage)\n }\n } else if (\n target.tagName.toLowerCase() === 'li' &&\n Array.from(target.classList).includes('more')\n ) {\n onPagerClick(e)\n }\n}\nfunction onPagerClick(event: UIEvent) {\n const target = event.target as HTMLElement\n if (target.tagName.toLowerCase() === 'ul' || props.disabled) {\n return\n }\n let newPage = Number(target.textContent)\n const pageCount = props.pageCount!\n const currentPage = props.currentPage\n const pagerCountOffset = props.pagerCount - 2\n if (target.className.includes('more')) {\n if (target.className.includes('quickprev')) {\n newPage = currentPage - pagerCountOffset\n } else if (target.className.includes('quicknext')) {\n newPage = currentPage + pagerCountOffset\n }\n }\n if (!Number.isNaN(+newPage)) {\n if (newPage < 1) {\n newPage = 1\n }\n if (newPage > pageCount) {\n newPage = pageCount\n }\n }\n if (newPage !== currentPage) {\n emit('change', newPage)\n }\n}\n</script>\n"],"names":["showPrevMore","showNextMore"],"mappings":";;;;;;;;mCA2Ec,CAAA;AAAA,EACZ,IAAM,EAAA,mBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAGA,IAAM,MAAA,OAAA,GAAU,aAAa,OAAO,CAAA,CAAA;AACpC,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AAExB,IAAM,MAAA,YAAA,GAAe,IAAI,KAAK,CAAA,CAAA;AAC9B,IAAM,MAAA,YAAA,GAAe,IAAI,KAAK,CAAA,CAAA;AAC9B,IAAM,MAAA,cAAA,GAAiB,IAAI,KAAK,CAAA,CAAA;AAChC,IAAM,MAAA,cAAA,GAAiB,IAAI,KAAK,CAAA,CAAA;AAChC,IAAM,MAAA,cAAA,GAAiB,IAAI,KAAK,CAAA,CAAA;AAChC,IAAM,MAAA,cAAA,GAAiB,IAAI,KAAK,CAAA,CAAA;AAChC,IAAM,MAAA,MAAA,GAAS,SAAS,M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