@element-plus/nightly 0.0.20250206 → 0.0.20250207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +3 -3
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -3
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3 -3
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.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 +25 -118
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +118 -25
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/cascader-panel/src/node.vue.d.ts +2 -1
- package/es/components/cascader-panel/src/node2.mjs +1 -1
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +16 -34
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +34 -16
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +11 -52
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +52 -11
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/index.mjs +10 -10
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +60 -349
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +349 -60
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +24 -49
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +49 -24
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +7 -36
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +36 -7
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/index.mjs +1 -1
- package/es/components/select/src/select.mjs +113 -429
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +429 -113
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +69 -25
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +25 -69
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +67 -21
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +21 -67
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/index.mjs +10 -10
- package/es/locale/index.d.ts +8 -0
- package/es/locale/index.mjs +8 -0
- package/es/locale/index.mjs.map +1 -1
- package/es/locales.mjs +8 -0
- package/es/locales.mjs.map +1 -1
- 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 +26 -118
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +118 -26
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/cascader-panel/src/node.vue.d.ts +2 -1
- package/lib/components/cascader-panel/src/node2.js +1 -1
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +16 -34
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +34 -16
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +11 -52
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +52 -11
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/index.js +10 -10
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +59 -347
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +347 -59
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +25 -49
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +49 -25
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +8 -36
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +36 -8
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +56 -170
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +170 -56
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/select/src/select.js +113 -429
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select2.js +429 -113
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +69 -25
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +25 -69
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +67 -21
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +21 -67
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/index.js +10 -10
- package/lib/locale/index.d.ts +8 -0
- package/lib/locale/index.js +16 -0
- package/lib/locale/index.js.map +1 -1
- package/lib/locales.js +16 -0
- package/lib/locales.js.map +1 -1
- 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,29 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, renderSlot } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import { linkProps, linkEmits } from './link.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
6
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
const __default__ = defineComponent({
|
|
8
|
+
name: "ElLink"
|
|
9
|
+
});
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
...__default__,
|
|
12
|
+
props: linkProps,
|
|
13
|
+
emits: linkEmits,
|
|
14
|
+
setup(__props, { emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const ns = useNamespace("link");
|
|
17
|
+
const linkKls = computed(() => [
|
|
18
|
+
ns.b(),
|
|
19
|
+
ns.m(props.type),
|
|
20
|
+
ns.is("disabled", props.disabled),
|
|
21
|
+
ns.is("underline", props.underline && !props.disabled)
|
|
22
|
+
]);
|
|
23
|
+
function handleClick(event) {
|
|
24
|
+
if (!props.disabled)
|
|
25
|
+
emit("click", event);
|
|
26
|
+
}
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createElementBlock("a", {
|
|
29
|
+
class: normalizeClass(unref(linkKls)),
|
|
30
|
+
href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
|
|
31
|
+
target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target,
|
|
32
|
+
onClick: handleClick
|
|
33
|
+
}, [
|
|
34
|
+
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
35
|
+
default: withCtx(() => [
|
|
36
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
})) : createCommentVNode("v-if", true),
|
|
40
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
41
|
+
key: 1,
|
|
42
|
+
class: normalizeClass(unref(ns).e("inner"))
|
|
43
|
+
}, [
|
|
44
|
+
renderSlot(_ctx.$slots, "default")
|
|
45
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
46
|
+
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
|
|
47
|
+
], 10, ["href", "target"]);
|
|
48
|
+
};
|
|
22
49
|
}
|
|
23
50
|
});
|
|
24
|
-
|
|
25
|
-
click: (evt) => evt instanceof MouseEvent
|
|
26
|
-
};
|
|
51
|
+
var Link = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "link.vue"]]);
|
|
27
52
|
|
|
28
|
-
export {
|
|
53
|
+
export { Link as default };
|
|
29
54
|
//# sourceMappingURL=link2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link2.mjs","sources":["../../../../../../packages/components/link/src/link.
|
|
1
|
+
{"version":3,"file":"link2.mjs","sources":["../../../../../../packages/components/link/src/link.vue"],"sourcesContent":["<template>\n <a\n :class=\"linkKls\"\n :href=\"disabled || !href ? undefined : href\"\n :target=\"disabled || !href ? undefined : target\"\n @click=\"handleClick\"\n >\n <el-icon v-if=\"icon\"><component :is=\"icon\" /></el-icon>\n <span v-if=\"$slots.default\" :class=\"ns.e('inner')\">\n <slot />\n </span>\n\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n </a>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { linkEmits, linkProps } from './link'\n\ndefineOptions({\n name: 'ElLink',\n})\nconst props = defineProps(linkProps)\nconst emit = defineEmits(linkEmits)\n\nconst ns = useNamespace('link')\n\nconst linkKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.is('disabled', props.disabled),\n ns.is('underline', props.underline && !props.disabled),\n])\n\nfunction handleClick(event: MouseEvent) {\n if (!props.disabled) emit('click', event)\n}\n</script>\n"],"names":[],"mappings":";;;;;;mCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAAA,MAC7B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACf,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,QAAQ,CAAA;AAAA,MAChC,GAAG,EAAG,CAAA,WAAA,EAAa,MAAM,SAAa,IAAA,CAAC,MAAM,QAAQ,CAAA;AAAA,KACtD,CAAA,CAAA;AAED,IAAA,SAAS,YAAY,KAAmB,EAAA;AACtC,MAAA,IAAI,CAAC,KAAA,CAAM,QAAU;AAAmB,QAC1C,IAAA,CAAA,OAAA,EAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import Popper from './src/popper2.mjs';
|
|
2
|
-
export { default as ElPopperArrow } from './src/
|
|
2
|
+
export { default as ElPopperArrow } from './src/arrow2.mjs';
|
|
3
3
|
export { default as ElPopperTrigger } from './src/trigger2.mjs';
|
|
4
4
|
export { default as ElPopperContent } from './src/content2.mjs';
|
|
5
5
|
export { Effect, popperProps, roleTypes, usePopperProps } from './src/popper.mjs';
|
|
6
6
|
export { popperTriggerProps, usePopperTriggerProps } from './src/trigger.mjs';
|
|
7
7
|
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './src/content.mjs';
|
|
8
|
-
export { popperArrowProps, usePopperArrowProps } from './src/
|
|
8
|
+
export { popperArrowProps, usePopperArrowProps } from './src/arrow.mjs';
|
|
9
9
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './src/constants.mjs';
|
|
10
10
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
11
11
|
|
|
@@ -1,41 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { POPPER_CONTENT_INJECTION_KEY } from './constants.mjs';
|
|
3
|
-
import { popperArrowProps } from './arrow2.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
6
2
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
...__default__,
|
|
13
|
-
props: popperArrowProps,
|
|
14
|
-
setup(__props, { expose }) {
|
|
15
|
-
const props = __props;
|
|
16
|
-
const ns = useNamespace("popper");
|
|
17
|
-
const { arrowOffset, arrowRef, arrowStyle } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
|
|
18
|
-
watch(() => props.arrowOffset, (val) => {
|
|
19
|
-
arrowOffset.value = val;
|
|
20
|
-
});
|
|
21
|
-
onBeforeUnmount(() => {
|
|
22
|
-
arrowRef.value = void 0;
|
|
23
|
-
});
|
|
24
|
-
expose({
|
|
25
|
-
arrowRef
|
|
26
|
-
});
|
|
27
|
-
return (_ctx, _cache) => {
|
|
28
|
-
return openBlock(), createElementBlock("span", {
|
|
29
|
-
ref_key: "arrowRef",
|
|
30
|
-
ref: arrowRef,
|
|
31
|
-
class: normalizeClass(unref(ns).e("arrow")),
|
|
32
|
-
style: normalizeStyle(unref(arrowStyle)),
|
|
33
|
-
"data-popper-arrow": ""
|
|
34
|
-
}, null, 6);
|
|
35
|
-
};
|
|
3
|
+
const popperArrowProps = buildProps({
|
|
4
|
+
arrowOffset: {
|
|
5
|
+
type: Number,
|
|
6
|
+
default: 5
|
|
36
7
|
}
|
|
37
8
|
});
|
|
38
|
-
|
|
9
|
+
const usePopperArrowProps = popperArrowProps;
|
|
39
10
|
|
|
40
|
-
export {
|
|
11
|
+
export { popperArrowProps, usePopperArrowProps };
|
|
41
12
|
//# sourceMappingURL=arrow.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/popper/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/popper/src/arrow.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Arrow from './arrow.vue'\n\nexport const popperArrowProps = buildProps({\n arrowOffset: {\n type: Number,\n default: 5,\n },\n} as const)\nexport type PopperArrowProps = ExtractPropTypes<typeof popperArrowProps>\n\nexport type PopperArrowInstance = InstanceType<typeof Arrow>\n\n/** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */\nexport const usePopperArrowProps = popperArrowProps\n\n/** @deprecated use `PopperArrowProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperArrowProps = PopperArrowProps\n\n/** @deprecated use `PopperArrowInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowInstance = PopperArrowInstance\n"],"names":[],"mappings":";;AACY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,CAAC,EAAE;AACS,MAAC,mBAAmB,GAAG;;;;"}
|
|
@@ -1,12 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, inject, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle } from 'vue';
|
|
2
|
+
import { POPPER_CONTENT_INJECTION_KEY } from './constants.mjs';
|
|
3
|
+
import { popperArrowProps } from './arrow.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
2
6
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
const __default__ = defineComponent({
|
|
8
|
+
name: "ElPopperArrow",
|
|
9
|
+
inheritAttrs: false
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: popperArrowProps,
|
|
14
|
+
setup(__props, { expose }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const ns = useNamespace("popper");
|
|
17
|
+
const { arrowOffset, arrowRef, arrowStyle } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
|
|
18
|
+
watch(() => props.arrowOffset, (val) => {
|
|
19
|
+
arrowOffset.value = val;
|
|
20
|
+
});
|
|
21
|
+
onBeforeUnmount(() => {
|
|
22
|
+
arrowRef.value = void 0;
|
|
23
|
+
});
|
|
24
|
+
expose({
|
|
25
|
+
arrowRef
|
|
26
|
+
});
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createElementBlock("span", {
|
|
29
|
+
ref_key: "arrowRef",
|
|
30
|
+
ref: arrowRef,
|
|
31
|
+
class: normalizeClass(unref(ns).e("arrow")),
|
|
32
|
+
style: normalizeStyle(unref(arrowStyle)),
|
|
33
|
+
"data-popper-arrow": ""
|
|
34
|
+
}, null, 6);
|
|
35
|
+
};
|
|
7
36
|
}
|
|
8
37
|
});
|
|
9
|
-
|
|
38
|
+
var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
|
|
10
39
|
|
|
11
|
-
export {
|
|
40
|
+
export { ElPopperArrow as default };
|
|
12
41
|
//# sourceMappingURL=arrow2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/popper/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/popper/src/arrow.vue"],"sourcesContent":["<template>\n <span\n ref=\"arrowRef\"\n :class=\"ns.e('arrow')\"\n :style=\"arrowStyle\"\n data-popper-arrow\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject, onBeforeUnmount, watch } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperArrowProps } from './arrow'\n\ndefineOptions({\n name: 'ElPopperArrow',\n inheritAttrs: false,\n})\n\nconst props = defineProps(popperArrowProps)\n\nconst ns = useNamespace('popper')\nconst { arrowOffset, arrowRef, arrowStyle } = inject(\n POPPER_CONTENT_INJECTION_KEY,\n undefined\n)!\n\nwatch(\n () => props.arrowOffset,\n (val) => {\n arrowOffset.value = val\n }\n)\nonBeforeUnmount(() => {\n arrowRef.value = undefined\n})\n\ndefineExpose({\n /**\n * @description Arrow element\n */\n arrowRef,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_normalizeStyle"],"mappings":";;;;;;mCAec,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAChC,IAAA,MAAM,EAAE,WAAA,EAAa,QAAU,EAAA,UAAA,EAAe,GAAA,MAAA,CAAA,4BAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAAA,IAC5C,KAAA,CAAA,MAAA,KAAA,CAAA,WAAA,EAAA,CAAA,GAAA,KAAA;AAAA,MACA,WAAA,CAAA,KAAA,GAAA,GAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAEA,IAAA,eAAA,CAAA,MAAA;AAAA,MACE,QAAY,CAAA,KAAA,GAAA,KAAA,CAAA,CAAA;AAAA,KAAA,CACZ,CAAC;AACC,IAAA,MAAA,CAAA;AAAoB,MACtB,QAAA;AAAA,KACF,CAAA,CAAA;AACA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAsB,KAAA;AACpB,MAAA,OAAAA,SAAiB,EAAA,EAAAC,kBAAA,CAAA,MAAA,EAAA;AAAA,QAClB,OAAA,EAAA,UAAA;AAED,QAAa,GAAA,EAAA,QAAA;AAAA,QAAA,KAAA,EAAAC,cAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA;AAAA,QAAA,KAAA,EAAAC,cAAA,CAAAD,KAAA,CAAA,UAAA,CAAA,CAAA;AAAA,QAAA,mBAAA,EAAA,EAAA;AAAA,OAIX,EAAA,IAAA,EAAA,CAAA,CAAA,CAAA;AAAA,KACD,CAAA;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Scrollbar from './src/
|
|
1
|
+
import Scrollbar from './src/scrollbar2.mjs';
|
|
2
2
|
export { BAR_MAP, GAP, renderThumbStyle } from './src/util.mjs';
|
|
3
|
-
export { scrollbarEmits, scrollbarProps } from './src/
|
|
3
|
+
export { scrollbarEmits, scrollbarProps } from './src/scrollbar.mjs';
|
|
4
4
|
export { thumbProps } from './src/thumb.mjs';
|
|
5
5
|
export { scrollbarContextKey } from './src/constants.mjs';
|
|
6
6
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
@@ -1,175 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import Bar from './bar2.mjs';
|
|
4
|
-
import { scrollbarContextKey } from './constants.mjs';
|
|
5
|
-
import { scrollbarProps, scrollbarEmits } from './scrollbar2.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
9
|
-
import { isObject } from '@vue/shared';
|
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
2
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
|
10
3
|
import { isNumber } from '../../../utils/types.mjs';
|
|
11
|
-
import { debugWarn } from '../../../utils/error.mjs';
|
|
12
4
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
const scrollbarProps = buildProps({
|
|
6
|
+
height: {
|
|
7
|
+
type: [String, Number],
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
maxHeight: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
native: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
wrapStyle: {
|
|
19
|
+
type: definePropType([String, Object, Array]),
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
wrapClass: {
|
|
23
|
+
type: [String, Array],
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
viewClass: {
|
|
27
|
+
type: [String, Array],
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
viewStyle: {
|
|
31
|
+
type: [String, Array, Object],
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
noresize: Boolean,
|
|
35
|
+
tag: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "div"
|
|
38
|
+
},
|
|
39
|
+
always: Boolean,
|
|
40
|
+
minSize: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 20
|
|
43
|
+
},
|
|
44
|
+
tabindex: {
|
|
45
|
+
type: [String, Number],
|
|
46
|
+
default: void 0
|
|
47
|
+
},
|
|
48
|
+
id: String,
|
|
49
|
+
role: String,
|
|
50
|
+
...useAriaProps(["ariaLabel", "ariaOrientation"])
|
|
16
51
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const ns = useNamespace("scrollbar");
|
|
24
|
-
let stopResizeObserver = void 0;
|
|
25
|
-
let stopResizeListener = void 0;
|
|
26
|
-
let wrapScrollTop = 0;
|
|
27
|
-
let wrapScrollLeft = 0;
|
|
28
|
-
const scrollbarRef = ref();
|
|
29
|
-
const wrapRef = ref();
|
|
30
|
-
const resizeRef = ref();
|
|
31
|
-
const barRef = ref();
|
|
32
|
-
const wrapStyle = computed(() => {
|
|
33
|
-
const style = {};
|
|
34
|
-
if (props.height)
|
|
35
|
-
style.height = addUnit(props.height);
|
|
36
|
-
if (props.maxHeight)
|
|
37
|
-
style.maxHeight = addUnit(props.maxHeight);
|
|
38
|
-
return [props.wrapStyle, style];
|
|
39
|
-
});
|
|
40
|
-
const wrapKls = computed(() => {
|
|
41
|
-
return [
|
|
42
|
-
props.wrapClass,
|
|
43
|
-
ns.e("wrap"),
|
|
44
|
-
{ [ns.em("wrap", "hidden-default")]: !props.native }
|
|
45
|
-
];
|
|
46
|
-
});
|
|
47
|
-
const resizeKls = computed(() => {
|
|
48
|
-
return [ns.e("view"), props.viewClass];
|
|
49
|
-
});
|
|
50
|
-
const handleScroll = () => {
|
|
51
|
-
var _a;
|
|
52
|
-
if (wrapRef.value) {
|
|
53
|
-
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
54
|
-
wrapScrollTop = wrapRef.value.scrollTop;
|
|
55
|
-
wrapScrollLeft = wrapRef.value.scrollLeft;
|
|
56
|
-
emit("scroll", {
|
|
57
|
-
scrollTop: wrapRef.value.scrollTop,
|
|
58
|
-
scrollLeft: wrapRef.value.scrollLeft
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
function scrollTo(arg1, arg2) {
|
|
63
|
-
if (isObject(arg1)) {
|
|
64
|
-
wrapRef.value.scrollTo(arg1);
|
|
65
|
-
} else if (isNumber(arg1) && isNumber(arg2)) {
|
|
66
|
-
wrapRef.value.scrollTo(arg1, arg2);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
const setScrollTop = (value) => {
|
|
70
|
-
if (!isNumber(value)) {
|
|
71
|
-
debugWarn(COMPONENT_NAME, "value must be a number");
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
wrapRef.value.scrollTop = value;
|
|
75
|
-
};
|
|
76
|
-
const setScrollLeft = (value) => {
|
|
77
|
-
if (!isNumber(value)) {
|
|
78
|
-
debugWarn(COMPONENT_NAME, "value must be a number");
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
wrapRef.value.scrollLeft = value;
|
|
82
|
-
};
|
|
83
|
-
const update = () => {
|
|
84
|
-
var _a;
|
|
85
|
-
(_a = barRef.value) == null ? void 0 : _a.update();
|
|
86
|
-
};
|
|
87
|
-
watch(() => props.noresize, (noresize) => {
|
|
88
|
-
if (noresize) {
|
|
89
|
-
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
90
|
-
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
91
|
-
} else {
|
|
92
|
-
({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update));
|
|
93
|
-
stopResizeListener = useEventListener("resize", update);
|
|
94
|
-
}
|
|
95
|
-
}, { immediate: true });
|
|
96
|
-
watch(() => [props.maxHeight, props.height], () => {
|
|
97
|
-
if (!props.native)
|
|
98
|
-
nextTick(() => {
|
|
99
|
-
var _a;
|
|
100
|
-
update();
|
|
101
|
-
if (wrapRef.value) {
|
|
102
|
-
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
provide(scrollbarContextKey, reactive({
|
|
107
|
-
scrollbarElement: scrollbarRef,
|
|
108
|
-
wrapElement: wrapRef
|
|
109
|
-
}));
|
|
110
|
-
onActivated(() => {
|
|
111
|
-
if (wrapRef.value) {
|
|
112
|
-
wrapRef.value.scrollTop = wrapScrollTop;
|
|
113
|
-
wrapRef.value.scrollLeft = wrapScrollLeft;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
onMounted(() => {
|
|
117
|
-
if (!props.native)
|
|
118
|
-
nextTick(() => {
|
|
119
|
-
update();
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
onUpdated(() => update());
|
|
123
|
-
expose({
|
|
124
|
-
wrapRef,
|
|
125
|
-
update,
|
|
126
|
-
scrollTo,
|
|
127
|
-
setScrollTop,
|
|
128
|
-
setScrollLeft,
|
|
129
|
-
handleScroll
|
|
130
|
-
});
|
|
131
|
-
return (_ctx, _cache) => {
|
|
132
|
-
return openBlock(), createElementBlock("div", {
|
|
133
|
-
ref_key: "scrollbarRef",
|
|
134
|
-
ref: scrollbarRef,
|
|
135
|
-
class: normalizeClass(unref(ns).b())
|
|
136
|
-
}, [
|
|
137
|
-
createElementVNode("div", {
|
|
138
|
-
ref_key: "wrapRef",
|
|
139
|
-
ref: wrapRef,
|
|
140
|
-
class: normalizeClass(unref(wrapKls)),
|
|
141
|
-
style: normalizeStyle(unref(wrapStyle)),
|
|
142
|
-
tabindex: _ctx.tabindex,
|
|
143
|
-
onScroll: handleScroll
|
|
144
|
-
}, [
|
|
145
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
146
|
-
id: _ctx.id,
|
|
147
|
-
ref_key: "resizeRef",
|
|
148
|
-
ref: resizeRef,
|
|
149
|
-
class: normalizeClass(unref(resizeKls)),
|
|
150
|
-
style: normalizeStyle(_ctx.viewStyle),
|
|
151
|
-
role: _ctx.role,
|
|
152
|
-
"aria-label": _ctx.ariaLabel,
|
|
153
|
-
"aria-orientation": _ctx.ariaOrientation
|
|
154
|
-
}, {
|
|
155
|
-
default: withCtx(() => [
|
|
156
|
-
renderSlot(_ctx.$slots, "default")
|
|
157
|
-
]),
|
|
158
|
-
_: 3
|
|
159
|
-
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
|
|
160
|
-
], 46, ["tabindex"]),
|
|
161
|
-
!_ctx.native ? (openBlock(), createBlock(Bar, {
|
|
162
|
-
key: 0,
|
|
163
|
-
ref_key: "barRef",
|
|
164
|
-
ref: barRef,
|
|
165
|
-
always: _ctx.always,
|
|
166
|
-
"min-size": _ctx.minSize
|
|
167
|
-
}, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true)
|
|
168
|
-
], 2);
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "scrollbar.vue"]]);
|
|
52
|
+
const scrollbarEmits = {
|
|
53
|
+
scroll: ({
|
|
54
|
+
scrollTop,
|
|
55
|
+
scrollLeft
|
|
56
|
+
}) => [scrollTop, scrollLeft].every(isNumber)
|
|
57
|
+
};
|
|
173
58
|
|
|
174
|
-
export {
|
|
59
|
+
export { scrollbarEmits, scrollbarProps };
|
|
175
60
|
//# sourceMappingURL=scrollbar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar.mjs","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.
|
|
1
|
+
{"version":3,"file":"scrollbar.mjs","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport const scrollbarProps = buildProps({\n /**\n * @description height of scrollbar\n */\n height: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description max height of scrollbar\n */\n maxHeight: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether to use the native scrollbar\n */\n native: {\n type: Boolean,\n default: false,\n },\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: [String, Array, Object],\n default: '',\n },\n /**\n * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance\n */\n noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能\n /**\n * @description element tag of the view\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description always show\n */\n always: Boolean,\n /**\n * @description minimum size of scrollbar\n */\n minSize: {\n type: Number,\n default: 20,\n },\n /**\n * @description Wrap tabindex\n */\n tabindex: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description id of view\n */\n id: String,\n /**\n * @description role of view\n */\n role: String,\n ...useAriaProps(['ariaLabel', 'ariaOrientation']),\n} as const)\nexport type ScrollbarProps = ExtractPropTypes<typeof scrollbarProps>\n\nexport const scrollbarEmits = {\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\n\nexport type ScrollbarInstance = InstanceType<typeof Scrollbar>\n"],"names":[],"mappings":";;;;AAEY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;AACzB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;AACzB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;AACjC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;AACnD,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,MAAM,EAAE,CAAC;AACX,IAAI,SAAS;AACb,IAAI,UAAU;AACd,GAAG,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;AAC/C;;;;"}
|