@element-plus/nightly 0.0.20241119 → 0.0.20241120
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +150 -124
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +150 -124
- 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/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +193 -38
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +38 -193
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +69 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -69
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +45 -392
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +415 -45
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +13 -13
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +25 -50
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +50 -25
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +167 -15
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +15 -167
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +35 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -35
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +17 -102
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +102 -17
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +115 -47
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +47 -115
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +137 -93
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +93 -137
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +29 -63
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +63 -29
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar2.mjs +1 -1
- package/es/components/scrollbar/src/thumb.mjs +11 -130
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +130 -11
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +21 -91
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +91 -21
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +70 -25
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +25 -70
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/table/src/table.mjs +5 -3
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +2 -1
- package/es/components/tag/src/tag2.mjs +4 -1
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +1 -1
- package/es/components/upload/src/upload.mjs +98 -126
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +126 -98
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/index.mjs +13 -13
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/global.d.ts +2 -0
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +192 -38
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +38 -192
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +69 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -69
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +46 -392
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +415 -46
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +13 -13
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +26 -50
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +50 -26
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.js +167 -16
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +16 -167
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +35 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -35
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +18 -102
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +102 -18
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +115 -48
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +48 -115
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +137 -98
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +98 -137
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +31 -63
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +63 -31
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar2.js +1 -1
- package/lib/components/scrollbar/src/thumb.js +11 -130
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +130 -11
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/slider/src/button.js +22 -91
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +91 -22
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +70 -25
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +25 -70
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/table/src/table.js +5 -3
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +2 -1
- package/lib/components/tag/src/tag2.js +4 -1
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-list.js +1 -1
- package/lib/components/upload/src/upload.js +101 -126
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +126 -101
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/index.js +13 -13
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-image-viewer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/image-viewer.scss +4 -0
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"badge.mjs","sources":["../../../../../../packages/components/badge/src/badge.
|
1
|
+
{"version":3,"file":"badge.mjs","sources":["../../../../../../packages/components/badge/src/badge.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <slot />\n <transition :name=\"`${ns.namespace.value}-zoom-in-center`\">\n <sup\n v-show=\"!hidden && (content || isDot)\"\n :class=\"[\n ns.e('content'),\n ns.em('content', type),\n ns.is('fixed', !!$slots.default),\n ns.is('dot', isDot),\n ns.is('hide-zero', !showZero && props.value === 0),\n badgeClass,\n ]\"\n :style=\"style\"\n v-text=\"content\"\n />\n </transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { addUnit, isNumber } from '@element-plus/utils'\nimport { badgeProps } from './badge'\nimport type { StyleValue } from 'vue'\n\ndefineOptions({\n name: 'ElBadge',\n})\n\nconst props = defineProps(badgeProps)\n\nconst ns = useNamespace('badge')\n\nconst content = computed<string>(() => {\n if (props.isDot) return ''\n if (isNumber(props.value) && isNumber(props.max)) {\n return props.max < props.value ? `${props.max}+` : `${props.value}`\n }\n return `${props.value}`\n})\n\nconst style = computed<StyleValue>(() => {\n return [\n {\n backgroundColor: props.color,\n marginRight: addUnit(-(props.offset?.[0] ?? 0)),\n marginTop: addUnit(props.offset?.[1] ?? 0),\n },\n props.badgeStyle ?? {},\n ]\n})\n\ndefineExpose({\n /** @description badge content */\n content,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCA4Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAE/B,IAAM,MAAA,OAAA,GAAU,SAAiB,MAAM;AACrC,MAAI,IAAA,KAAA,CAAM;AACV,QAAA;AACE,MAAO,IAAA,QAAA,CAAA,KAAY,CAAA,KAAA,CAAA,IAAc,QAAA,CAAG,MAAM,GAAG,CAAA,EAAA;AAAoB,QACnE,OAAA,KAAA,CAAA,GAAA,GAAA,KAAA,CAAA,KAAA,GAAA,CAAA,EAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,CAAA,EAAA,KAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AACA,OAAO;AAAc,MACtB,OAAA,CAAA,EAAA,KAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AAED,KAAM,CAAA,CAAA;AACJ,IAAO,MAAA,KAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACL,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAAA,MAAA;AACyB,QAAA;AACuB,UAC9C,eAAmB,EAAA,KAAA,CAAA,KAAe;AAAO,UAC3C,WAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,MAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,CAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA,CAAA;AAAA,UACA,kBAAoB,CAAC,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,MAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,CAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA;AAAA,SACvB;AAAA,QACD,CAAA,EAAA,GAAA,KAAA,CAAA,UAAA,KAAA,IAAA,GAAA,EAAA,GAAA,EAAA;AAED,OAAa,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MACD,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,75 +1,38 @@
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, toDisplayString, vShow } from 'vue';
|
2
|
-
import '../../../hooks/index.mjs';
|
3
1
|
import '../../../utils/index.mjs';
|
4
|
-
import {
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
7
|
-
import { isNumber } from '../../../utils/types.mjs';
|
8
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
9
3
|
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
});
|
41
|
-
return (_ctx, _cache) => {
|
42
|
-
return openBlock(), createElementBlock("div", {
|
43
|
-
class: normalizeClass(unref(ns).b())
|
44
|
-
}, [
|
45
|
-
renderSlot(_ctx.$slots, "default"),
|
46
|
-
createVNode(Transition, {
|
47
|
-
name: `${unref(ns).namespace.value}-zoom-in-center`,
|
48
|
-
persisted: ""
|
49
|
-
}, {
|
50
|
-
default: withCtx(() => [
|
51
|
-
withDirectives(createElementVNode("sup", {
|
52
|
-
class: normalizeClass([
|
53
|
-
unref(ns).e("content"),
|
54
|
-
unref(ns).em("content", _ctx.type),
|
55
|
-
unref(ns).is("fixed", !!_ctx.$slots.default),
|
56
|
-
unref(ns).is("dot", _ctx.isDot),
|
57
|
-
unref(ns).is("hide-zero", !_ctx.showZero && props.value === 0),
|
58
|
-
_ctx.badgeClass
|
59
|
-
]),
|
60
|
-
style: normalizeStyle(unref(style)),
|
61
|
-
textContent: toDisplayString(unref(content))
|
62
|
-
}, null, 14, ["textContent"]), [
|
63
|
-
[vShow, !_ctx.hidden && (unref(content) || _ctx.isDot)]
|
64
|
-
])
|
65
|
-
]),
|
66
|
-
_: 1
|
67
|
-
}, 8, ["name"])
|
68
|
-
], 2);
|
69
|
-
};
|
4
|
+
const badgeProps = buildProps({
|
5
|
+
value: {
|
6
|
+
type: [String, Number],
|
7
|
+
default: ""
|
8
|
+
},
|
9
|
+
max: {
|
10
|
+
type: Number,
|
11
|
+
default: 99
|
12
|
+
},
|
13
|
+
isDot: Boolean,
|
14
|
+
hidden: Boolean,
|
15
|
+
type: {
|
16
|
+
type: String,
|
17
|
+
values: ["primary", "success", "warning", "info", "danger"],
|
18
|
+
default: "danger"
|
19
|
+
},
|
20
|
+
showZero: {
|
21
|
+
type: Boolean,
|
22
|
+
default: true
|
23
|
+
},
|
24
|
+
color: String,
|
25
|
+
badgeStyle: {
|
26
|
+
type: definePropType([String, Object, Array])
|
27
|
+
},
|
28
|
+
offset: {
|
29
|
+
type: definePropType(Array),
|
30
|
+
default: [0, 0]
|
31
|
+
},
|
32
|
+
badgeClass: {
|
33
|
+
type: String
|
70
34
|
}
|
71
35
|
});
|
72
|
-
var Badge = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "badge.vue"]]);
|
73
36
|
|
74
|
-
export {
|
37
|
+
export { badgeProps };
|
75
38
|
//# sourceMappingURL=badge2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"badge2.mjs","sources":["../../../../../../packages/components/badge/src/badge.
|
1
|
+
{"version":3,"file":"badge2.mjs","sources":["../../../../../../packages/components/badge/src/badge.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport const badgeProps = buildProps({\n /**\n * @description display value.\n */\n value: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.\n */\n max: {\n type: Number,\n default: 99,\n },\n /**\n * @description if a little dot is displayed.\n */\n isDot: Boolean,\n /**\n * @description hidden badge.\n */\n hidden: Boolean,\n /**\n * @description badge type.\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger'],\n default: 'danger',\n },\n /**\n * @description whether to show badge when value is zero.\n */\n showZero: {\n type: Boolean,\n default: true,\n },\n /**\n * @description customize dot background color\n */\n color: String,\n /**\n * @description CSS style of badge\n */\n badgeStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n /**\n * @description set offset of the badge\n */\n offset: {\n type: definePropType<[number, number]>(Array),\n default: [0, 0],\n },\n /**\n * @description custom class name of badge\n */\n badgeClass: {\n type: String,\n },\n} as const)\nexport type BadgeProps = ExtractPropTypes<typeof badgeProps>\n"],"names":[],"mappings":";;;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC;AAC/D,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import '../../utils/index.mjs';
|
2
|
-
import ImageViewer from './src/image-
|
3
|
-
export { imageViewerEmits, imageViewerProps } from './src/image-
|
2
|
+
import ImageViewer from './src/image-viewer2.mjs';
|
3
|
+
export { imageViewerEmits, imageViewerProps } from './src/image-viewer.mjs';
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
5
5
|
|
6
6
|
const ElImageViewer = withInstall(ImageViewer);
|
@@ -1,398 +1,51 @@
|
|
1
|
-
import { defineComponent, markRaw, ref, effectScope, shallowRef, computed, watch, nextTick, onMounted, openBlock, createBlock, unref, withCtx, createVNode, Transition, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createCommentVNode, createElementBlock, Fragment, resolveDynamicComponent, renderList, withDirectives, vShow, renderSlot } from 'vue';
|
2
|
-
import { useEventListener } from '@vueuse/core';
|
3
|
-
import { throttle } from 'lodash-unified';
|
4
|
-
import '../../../hooks/index.mjs';
|
5
|
-
import '../../../constants/index.mjs';
|
6
1
|
import '../../../utils/index.mjs';
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import { imageViewerProps, imageViewerEmits } from './image-viewer2.mjs';
|
11
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
12
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
13
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
14
|
-
import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
|
15
|
-
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
16
|
-
import { keysOf } from '../../../utils/objects.mjs';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { mutable } from '../../../utils/typescript.mjs';
|
4
|
+
import { isNumber } from '../../../utils/types.mjs';
|
17
5
|
|
18
|
-
const
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
const zIndex = ref((_a = props.zIndex) != null ? _a : nextZIndex());
|
55
|
-
const isSingle = computed(() => {
|
56
|
-
const { urlList } = props;
|
57
|
-
return urlList.length <= 1;
|
58
|
-
});
|
59
|
-
const isFirst = computed(() => {
|
60
|
-
return activeIndex.value === 0;
|
61
|
-
});
|
62
|
-
const isLast = computed(() => {
|
63
|
-
return activeIndex.value === props.urlList.length - 1;
|
64
|
-
});
|
65
|
-
const currentImg = computed(() => {
|
66
|
-
return props.urlList[activeIndex.value];
|
67
|
-
});
|
68
|
-
const arrowPrevKls = computed(() => [
|
69
|
-
ns.e("btn"),
|
70
|
-
ns.e("prev"),
|
71
|
-
ns.is("disabled", !props.infinite && isFirst.value)
|
72
|
-
]);
|
73
|
-
const arrowNextKls = computed(() => [
|
74
|
-
ns.e("btn"),
|
75
|
-
ns.e("next"),
|
76
|
-
ns.is("disabled", !props.infinite && isLast.value)
|
77
|
-
]);
|
78
|
-
const imgStyle = computed(() => {
|
79
|
-
const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;
|
80
|
-
let translateX = offsetX / scale;
|
81
|
-
let translateY = offsetY / scale;
|
82
|
-
const radian = deg * Math.PI / 180;
|
83
|
-
const cosRadian = Math.cos(radian);
|
84
|
-
const sinRadian = Math.sin(radian);
|
85
|
-
translateX = translateX * cosRadian + translateY * sinRadian;
|
86
|
-
translateY = translateY * cosRadian - offsetX / scale * sinRadian;
|
87
|
-
const style = {
|
88
|
-
transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
|
89
|
-
transition: enableTransition ? "transform .3s" : ""
|
90
|
-
};
|
91
|
-
if (mode.value.name === modes.CONTAIN.name) {
|
92
|
-
style.maxWidth = style.maxHeight = "100%";
|
93
|
-
}
|
94
|
-
return style;
|
95
|
-
});
|
96
|
-
function hide() {
|
97
|
-
unregisterEventListener();
|
98
|
-
emit("close");
|
99
|
-
}
|
100
|
-
function registerEventListener() {
|
101
|
-
const keydownHandler = throttle((e) => {
|
102
|
-
switch (e.code) {
|
103
|
-
case EVENT_CODE.esc:
|
104
|
-
props.closeOnPressEscape && hide();
|
105
|
-
break;
|
106
|
-
case EVENT_CODE.space:
|
107
|
-
toggleMode();
|
108
|
-
break;
|
109
|
-
case EVENT_CODE.left:
|
110
|
-
prev();
|
111
|
-
break;
|
112
|
-
case EVENT_CODE.up:
|
113
|
-
handleActions("zoomIn");
|
114
|
-
break;
|
115
|
-
case EVENT_CODE.right:
|
116
|
-
next();
|
117
|
-
break;
|
118
|
-
case EVENT_CODE.down:
|
119
|
-
handleActions("zoomOut");
|
120
|
-
break;
|
121
|
-
}
|
122
|
-
});
|
123
|
-
const mousewheelHandler = throttle((e) => {
|
124
|
-
const delta = e.deltaY || e.deltaX;
|
125
|
-
handleActions(delta < 0 ? "zoomIn" : "zoomOut", {
|
126
|
-
zoomRate: props.zoomRate,
|
127
|
-
enableTransition: false
|
128
|
-
});
|
129
|
-
});
|
130
|
-
scopeEventListener.run(() => {
|
131
|
-
useEventListener(document, "keydown", keydownHandler);
|
132
|
-
useEventListener(document, "wheel", mousewheelHandler);
|
133
|
-
});
|
134
|
-
}
|
135
|
-
function unregisterEventListener() {
|
136
|
-
scopeEventListener.stop();
|
137
|
-
}
|
138
|
-
function handleImgLoad() {
|
139
|
-
loading.value = false;
|
140
|
-
}
|
141
|
-
function handleImgError(e) {
|
142
|
-
loading.value = false;
|
143
|
-
e.target.alt = t("el.image.error");
|
144
|
-
}
|
145
|
-
function handleMouseDown(e) {
|
146
|
-
if (loading.value || e.button !== 0 || !wrapper.value)
|
147
|
-
return;
|
148
|
-
transform.value.enableTransition = false;
|
149
|
-
const { offsetX, offsetY } = transform.value;
|
150
|
-
const startX = e.pageX;
|
151
|
-
const startY = e.pageY;
|
152
|
-
const dragHandler = throttle((ev) => {
|
153
|
-
transform.value = {
|
154
|
-
...transform.value,
|
155
|
-
offsetX: offsetX + ev.pageX - startX,
|
156
|
-
offsetY: offsetY + ev.pageY - startY
|
157
|
-
};
|
158
|
-
});
|
159
|
-
const removeMousemove = useEventListener(document, "mousemove", dragHandler);
|
160
|
-
useEventListener(document, "mouseup", () => {
|
161
|
-
removeMousemove();
|
162
|
-
});
|
163
|
-
e.preventDefault();
|
164
|
-
}
|
165
|
-
function reset() {
|
166
|
-
transform.value = {
|
167
|
-
scale: 1,
|
168
|
-
deg: 0,
|
169
|
-
offsetX: 0,
|
170
|
-
offsetY: 0,
|
171
|
-
enableTransition: false
|
172
|
-
};
|
173
|
-
}
|
174
|
-
function toggleMode() {
|
175
|
-
if (loading.value)
|
176
|
-
return;
|
177
|
-
const modeNames = keysOf(modes);
|
178
|
-
const modeValues = Object.values(modes);
|
179
|
-
const currentMode = mode.value.name;
|
180
|
-
const index = modeValues.findIndex((i) => i.name === currentMode);
|
181
|
-
const nextIndex = (index + 1) % modeNames.length;
|
182
|
-
mode.value = modes[modeNames[nextIndex]];
|
183
|
-
reset();
|
184
|
-
}
|
185
|
-
function setActiveItem(index) {
|
186
|
-
const len = props.urlList.length;
|
187
|
-
activeIndex.value = (index + len) % len;
|
188
|
-
}
|
189
|
-
function prev() {
|
190
|
-
if (isFirst.value && !props.infinite)
|
191
|
-
return;
|
192
|
-
setActiveItem(activeIndex.value - 1);
|
193
|
-
}
|
194
|
-
function next() {
|
195
|
-
if (isLast.value && !props.infinite)
|
196
|
-
return;
|
197
|
-
setActiveItem(activeIndex.value + 1);
|
198
|
-
}
|
199
|
-
function handleActions(action, options = {}) {
|
200
|
-
if (loading.value)
|
201
|
-
return;
|
202
|
-
const { minScale, maxScale } = props;
|
203
|
-
const { zoomRate, rotateDeg, enableTransition } = {
|
204
|
-
zoomRate: props.zoomRate,
|
205
|
-
rotateDeg: 90,
|
206
|
-
enableTransition: true,
|
207
|
-
...options
|
208
|
-
};
|
209
|
-
switch (action) {
|
210
|
-
case "zoomOut":
|
211
|
-
if (transform.value.scale > minScale) {
|
212
|
-
transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
|
213
|
-
}
|
214
|
-
break;
|
215
|
-
case "zoomIn":
|
216
|
-
if (transform.value.scale < maxScale) {
|
217
|
-
transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
|
218
|
-
}
|
219
|
-
break;
|
220
|
-
case "clockwise":
|
221
|
-
transform.value.deg += rotateDeg;
|
222
|
-
emit("rotate", transform.value.deg);
|
223
|
-
break;
|
224
|
-
case "anticlockwise":
|
225
|
-
transform.value.deg -= rotateDeg;
|
226
|
-
emit("rotate", transform.value.deg);
|
227
|
-
break;
|
228
|
-
}
|
229
|
-
transform.value.enableTransition = enableTransition;
|
230
|
-
}
|
231
|
-
watch(currentImg, () => {
|
232
|
-
nextTick(() => {
|
233
|
-
const $img = imgRefs.value[0];
|
234
|
-
if (!($img == null ? void 0 : $img.complete)) {
|
235
|
-
loading.value = true;
|
236
|
-
}
|
237
|
-
});
|
238
|
-
});
|
239
|
-
watch(activeIndex, (val) => {
|
240
|
-
reset();
|
241
|
-
emit("switch", val);
|
242
|
-
});
|
243
|
-
onMounted(() => {
|
244
|
-
var _a2, _b;
|
245
|
-
registerEventListener();
|
246
|
-
(_b = (_a2 = wrapper.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
|
247
|
-
});
|
248
|
-
expose({
|
249
|
-
setActiveItem
|
250
|
-
});
|
251
|
-
return (_ctx, _cache) => {
|
252
|
-
return openBlock(), createBlock(unref(ElTeleport), {
|
253
|
-
to: "body",
|
254
|
-
disabled: !_ctx.teleported
|
255
|
-
}, {
|
256
|
-
default: withCtx(() => [
|
257
|
-
createVNode(Transition, {
|
258
|
-
name: "viewer-fade",
|
259
|
-
appear: ""
|
260
|
-
}, {
|
261
|
-
default: withCtx(() => [
|
262
|
-
createElementVNode("div", {
|
263
|
-
ref_key: "wrapper",
|
264
|
-
ref: wrapper,
|
265
|
-
tabindex: -1,
|
266
|
-
class: normalizeClass(unref(ns).e("wrapper")),
|
267
|
-
style: normalizeStyle({ zIndex: zIndex.value })
|
268
|
-
}, [
|
269
|
-
createElementVNode("div", {
|
270
|
-
class: normalizeClass(unref(ns).e("mask")),
|
271
|
-
onClick: withModifiers(($event) => _ctx.hideOnClickModal && hide(), ["self"])
|
272
|
-
}, null, 10, ["onClick"]),
|
273
|
-
createCommentVNode(" CLOSE "),
|
274
|
-
createElementVNode("span", {
|
275
|
-
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
|
276
|
-
onClick: hide
|
277
|
-
}, [
|
278
|
-
createVNode(unref(ElIcon), null, {
|
279
|
-
default: withCtx(() => [
|
280
|
-
createVNode(unref(Close))
|
281
|
-
]),
|
282
|
-
_: 1
|
283
|
-
})
|
284
|
-
], 2),
|
285
|
-
createCommentVNode(" ARROW "),
|
286
|
-
!unref(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
287
|
-
createElementVNode("span", {
|
288
|
-
class: normalizeClass(unref(arrowPrevKls)),
|
289
|
-
onClick: prev
|
290
|
-
}, [
|
291
|
-
createVNode(unref(ElIcon), null, {
|
292
|
-
default: withCtx(() => [
|
293
|
-
createVNode(unref(ArrowLeft))
|
294
|
-
]),
|
295
|
-
_: 1
|
296
|
-
})
|
297
|
-
], 2),
|
298
|
-
createElementVNode("span", {
|
299
|
-
class: normalizeClass(unref(arrowNextKls)),
|
300
|
-
onClick: next
|
301
|
-
}, [
|
302
|
-
createVNode(unref(ElIcon), null, {
|
303
|
-
default: withCtx(() => [
|
304
|
-
createVNode(unref(ArrowRight))
|
305
|
-
]),
|
306
|
-
_: 1
|
307
|
-
})
|
308
|
-
], 2)
|
309
|
-
], 64)) : createCommentVNode("v-if", true),
|
310
|
-
createCommentVNode(" ACTIONS "),
|
311
|
-
createElementVNode("div", {
|
312
|
-
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")])
|
313
|
-
}, [
|
314
|
-
createElementVNode("div", {
|
315
|
-
class: normalizeClass(unref(ns).e("actions__inner"))
|
316
|
-
}, [
|
317
|
-
createVNode(unref(ElIcon), {
|
318
|
-
onClick: ($event) => handleActions("zoomOut")
|
319
|
-
}, {
|
320
|
-
default: withCtx(() => [
|
321
|
-
createVNode(unref(ZoomOut))
|
322
|
-
]),
|
323
|
-
_: 1
|
324
|
-
}, 8, ["onClick"]),
|
325
|
-
createVNode(unref(ElIcon), {
|
326
|
-
onClick: ($event) => handleActions("zoomIn")
|
327
|
-
}, {
|
328
|
-
default: withCtx(() => [
|
329
|
-
createVNode(unref(ZoomIn))
|
330
|
-
]),
|
331
|
-
_: 1
|
332
|
-
}, 8, ["onClick"]),
|
333
|
-
createElementVNode("i", {
|
334
|
-
class: normalizeClass(unref(ns).e("actions__divider"))
|
335
|
-
}, null, 2),
|
336
|
-
createVNode(unref(ElIcon), { onClick: toggleMode }, {
|
337
|
-
default: withCtx(() => [
|
338
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(mode).icon)))
|
339
|
-
]),
|
340
|
-
_: 1
|
341
|
-
}),
|
342
|
-
createElementVNode("i", {
|
343
|
-
class: normalizeClass(unref(ns).e("actions__divider"))
|
344
|
-
}, null, 2),
|
345
|
-
createVNode(unref(ElIcon), {
|
346
|
-
onClick: ($event) => handleActions("anticlockwise")
|
347
|
-
}, {
|
348
|
-
default: withCtx(() => [
|
349
|
-
createVNode(unref(RefreshLeft))
|
350
|
-
]),
|
351
|
-
_: 1
|
352
|
-
}, 8, ["onClick"]),
|
353
|
-
createVNode(unref(ElIcon), {
|
354
|
-
onClick: ($event) => handleActions("clockwise")
|
355
|
-
}, {
|
356
|
-
default: withCtx(() => [
|
357
|
-
createVNode(unref(RefreshRight))
|
358
|
-
]),
|
359
|
-
_: 1
|
360
|
-
}, 8, ["onClick"])
|
361
|
-
], 2)
|
362
|
-
], 2),
|
363
|
-
createCommentVNode(" CANVAS "),
|
364
|
-
createElementVNode("div", {
|
365
|
-
class: normalizeClass(unref(ns).e("canvas"))
|
366
|
-
}, [
|
367
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.urlList, (url, i) => {
|
368
|
-
return withDirectives((openBlock(), createElementBlock("img", {
|
369
|
-
ref_for: true,
|
370
|
-
ref: (el) => imgRefs.value[i] = el,
|
371
|
-
key: url,
|
372
|
-
src: url,
|
373
|
-
style: normalizeStyle(unref(imgStyle)),
|
374
|
-
class: normalizeClass(unref(ns).e("img")),
|
375
|
-
crossorigin: _ctx.crossorigin,
|
376
|
-
onLoad: handleImgLoad,
|
377
|
-
onError: handleImgError,
|
378
|
-
onMousedown: handleMouseDown
|
379
|
-
}, null, 46, ["src", "crossorigin"])), [
|
380
|
-
[vShow, i === activeIndex.value]
|
381
|
-
]);
|
382
|
-
}), 128))
|
383
|
-
], 2),
|
384
|
-
renderSlot(_ctx.$slots, "default")
|
385
|
-
], 6)
|
386
|
-
]),
|
387
|
-
_: 3
|
388
|
-
})
|
389
|
-
]),
|
390
|
-
_: 3
|
391
|
-
}, 8, ["disabled"]);
|
392
|
-
};
|
6
|
+
const imageViewerProps = buildProps({
|
7
|
+
urlList: {
|
8
|
+
type: definePropType(Array),
|
9
|
+
default: () => mutable([])
|
10
|
+
},
|
11
|
+
zIndex: {
|
12
|
+
type: Number
|
13
|
+
},
|
14
|
+
initialIndex: {
|
15
|
+
type: Number,
|
16
|
+
default: 0
|
17
|
+
},
|
18
|
+
infinite: {
|
19
|
+
type: Boolean,
|
20
|
+
default: true
|
21
|
+
},
|
22
|
+
hideOnClickModal: Boolean,
|
23
|
+
teleported: Boolean,
|
24
|
+
closeOnPressEscape: {
|
25
|
+
type: Boolean,
|
26
|
+
default: true
|
27
|
+
},
|
28
|
+
zoomRate: {
|
29
|
+
type: Number,
|
30
|
+
default: 1.2
|
31
|
+
},
|
32
|
+
minScale: {
|
33
|
+
type: Number,
|
34
|
+
default: 0.2
|
35
|
+
},
|
36
|
+
maxScale: {
|
37
|
+
type: Number,
|
38
|
+
default: 7
|
39
|
+
},
|
40
|
+
crossorigin: {
|
41
|
+
type: definePropType(String)
|
393
42
|
}
|
394
43
|
});
|
395
|
-
|
44
|
+
const imageViewerEmits = {
|
45
|
+
close: () => true,
|
46
|
+
switch: (index) => isNumber(index),
|
47
|
+
rotate: (deg) => isNumber(deg)
|
48
|
+
};
|
396
49
|
|
397
|
-
export {
|
50
|
+
export { imageViewerEmits, imageViewerProps };
|
398
51
|
//# sourceMappingURL=image-viewer.mjs.map
|