@element-plus/nightly 0.0.20261010 → 0.0.20261011
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +209 -39
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +209 -39
- 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/gl.js +1 -1
- package/dist/locale/gl.min.js +1 -1
- package/dist/locale/gl.min.mjs +1 -1
- package/dist/locale/gl.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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.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/autocomplete/src/autocomplete.vue.d.ts +3 -3
- package/es/components/cascader/src/cascader.vue.d.ts +2 -2
- package/es/components/cascader-panel/src/index.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/es/components/collapse/src/collapse.vue.d.ts +2 -2
- package/es/components/color-picker/src/color-picker.vue.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-panel.d.ts +2 -2
- package/es/components/dialog/src/dialog.vue.d.ts +2 -2
- package/es/components/drawer/src/drawer.vue.d.ts +2 -2
- package/es/components/dropdown/src/dropdown.vue.d.ts +3 -0
- package/es/components/input/src/input.vue.d.ts +4 -4
- package/es/components/input-number/src/input-number.vue.d.ts +2 -2
- package/es/components/input-otp/src/input-otp.vue.d.ts +2 -2
- package/es/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/es/components/mention/src/mention.vue.d.ts +2 -2
- package/es/components/message-box/src/index.vue.d.ts +10 -10
- package/es/components/radio/src/radio-group.vue.d.ts +2 -2
- package/es/components/radio/src/radio.vue.d.ts +2 -2
- package/es/components/rate/src/rate.vue.d.ts +2 -2
- package/es/components/scrollbar/src/mask-utils.d.ts +5 -0
- package/es/components/scrollbar/src/mask-utils.mjs +34 -0
- package/es/components/scrollbar/src/mask-utils.mjs.map +1 -0
- package/es/components/scrollbar/src/mask.mjs +7 -0
- package/es/components/scrollbar/src/mask.mjs.map +1 -0
- package/es/components/scrollbar/src/mask.vue.d.ts +14 -0
- package/es/components/scrollbar/src/mask.vue_vue_type_script_setup_true_lang.mjs +113 -0
- package/es/components/scrollbar/src/mask.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/scrollbar/src/scrollbar.d.ts +6 -0
- package/es/components/scrollbar/src/scrollbar.mjs +15 -0
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +1 -0
- package/es/components/scrollbar/src/scrollbar.vue_vue_type_script_setup_true_lang.mjs +56 -38
- package/es/components/scrollbar/src/scrollbar.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/segmented/index.d.ts +3 -3
- package/es/components/segmented/src/segmented.vue.d.ts +2 -2
- package/es/components/select/src/select.vue.d.ts +4 -1
- package/es/components/select-v2/src/select.vue.d.ts +1 -1
- package/es/components/slider/src/slider.vue.d.ts +2 -2
- package/es/components/switch/src/switch.vue.d.ts +2 -2
- package/es/components/table/src/filter-panel.vue.d.ts +13 -10
- package/es/components/table/src/table-header/index.d.ts +5 -5
- package/es/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/es/components/time-select/src/time-select.vue.d.ts +2 -2
- package/es/components/tour/src/tour.vue.d.ts +2 -2
- package/es/components/transfer/src/transfer.vue.d.ts +2 -2
- package/es/components/tree/src/tree-node.vue.d.ts +5 -5
- package/es/components/tree/src/tree.vue.d.ts +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
- package/lib/components/cascader/src/cascader.vue.d.ts +2 -2
- package/lib/components/cascader-panel/src/index.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/lib/components/collapse/src/collapse.vue.d.ts +2 -2
- package/lib/components/color-picker/src/color-picker.vue.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +2 -2
- package/lib/components/dialog/src/dialog.vue.d.ts +2 -2
- package/lib/components/drawer/src/drawer.vue.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -0
- package/lib/components/input/src/input.vue.d.ts +4 -4
- package/lib/components/input-number/src/input-number.vue.d.ts +2 -2
- package/lib/components/input-otp/src/input-otp.vue.d.ts +2 -2
- package/lib/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/lib/components/mention/src/mention.vue.d.ts +2 -2
- package/lib/components/message-box/src/index.vue.d.ts +10 -10
- package/lib/components/radio/src/radio-group.vue.d.ts +2 -2
- package/lib/components/radio/src/radio.vue.d.ts +2 -2
- package/lib/components/rate/src/rate.vue.d.ts +2 -2
- package/lib/components/scrollbar/src/mask-utils.d.ts +5 -0
- package/lib/components/scrollbar/src/mask-utils.js +35 -0
- package/lib/components/scrollbar/src/mask-utils.js.map +1 -0
- package/lib/components/scrollbar/src/mask.js +10 -0
- package/lib/components/scrollbar/src/mask.js.map +1 -0
- package/lib/components/scrollbar/src/mask.vue.d.ts +14 -0
- package/lib/components/scrollbar/src/mask.vue_vue_type_script_setup_true_lang.js +113 -0
- package/lib/components/scrollbar/src/mask.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/lib/components/scrollbar/src/scrollbar.d.ts +6 -0
- package/lib/components/scrollbar/src/scrollbar.js +15 -0
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +1 -0
- package/lib/components/scrollbar/src/scrollbar.vue_vue_type_script_setup_true_lang.js +55 -37
- package/lib/components/scrollbar/src/scrollbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/segmented/index.d.ts +3 -3
- package/lib/components/segmented/src/segmented.vue.d.ts +2 -2
- package/lib/components/select/src/select.vue.d.ts +4 -1
- package/lib/components/select-v2/src/select.vue.d.ts +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +2 -2
- package/lib/components/switch/src/switch.vue.d.ts +2 -2
- package/lib/components/table/src/filter-panel.vue.d.ts +13 -10
- package/lib/components/table/src/table-header/index.d.ts +5 -5
- package/lib/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -2
- package/lib/components/tour/src/tour.vue.d.ts +2 -2
- package/lib/components/transfer/src/transfer.vue.d.ts +2 -2
- package/lib/components/tree/src/tree-node.vue.d.ts +5 -5
- package/lib/components/tree/src/tree.vue.d.ts +5 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +3 -3
- package/tags.json +1 -1
- package/theme-chalk/el-scrollbar.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +8 -0
- package/theme-chalk/src/scrollbar.scss +65 -0
- package/web-types.json +1 -1
|
@@ -58,6 +58,11 @@ interface ScrollbarProps {
|
|
|
58
58
|
* @description always show
|
|
59
59
|
*/
|
|
60
60
|
always?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* @description show gradient masks at all edges or at the specified edge while more content can be scrolled to
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
mask?: boolean | ScrollbarDirection;
|
|
61
66
|
/**
|
|
62
67
|
* @description minimum size of scrollbar
|
|
63
68
|
* @default 20
|
|
@@ -107,6 +112,7 @@ declare const scrollbarProps: {
|
|
|
107
112
|
readonly noresize: BooleanConstructor;
|
|
108
113
|
readonly tag: EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
109
114
|
readonly always: BooleanConstructor;
|
|
115
|
+
readonly mask: EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "left" | "right" | "top" | "bottom", unknown, false, boolean>;
|
|
110
116
|
readonly minSize: EpPropFinalized<NumberConstructor, unknown, unknown, 20, boolean>;
|
|
111
117
|
readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, undefined, boolean>;
|
|
112
118
|
readonly id: StringConstructor;
|
|
@@ -95,6 +95,21 @@ const scrollbarProps = buildProps({
|
|
|
95
95
|
*/
|
|
96
96
|
always: Boolean,
|
|
97
97
|
/**
|
|
98
|
+
* @description show gradient masks at all edges or at the specified edge while more content can be scrolled to
|
|
99
|
+
*/
|
|
100
|
+
mask: {
|
|
101
|
+
type: [Boolean, String],
|
|
102
|
+
values: [
|
|
103
|
+
true,
|
|
104
|
+
false,
|
|
105
|
+
"top",
|
|
106
|
+
"bottom",
|
|
107
|
+
"left",
|
|
108
|
+
"right"
|
|
109
|
+
],
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
98
113
|
* @description minimum size of scrollbar
|
|
99
114
|
*/
|
|
100
115
|
minSize: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar.mjs","names":[],"sources":["../../../../../../packages/components/scrollbar/src/scrollbar.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { ClassValue } from '@element-plus/utils'\nimport type { ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport interface ScrollbarProps {\n /**\n * @description trigger distance(px)\n * @default 0\n */\n distance?: number\n /**\n * @description height of scrollbar\n * @default ''\n */\n height?: number | string\n /**\n * @description max height of scrollbar\n * @default ''\n */\n maxHeight?: number | string\n /**\n * @description whether to use the native scrollbar\n */\n native?: boolean\n /**\n * @description style of wrap\n * @default ''\n */\n wrapStyle?: StyleValue\n /**\n * @description class of wrap\n * @default ''\n */\n wrapClass?: ClassValue\n /**\n * @description class of view\n * @default ''\n */\n viewClass?: ClassValue\n /**\n * @description style of view\n * @default ''\n */\n viewStyle?: StyleValue\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\n /**\n * @description element tag of the view\n * @default 'div'\n */\n tag?: keyof HTMLElementTagNameMap | (string & {})\n /**\n * @description always show\n */\n always?: boolean\n /**\n * @description minimum size of scrollbar\n * @default 20\n */\n minSize?: number\n /**\n * @description Wrap tabindex\n * @default undefined\n */\n tabindex?: number | string\n /**\n * @description id of view\n */\n id?: string\n /**\n * @description role of view\n */\n role?: string\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel?: string\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation?: 'horizontal' | 'vertical' | 'undefined'\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.\n */\nexport const scrollbarProps = buildProps({\n /**\n * @description trigger distance(px)\n */\n distance: {\n type: Number,\n default: 0,\n },\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: Boolean,\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType<StyleValue>([String, Object, Array, Boolean]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: definePropType<StyleValue>([String, Object, Array, Boolean]),\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)\n\n/**\n * @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.\n */\nexport type ScrollbarPropsPublic = ExtractPublicPropTypes<typeof scrollbarProps>\n\nexport const scrollbarEmits = {\n 'end-reached': (direction: ScrollbarDirection) =>\n ['left', 'right', 'top', 'bottom'].includes(direction),\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\nexport type ScrollbarDirection = 'top' | 'bottom' | 'left' | 'right'\n\nexport type ScrollbarInstance = InstanceType<typeof Scrollbar> & unknown\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"scrollbar.mjs","names":[],"sources":["../../../../../../packages/components/scrollbar/src/scrollbar.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { ClassValue } from '@element-plus/utils'\nimport type { ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport interface ScrollbarProps {\n /**\n * @description trigger distance(px)\n * @default 0\n */\n distance?: number\n /**\n * @description height of scrollbar\n * @default ''\n */\n height?: number | string\n /**\n * @description max height of scrollbar\n * @default ''\n */\n maxHeight?: number | string\n /**\n * @description whether to use the native scrollbar\n */\n native?: boolean\n /**\n * @description style of wrap\n * @default ''\n */\n wrapStyle?: StyleValue\n /**\n * @description class of wrap\n * @default ''\n */\n wrapClass?: ClassValue\n /**\n * @description class of view\n * @default ''\n */\n viewClass?: ClassValue\n /**\n * @description style of view\n * @default ''\n */\n viewStyle?: StyleValue\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\n /**\n * @description element tag of the view\n * @default 'div'\n */\n tag?: keyof HTMLElementTagNameMap | (string & {})\n /**\n * @description always show\n */\n always?: boolean\n /**\n * @description show gradient masks at all edges or at the specified edge while more content can be scrolled to\n * @default false\n */\n mask?: boolean | ScrollbarDirection\n /**\n * @description minimum size of scrollbar\n * @default 20\n */\n minSize?: number\n /**\n * @description Wrap tabindex\n * @default undefined\n */\n tabindex?: number | string\n /**\n * @description id of view\n */\n id?: string\n /**\n * @description role of view\n */\n role?: string\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel?: string\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation?: 'horizontal' | 'vertical' | 'undefined'\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.\n */\nexport const scrollbarProps = buildProps({\n /**\n * @description trigger distance(px)\n */\n distance: {\n type: Number,\n default: 0,\n },\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: Boolean,\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType<StyleValue>([String, Object, Array, Boolean]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: definePropType<StyleValue>([String, Object, Array, Boolean]),\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 show gradient masks at all edges or at the specified edge while more content can be scrolled to\n */\n mask: {\n type: [Boolean, String],\n values: [true, false, 'top', 'bottom', 'left', 'right'],\n default: false,\n },\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)\n\n/**\n * @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.\n */\nexport type ScrollbarPropsPublic = ExtractPublicPropTypes<typeof scrollbarProps>\n\nexport const scrollbarEmits = {\n 'end-reached': (direction: ScrollbarDirection) =>\n ['left', 'right', 'top', 'bottom'].includes(direction),\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\nexport type ScrollbarDirection = 'top' | 'bottom' | 'left' | 'right'\n\nexport type ScrollbarInstance = InstanceType<typeof Scrollbar> & unknown\n"],"mappings":";;;;;;;AAgGA,MAAa,iBAAiB,WAAW;;;;CAIvC,UAAU;EACR,MAAM;EACN,SAAS;CACX;;;;CAIA,QAAQ;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACX;;;;CAIA,WAAW;EACT,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACX;;;;CAIA,QAAQ;;;;CAIR,WAAW;EACT,MAAM,eAA2B;GAAC;GAAQ;GAAQ;GAAO;EAAO,CAAC;EACjE,SAAS;CACX;;;;CAIA,WAAW;EACT,MAAM,eAA2B;GAAC;GAAQ;GAAO;GAAQ;EAAO,CAAC;EACjE,SAAS;CACX;;;;CAIA,WAAW;EACT,MAAM,eAA2B;GAAC;GAAQ;GAAO;GAAQ;EAAO,CAAC;EACjE,SAAS;CACX;;;;CAIA,WAAW;EACT,MAAM,eAA2B;GAAC;GAAQ;GAAQ;GAAO;EAAO,CAAC;EACjE,SAAS;CACX;;;;CAIA,UAAU;;;;CAIV,KAAK;EACH,MAAM;EACN,SAAS;CACX;;;;CAIA,QAAQ;;;;CAIR,MAAM;EACJ,MAAM,CAAC,SAAS,MAAM;EACtB,QAAQ;GAAC;GAAM;GAAO;GAAO;GAAU;GAAQ;EAAO;EACtD,SAAS;CACX;;;;CAIA,SAAS;EACP,MAAM;EACN,SAAS;CACX;;;;CAIA,UAAU;EACR,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS,KAAA;CACX;;;;CAIA,IAAI;;;;CAIJ,MAAM;CACN,GAAG,aAAa,CAAC,aAAa,iBAAiB,CAAC;AAClD,CAAU;AAOV,MAAa,iBAAiB;CAC5B,gBAAgB,cACd;EAAC;EAAQ;EAAS;EAAO;CAAQ,CAAC,CAAC,SAAS,SAAS;CACvD,SAAS,EACP,WACA,iBAII,CAAC,WAAW,UAAU,CAAC,CAAC,MAAM,QAAQ;AAC9C"}
|
|
@@ -32,6 +32,7 @@ declare const __VLS_base: _$vue.DefineComponent<ScrollbarProps, {
|
|
|
32
32
|
}>, {
|
|
33
33
|
tabindex: string | number;
|
|
34
34
|
height: string | number;
|
|
35
|
+
mask: boolean | ScrollbarDirection;
|
|
35
36
|
maxHeight: string | number;
|
|
36
37
|
tag: (string & {}) | keyof HTMLElementTagNameMap;
|
|
37
38
|
distance: number;
|
|
@@ -6,8 +6,9 @@ import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
|
|
6
6
|
import { scrollbarEmits, scrollbarProps } from "./scrollbar.mjs";
|
|
7
7
|
import { scrollbarContextKey } from "./constants.mjs";
|
|
8
8
|
import bar_default from "./bar2.mjs";
|
|
9
|
+
import mask_default from "./mask.mjs";
|
|
9
10
|
import { useEventListener, useResizeObserver } from "@vueuse/core";
|
|
10
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onActivated, onMounted, onUpdated, openBlock, provide, reactive, ref, renderSlot, resolveDynamicComponent, unref, watch, withCtx } from "vue";
|
|
11
|
+
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onActivated, onMounted, onUpdated, openBlock, provide, reactive, ref, renderSlot, resolveDynamicComponent, unref, watch, withCtx } from "vue";
|
|
11
12
|
//#region ../../packages/components/scrollbar/src/scrollbar.vue?vue&type=script&setup=true&lang.ts
|
|
12
13
|
const _hoisted_1 = ["tabindex"];
|
|
13
14
|
const COMPONENT_NAME = "ElScrollbar";
|
|
@@ -37,6 +38,7 @@ var scrollbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
37
38
|
const wrapRef = ref();
|
|
38
39
|
const resizeRef = ref();
|
|
39
40
|
const barRef = ref();
|
|
41
|
+
const maskRef = ref();
|
|
40
42
|
const wrapStyle = computed(() => {
|
|
41
43
|
const style = {};
|
|
42
44
|
const height = addUnit(props.height);
|
|
@@ -75,6 +77,7 @@ var scrollbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
75
77
|
const handleScroll = () => {
|
|
76
78
|
if (wrapRef.value) {
|
|
77
79
|
barRef.value?.handleScroll(wrapRef.value);
|
|
80
|
+
maskRef.value?.handleScroll();
|
|
78
81
|
const prevTop = wrapScrollTop;
|
|
79
82
|
const prevLeft = wrapScrollLeft;
|
|
80
83
|
wrapScrollTop = wrapRef.value.scrollTop;
|
|
@@ -118,6 +121,7 @@ var scrollbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
118
121
|
};
|
|
119
122
|
const update = () => {
|
|
120
123
|
barRef.value?.update();
|
|
124
|
+
maskRef.value?.update();
|
|
121
125
|
distanceScrollState[direction] = false;
|
|
122
126
|
if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value);
|
|
123
127
|
};
|
|
@@ -128,6 +132,7 @@ var scrollbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
128
132
|
if (!wrapRef.value) return;
|
|
129
133
|
barRef.value?.update();
|
|
130
134
|
barRef.value?.handleScroll(wrapRef.value);
|
|
135
|
+
maskRef.value?.update();
|
|
131
136
|
});
|
|
132
137
|
};
|
|
133
138
|
watch(() => props.noresize, (noresize) => {
|
|
@@ -142,7 +147,7 @@ var scrollbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
142
147
|
}
|
|
143
148
|
}, { immediate: true });
|
|
144
149
|
watch(() => [props.maxHeight, props.height], () => {
|
|
145
|
-
if (!props.native) nextTick(() => {
|
|
150
|
+
if (!props.native || props.mask) nextTick(() => {
|
|
146
151
|
update();
|
|
147
152
|
});
|
|
148
153
|
});
|
|
@@ -154,10 +159,11 @@ var scrollbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
154
159
|
if (wrapRef.value) {
|
|
155
160
|
wrapRef.value.scrollTop = wrapScrollTop;
|
|
156
161
|
wrapRef.value.scrollLeft = wrapScrollLeft;
|
|
162
|
+
maskRef.value?.update();
|
|
157
163
|
}
|
|
158
164
|
});
|
|
159
165
|
onMounted(() => {
|
|
160
|
-
if (!props.native) nextTick(() => {
|
|
166
|
+
if (!props.native || props.mask) nextTick(() => {
|
|
161
167
|
update();
|
|
162
168
|
});
|
|
163
169
|
});
|
|
@@ -181,41 +187,53 @@ var scrollbar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
181
187
|
ref_key: "scrollbarRef",
|
|
182
188
|
ref: scrollbarRef,
|
|
183
189
|
class: normalizeClass(unref(ns).b())
|
|
184
|
-
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
190
|
+
}, [
|
|
191
|
+
createElementVNode("div", {
|
|
192
|
+
ref_key: "wrapRef",
|
|
193
|
+
ref: wrapRef,
|
|
194
|
+
class: normalizeClass(wrapKls.value),
|
|
195
|
+
style: normalizeStyle(wrapStyle.value),
|
|
196
|
+
tabindex: __props.tabindex,
|
|
197
|
+
onScroll: handleScroll,
|
|
198
|
+
onTransitionend: updateBar,
|
|
199
|
+
onAnimationend: updateBar
|
|
200
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
|
|
201
|
+
id: __props.id,
|
|
202
|
+
ref_key: "resizeRef",
|
|
203
|
+
ref: resizeRef,
|
|
204
|
+
class: normalizeClass(resizeKls.value),
|
|
205
|
+
style: normalizeStyle(__props.viewStyle),
|
|
206
|
+
role: __props.role,
|
|
207
|
+
"aria-label": __props.ariaLabel,
|
|
208
|
+
"aria-orientation": __props.ariaOrientation
|
|
209
|
+
}, {
|
|
210
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
211
|
+
_: 3
|
|
212
|
+
}, 8, [
|
|
213
|
+
"id",
|
|
214
|
+
"class",
|
|
215
|
+
"style",
|
|
216
|
+
"role",
|
|
217
|
+
"aria-label",
|
|
218
|
+
"aria-orientation"
|
|
219
|
+
]))], 46, _hoisted_1),
|
|
220
|
+
createVNode(Transition, { name: unref(ns).b("mask-fade") }, {
|
|
221
|
+
default: withCtx(() => [__props.mask ? (openBlock(), createBlock(mask_default, {
|
|
222
|
+
key: 0,
|
|
223
|
+
ref_key: "maskRef",
|
|
224
|
+
ref: maskRef,
|
|
225
|
+
mask: __props.mask
|
|
226
|
+
}, null, 8, ["mask"])) : createCommentVNode("v-if", true)]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["name"]),
|
|
229
|
+
!__props.native ? (openBlock(), createBlock(bar_default, {
|
|
230
|
+
key: 0,
|
|
231
|
+
ref_key: "barRef",
|
|
232
|
+
ref: barRef,
|
|
233
|
+
always: __props.always,
|
|
234
|
+
"min-size": __props.minSize
|
|
235
|
+
}, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true)
|
|
236
|
+
], 2);
|
|
219
237
|
};
|
|
220
238
|
}
|
|
221
239
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar.vue_vue_type_script_setup_true_lang.mjs","names":[],"sources":["../../../../../../packages/components/scrollbar/src/scrollbar.vue"],"sourcesContent":["<template>\n <div ref=\"scrollbarRef\" :class=\"ns.b()\">\n <div\n ref=\"wrapRef\"\n :class=\"wrapKls\"\n :style=\"wrapStyle\"\n :tabindex=\"tabindex\"\n @scroll=\"handleScroll\"\n @transitionend=\"updateBar\"\n @animationend=\"updateBar\"\n >\n <component\n :is=\"tag\"\n :id=\"id\"\n ref=\"resizeRef\"\n :class=\"resizeKls\"\n :style=\"viewStyle\"\n :role=\"role\"\n :aria-label=\"ariaLabel\"\n :aria-orientation=\"ariaOrientation\"\n >\n <slot />\n </component>\n </div>\n <template v-if=\"!native\">\n <bar ref=\"barRef\" :always=\"always\" :min-size=\"minSize\" />\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onActivated,\n onMounted,\n onUpdated,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport {\n addUnit,\n debugWarn,\n isGreaterThan,\n isNumber,\n isObject,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Bar from './bar.vue'\nimport { scrollbarContextKey } from './constants'\nimport { scrollbarEmits } from './scrollbar'\n\nimport type { ScrollbarDirection, ScrollbarProps } from './scrollbar'\nimport type { BarInstance } from './bar'\nimport type { CSSProperties, StyleValue } from 'vue'\n\nconst COMPONENT_NAME = 'ElScrollbar'\n\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = withDefaults(defineProps<ScrollbarProps>(), {\n distance: 0,\n height: '',\n maxHeight: '',\n wrapStyle: '',\n wrapClass: '',\n viewStyle: '',\n viewClass: '',\n tag: 'div',\n minSize: 20,\n tabindex: undefined,\n})\nconst emit = defineEmits(scrollbarEmits)\n\nconst ns = useNamespace('scrollbar')\n\nlet stopResizeObserver: (() => void) | undefined = undefined\nlet stopWrapResizeObserver: (() => void) | undefined = undefined\nlet stopResizeListener: (() => void) | undefined = undefined\nlet rafId = 0\nlet wrapScrollTop = 0\nlet wrapScrollLeft = 0\nlet direction = '' as ScrollbarDirection\nconst distanceScrollState = {\n bottom: false,\n top: false,\n right: false,\n left: false,\n}\n\nconst scrollbarRef = ref<HTMLDivElement>()\nconst wrapRef = ref<HTMLDivElement>()\nconst resizeRef = ref<HTMLElement>()\nconst barRef = ref<BarInstance>()\n\nconst wrapStyle = computed<StyleValue>(() => {\n const style: CSSProperties = {}\n const height = addUnit(props.height)\n const maxHeight = addUnit(props.maxHeight)\n if (height) style.height = height\n if (maxHeight) style.maxHeight = maxHeight\n return [props.wrapStyle, style]\n})\n\nconst wrapKls = computed(() => {\n return [\n props.wrapClass,\n ns.e('wrap'),\n { [ns.em('wrap', 'hidden-default')]: !props.native },\n ]\n})\n\nconst resizeKls = computed(() => {\n return [ns.e('view'), props.viewClass]\n})\n\nconst shouldSkipDirection = (direction: ScrollbarDirection) => {\n return distanceScrollState[direction] ?? false\n}\n\nconst DIRECTION_PAIRS: Record<ScrollbarDirection, ScrollbarDirection> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n}\nconst updateTriggerStatus = (arrivedStates: Record<string, boolean>) => {\n const oppositeDirection = DIRECTION_PAIRS[direction]\n if (!oppositeDirection) return\n\n const arrived = arrivedStates[direction]\n const oppositeArrived = arrivedStates[oppositeDirection]\n\n if (arrived && !distanceScrollState[direction]) {\n distanceScrollState[direction] = true\n }\n\n if (!oppositeArrived && distanceScrollState[oppositeDirection]) {\n distanceScrollState[oppositeDirection] = false\n }\n}\n\nconst handleScroll = () => {\n if (wrapRef.value) {\n barRef.value?.handleScroll(wrapRef.value)\n const prevTop = wrapScrollTop\n const prevLeft = wrapScrollLeft\n wrapScrollTop = wrapRef.value.scrollTop\n wrapScrollLeft = wrapRef.value.scrollLeft\n\n const arrivedStates = {\n bottom: !isGreaterThan(\n wrapRef.value.scrollHeight - props.distance,\n wrapRef.value.clientHeight + wrapScrollTop\n ),\n top: wrapScrollTop <= props.distance && prevTop !== 0,\n right:\n !isGreaterThan(\n wrapRef.value.scrollWidth - props.distance,\n wrapRef.value.clientWidth + wrapScrollLeft\n ) && prevLeft !== wrapScrollLeft,\n left: wrapScrollLeft <= props.distance && prevLeft !== 0,\n }\n\n emit('scroll', {\n scrollTop: wrapScrollTop,\n scrollLeft: wrapScrollLeft,\n })\n\n if (prevTop !== wrapScrollTop) {\n direction = wrapScrollTop > prevTop ? 'bottom' : 'top'\n }\n if (prevLeft !== wrapScrollLeft) {\n direction = wrapScrollLeft > prevLeft ? 'right' : 'left'\n }\n if (props.distance > 0) {\n if (shouldSkipDirection(direction)) {\n return\n }\n updateTriggerStatus(arrivedStates)\n }\n if (arrivedStates[direction]) emit('end-reached', direction)\n }\n}\n\nfunction scrollTo(xCord: number, yCord?: number): void\nfunction scrollTo(options: ScrollToOptions): void\nfunction scrollTo(arg1: unknown, arg2?: number) {\n if (isObject(arg1)) {\n wrapRef.value!.scrollTo(arg1)\n } else if (isNumber(arg1) && isNumber(arg2)) {\n wrapRef.value!.scrollTo(arg1, arg2)\n }\n}\n\nconst setScrollTop = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollTop = value\n}\n\nconst setScrollLeft = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollLeft = value\n}\n\nconst update = () => {\n barRef.value?.update()\n distanceScrollState[direction] = false\n if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value)\n}\n\n// Transform-driven overflow (e.g. slide transitions) is not observable via\n// resize observers, so refresh the bar when transitions/animations end —\n// this applies even when `noresize` is set.\nconst updateBar = () => {\n if (rafId) return\n rafId = requestAnimationFrame(() => {\n rafId = 0\n if (!wrapRef.value) return\n\n // Bar state may be stale even when the final scroll dimensions match a\n // previously seen value (e.g. `onUpdated` measured the transient\n // overflow mid-transition), so always refresh the bar here.\n barRef.value?.update()\n barRef.value?.handleScroll(wrapRef.value)\n })\n}\n\nwatch(\n () => props.noresize,\n (noresize) => {\n if (noresize) {\n stopResizeObserver?.()\n stopWrapResizeObserver?.()\n stopResizeListener?.()\n } else {\n ;({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update))\n ;({ stop: stopWrapResizeObserver } = useResizeObserver(wrapRef, update))\n stopResizeListener = useEventListener('resize', update)\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => [props.maxHeight, props.height],\n () => {\n if (!props.native)\n nextTick(() => {\n update()\n })\n }\n)\n\nprovide(\n scrollbarContextKey,\n reactive({\n scrollbarElement: scrollbarRef,\n wrapElement: wrapRef,\n })\n)\n\nonActivated(() => {\n if (wrapRef.value) {\n wrapRef.value.scrollTop = wrapScrollTop\n wrapRef.value.scrollLeft = wrapScrollLeft\n }\n})\n\nonMounted(() => {\n if (!props.native)\n nextTick(() => {\n update()\n })\n})\nonUpdated(() => update())\n\ndefineExpose({\n /** @description scrollbar wrap ref */\n wrapRef,\n /** @description update scrollbar state manually */\n update,\n /** @description scrolls to a particular set of coordinates */\n scrollTo,\n /** @description set distance to scroll top */\n setScrollTop,\n /** @description set distance to scroll left */\n setScrollLeft,\n /** @description handle scroll event */\n handleScroll,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;AA2DA,MAAM,iBAAiB;;;;;;;EAMvB,MAAM,QAAQ;EAYd,MAAM,OAAO;EAEb,MAAM,KAAK,aAAa,WAAW;EAEnC,IAAI,qBAA+C,KAAA;EACnD,IAAI,yBAAmD,KAAA;EACvD,IAAI,qBAA+C,KAAA;EACnD,IAAI,QAAQ;EACZ,IAAI,gBAAgB;EACpB,IAAI,iBAAiB;EACrB,IAAI,YAAY;EAChB,MAAM,sBAAsB;GAC1B,QAAQ;GACR,KAAK;GACL,OAAO;GACP,MAAM;EACR;EAEA,MAAM,eAAe,IAAoB;EACzC,MAAM,UAAU,IAAoB;EACpC,MAAM,YAAY,IAAiB;EACnC,MAAM,SAAS,IAAiB;EAEhC,MAAM,YAAY,eAA2B;GA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AAA,GAAA,CAAA,QAAA,UACf,UAAA,GAAA,YAAyD,aAAA;;IAAhD,SAAA;IAAJ,KAAI;IAAU,QAAQ,QAAA;IAAS,YAAU,QAAA"}
|
|
1
|
+
{"version":3,"file":"scrollbar.vue_vue_type_script_setup_true_lang.mjs","names":[],"sources":["../../../../../../packages/components/scrollbar/src/scrollbar.vue"],"sourcesContent":["<template>\n <div ref=\"scrollbarRef\" :class=\"ns.b()\">\n <div\n ref=\"wrapRef\"\n :class=\"wrapKls\"\n :style=\"wrapStyle\"\n :tabindex=\"tabindex\"\n @scroll=\"handleScroll\"\n @transitionend=\"updateBar\"\n @animationend=\"updateBar\"\n >\n <component\n :is=\"tag\"\n :id=\"id\"\n ref=\"resizeRef\"\n :class=\"resizeKls\"\n :style=\"viewStyle\"\n :role=\"role\"\n :aria-label=\"ariaLabel\"\n :aria-orientation=\"ariaOrientation\"\n >\n <slot />\n </component>\n </div>\n <transition :name=\"ns.b('mask-fade')\">\n <scrollbar-mask v-if=\"mask\" ref=\"maskRef\" :mask=\"mask\" />\n </transition>\n <template v-if=\"!native\">\n <bar ref=\"barRef\" :always=\"always\" :min-size=\"minSize\" />\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onActivated,\n onMounted,\n onUpdated,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport {\n addUnit,\n debugWarn,\n isGreaterThan,\n isNumber,\n isObject,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Bar from './bar.vue'\nimport ScrollbarMask from './mask.vue'\nimport { scrollbarContextKey } from './constants'\nimport { scrollbarEmits } from './scrollbar'\n\nimport type { ScrollbarDirection, ScrollbarProps } from './scrollbar'\nimport type { BarInstance } from './bar'\nimport type { CSSProperties, StyleValue } from 'vue'\n\nconst COMPONENT_NAME = 'ElScrollbar'\n\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = withDefaults(defineProps<ScrollbarProps>(), {\n distance: 0,\n height: '',\n maxHeight: '',\n wrapStyle: '',\n wrapClass: '',\n viewStyle: '',\n viewClass: '',\n tag: 'div',\n mask: false,\n minSize: 20,\n tabindex: undefined,\n})\nconst emit = defineEmits(scrollbarEmits)\n\nconst ns = useNamespace('scrollbar')\n\nlet stopResizeObserver: (() => void) | undefined = undefined\nlet stopWrapResizeObserver: (() => void) | undefined = undefined\nlet stopResizeListener: (() => void) | undefined = undefined\nlet rafId = 0\nlet wrapScrollTop = 0\nlet wrapScrollLeft = 0\nlet direction = '' as ScrollbarDirection\nconst distanceScrollState = {\n bottom: false,\n top: false,\n right: false,\n left: false,\n}\n\nconst scrollbarRef = ref<HTMLDivElement>()\nconst wrapRef = ref<HTMLDivElement>()\nconst resizeRef = ref<HTMLElement>()\nconst barRef = ref<BarInstance>()\nconst maskRef = ref<InstanceType<typeof ScrollbarMask>>()\n\nconst wrapStyle = computed<StyleValue>(() => {\n const style: CSSProperties = {}\n const height = addUnit(props.height)\n const maxHeight = addUnit(props.maxHeight)\n if (height) style.height = height\n if (maxHeight) style.maxHeight = maxHeight\n return [props.wrapStyle, style]\n})\n\nconst wrapKls = computed(() => {\n return [\n props.wrapClass,\n ns.e('wrap'),\n { [ns.em('wrap', 'hidden-default')]: !props.native },\n ]\n})\n\nconst resizeKls = computed(() => {\n return [ns.e('view'), props.viewClass]\n})\n\nconst shouldSkipDirection = (direction: ScrollbarDirection) => {\n return distanceScrollState[direction] ?? false\n}\n\nconst DIRECTION_PAIRS: Record<ScrollbarDirection, ScrollbarDirection> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n}\nconst updateTriggerStatus = (arrivedStates: Record<string, boolean>) => {\n const oppositeDirection = DIRECTION_PAIRS[direction]\n if (!oppositeDirection) return\n\n const arrived = arrivedStates[direction]\n const oppositeArrived = arrivedStates[oppositeDirection]\n\n if (arrived && !distanceScrollState[direction]) {\n distanceScrollState[direction] = true\n }\n\n if (!oppositeArrived && distanceScrollState[oppositeDirection]) {\n distanceScrollState[oppositeDirection] = false\n }\n}\n\nconst handleScroll = () => {\n if (wrapRef.value) {\n barRef.value?.handleScroll(wrapRef.value)\n maskRef.value?.handleScroll()\n const prevTop = wrapScrollTop\n const prevLeft = wrapScrollLeft\n wrapScrollTop = wrapRef.value.scrollTop\n wrapScrollLeft = wrapRef.value.scrollLeft\n\n const arrivedStates = {\n bottom: !isGreaterThan(\n wrapRef.value.scrollHeight - props.distance,\n wrapRef.value.clientHeight + wrapScrollTop\n ),\n top: wrapScrollTop <= props.distance && prevTop !== 0,\n right:\n !isGreaterThan(\n wrapRef.value.scrollWidth - props.distance,\n wrapRef.value.clientWidth + wrapScrollLeft\n ) && prevLeft !== wrapScrollLeft,\n left: wrapScrollLeft <= props.distance && prevLeft !== 0,\n }\n\n emit('scroll', {\n scrollTop: wrapScrollTop,\n scrollLeft: wrapScrollLeft,\n })\n\n if (prevTop !== wrapScrollTop) {\n direction = wrapScrollTop > prevTop ? 'bottom' : 'top'\n }\n if (prevLeft !== wrapScrollLeft) {\n direction = wrapScrollLeft > prevLeft ? 'right' : 'left'\n }\n if (props.distance > 0) {\n if (shouldSkipDirection(direction)) {\n return\n }\n updateTriggerStatus(arrivedStates)\n }\n if (arrivedStates[direction]) emit('end-reached', direction)\n }\n}\n\nfunction scrollTo(xCord: number, yCord?: number): void\nfunction scrollTo(options: ScrollToOptions): void\nfunction scrollTo(arg1: unknown, arg2?: number) {\n if (isObject(arg1)) {\n wrapRef.value!.scrollTo(arg1)\n } else if (isNumber(arg1) && isNumber(arg2)) {\n wrapRef.value!.scrollTo(arg1, arg2)\n }\n}\n\nconst setScrollTop = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollTop = value\n}\n\nconst setScrollLeft = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollLeft = value\n}\n\nconst update = () => {\n barRef.value?.update()\n maskRef.value?.update()\n distanceScrollState[direction] = false\n if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value)\n}\n\n// Transform-driven overflow (e.g. slide transitions) is not observable via\n// resize observers, so refresh the bar when transitions/animations end —\n// this applies even when `noresize` is set.\nconst updateBar = () => {\n if (rafId) return\n rafId = requestAnimationFrame(() => {\n rafId = 0\n if (!wrapRef.value) return\n\n // Bar state may be stale even when the final scroll dimensions match a\n // previously seen value (e.g. `onUpdated` measured the transient\n // overflow mid-transition), so always refresh the bar here.\n barRef.value?.update()\n barRef.value?.handleScroll(wrapRef.value)\n maskRef.value?.update()\n })\n}\n\nwatch(\n () => props.noresize,\n (noresize) => {\n if (noresize) {\n stopResizeObserver?.()\n stopWrapResizeObserver?.()\n stopResizeListener?.()\n } else {\n ;({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update))\n ;({ stop: stopWrapResizeObserver } = useResizeObserver(wrapRef, update))\n stopResizeListener = useEventListener('resize', update)\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => [props.maxHeight, props.height],\n () => {\n if (!props.native || props.mask)\n nextTick(() => {\n update()\n })\n }\n)\n\nprovide(\n scrollbarContextKey,\n reactive({\n scrollbarElement: scrollbarRef,\n wrapElement: wrapRef,\n })\n)\n\nonActivated(() => {\n if (wrapRef.value) {\n wrapRef.value.scrollTop = wrapScrollTop\n wrapRef.value.scrollLeft = wrapScrollLeft\n maskRef.value?.update()\n }\n})\n\nonMounted(() => {\n if (!props.native || props.mask)\n nextTick(() => {\n update()\n })\n})\nonUpdated(() => update())\n\ndefineExpose({\n /** @description scrollbar wrap ref */\n wrapRef,\n /** @description update scrollbar state manually */\n update,\n /** @description scrolls to a particular set of coordinates */\n scrollTo,\n /** @description set distance to scroll top */\n setScrollTop,\n /** @description set distance to scroll left */\n setScrollLeft,\n /** @description handle scroll event */\n handleScroll,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;AA+DA,MAAM,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,GAAA,mBA6BM,OAAA;IA7BG,SAAA;IAAJ,KAAI;IAAgB,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,EAAC,CAAA;;IAClC,mBAqBM,OAAA;KApBA,SAAA;KAAJ,KAAI;KACH,OAAK,eAAE,QAAA,KAAO;KACd,OAAK,eAAE,UAAA,KAAS;KAChB,UAAU,QAAA;KACV,UAAQ;KACR,iBAAe;KACf,gBAAc;IAEf,GAAA,EAAA,UAAA,GAAA,YAWY,wBAVL,QAAA,GAAG,GAAA;KACP,IAAI,QAAA;KACD,SAAA;KAAJ,KAAI;KACH,OAAK,eAAE,UAAA,KAAS;KAChB,OAAK,eAAE,QAAA,SAAS;KAChB,MAAM,QAAA;KACN,cAAY,QAAA;KACZ,oBAAkB,QAAA;;KAEnB,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;;;;;;;;IAGZ,YAEa,YAAA,EAFA,MAAM,MAAA,EAAA,CAAE,CAAC,EAAC,WAAA,EAAA,GAAA;KACrB,SAAA,cAAyD,CAAnC,QAAA,QAAtB,UAAA,GAAA,YAAyD,cAAA;;MAAzB,SAAA;MAAJ,KAAI;MAAW,MAAM,QAAA;;;;IAElC,CAAA,QAAA,UACf,UAAA,GAAA,YAAyD,aAAA;;KAAhD,SAAA;KAAJ,KAAI;KAAU,QAAQ,QAAA;KAAS,YAAU,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar2.mjs","names":[],"sources":["../../../../../../packages/components/scrollbar/src/scrollbar.vue"],"sourcesContent":["<template>\n <div ref=\"scrollbarRef\" :class=\"ns.b()\">\n <div\n ref=\"wrapRef\"\n :class=\"wrapKls\"\n :style=\"wrapStyle\"\n :tabindex=\"tabindex\"\n @scroll=\"handleScroll\"\n @transitionend=\"updateBar\"\n @animationend=\"updateBar\"\n >\n <component\n :is=\"tag\"\n :id=\"id\"\n ref=\"resizeRef\"\n :class=\"resizeKls\"\n :style=\"viewStyle\"\n :role=\"role\"\n :aria-label=\"ariaLabel\"\n :aria-orientation=\"ariaOrientation\"\n >\n <slot />\n </component>\n </div>\n <template v-if=\"!native\">\n <bar ref=\"barRef\" :always=\"always\" :min-size=\"minSize\" />\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onActivated,\n onMounted,\n onUpdated,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport {\n addUnit,\n debugWarn,\n isGreaterThan,\n isNumber,\n isObject,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Bar from './bar.vue'\nimport { scrollbarContextKey } from './constants'\nimport { scrollbarEmits } from './scrollbar'\n\nimport type { ScrollbarDirection, ScrollbarProps } from './scrollbar'\nimport type { BarInstance } from './bar'\nimport type { CSSProperties, StyleValue } from 'vue'\n\nconst COMPONENT_NAME = 'ElScrollbar'\n\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = withDefaults(defineProps<ScrollbarProps>(), {\n distance: 0,\n height: '',\n maxHeight: '',\n wrapStyle: '',\n wrapClass: '',\n viewStyle: '',\n viewClass: '',\n tag: 'div',\n minSize: 20,\n tabindex: undefined,\n})\nconst emit = defineEmits(scrollbarEmits)\n\nconst ns = useNamespace('scrollbar')\n\nlet stopResizeObserver: (() => void) | undefined = undefined\nlet stopWrapResizeObserver: (() => void) | undefined = undefined\nlet stopResizeListener: (() => void) | undefined = undefined\nlet rafId = 0\nlet wrapScrollTop = 0\nlet wrapScrollLeft = 0\nlet direction = '' as ScrollbarDirection\nconst distanceScrollState = {\n bottom: false,\n top: false,\n right: false,\n left: false,\n}\n\nconst scrollbarRef = ref<HTMLDivElement>()\nconst wrapRef = ref<HTMLDivElement>()\nconst resizeRef = ref<HTMLElement>()\nconst barRef = ref<BarInstance>()\n\nconst wrapStyle = computed<StyleValue>(() => {\n const style: CSSProperties = {}\n const height = addUnit(props.height)\n const maxHeight = addUnit(props.maxHeight)\n if (height) style.height = height\n if (maxHeight) style.maxHeight = maxHeight\n return [props.wrapStyle, style]\n})\n\nconst wrapKls = computed(() => {\n return [\n props.wrapClass,\n ns.e('wrap'),\n { [ns.em('wrap', 'hidden-default')]: !props.native },\n ]\n})\n\nconst resizeKls = computed(() => {\n return [ns.e('view'), props.viewClass]\n})\n\nconst shouldSkipDirection = (direction: ScrollbarDirection) => {\n return distanceScrollState[direction] ?? false\n}\n\nconst DIRECTION_PAIRS: Record<ScrollbarDirection, ScrollbarDirection> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n}\nconst updateTriggerStatus = (arrivedStates: Record<string, boolean>) => {\n const oppositeDirection = DIRECTION_PAIRS[direction]\n if (!oppositeDirection) return\n\n const arrived = arrivedStates[direction]\n const oppositeArrived = arrivedStates[oppositeDirection]\n\n if (arrived && !distanceScrollState[direction]) {\n distanceScrollState[direction] = true\n }\n\n if (!oppositeArrived && distanceScrollState[oppositeDirection]) {\n distanceScrollState[oppositeDirection] = false\n }\n}\n\nconst handleScroll = () => {\n if (wrapRef.value) {\n barRef.value?.handleScroll(wrapRef.value)\n const prevTop = wrapScrollTop\n const prevLeft = wrapScrollLeft\n wrapScrollTop = wrapRef.value.scrollTop\n wrapScrollLeft = wrapRef.value.scrollLeft\n\n const arrivedStates = {\n bottom: !isGreaterThan(\n wrapRef.value.scrollHeight - props.distance,\n wrapRef.value.clientHeight + wrapScrollTop\n ),\n top: wrapScrollTop <= props.distance && prevTop !== 0,\n right:\n !isGreaterThan(\n wrapRef.value.scrollWidth - props.distance,\n wrapRef.value.clientWidth + wrapScrollLeft\n ) && prevLeft !== wrapScrollLeft,\n left: wrapScrollLeft <= props.distance && prevLeft !== 0,\n }\n\n emit('scroll', {\n scrollTop: wrapScrollTop,\n scrollLeft: wrapScrollLeft,\n })\n\n if (prevTop !== wrapScrollTop) {\n direction = wrapScrollTop > prevTop ? 'bottom' : 'top'\n }\n if (prevLeft !== wrapScrollLeft) {\n direction = wrapScrollLeft > prevLeft ? 'right' : 'left'\n }\n if (props.distance > 0) {\n if (shouldSkipDirection(direction)) {\n return\n }\n updateTriggerStatus(arrivedStates)\n }\n if (arrivedStates[direction]) emit('end-reached', direction)\n }\n}\n\nfunction scrollTo(xCord: number, yCord?: number): void\nfunction scrollTo(options: ScrollToOptions): void\nfunction scrollTo(arg1: unknown, arg2?: number) {\n if (isObject(arg1)) {\n wrapRef.value!.scrollTo(arg1)\n } else if (isNumber(arg1) && isNumber(arg2)) {\n wrapRef.value!.scrollTo(arg1, arg2)\n }\n}\n\nconst setScrollTop = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollTop = value\n}\n\nconst setScrollLeft = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollLeft = value\n}\n\nconst update = () => {\n barRef.value?.update()\n distanceScrollState[direction] = false\n if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value)\n}\n\n// Transform-driven overflow (e.g. slide transitions) is not observable via\n// resize observers, so refresh the bar when transitions/animations end —\n// this applies even when `noresize` is set.\nconst updateBar = () => {\n if (rafId) return\n rafId = requestAnimationFrame(() => {\n rafId = 0\n if (!wrapRef.value) return\n\n // Bar state may be stale even when the final scroll dimensions match a\n // previously seen value (e.g. `onUpdated` measured the transient\n // overflow mid-transition), so always refresh the bar here.\n barRef.value?.update()\n barRef.value?.handleScroll(wrapRef.value)\n })\n}\n\nwatch(\n () => props.noresize,\n (noresize) => {\n if (noresize) {\n stopResizeObserver?.()\n stopWrapResizeObserver?.()\n stopResizeListener?.()\n } else {\n ;({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update))\n ;({ stop: stopWrapResizeObserver } = useResizeObserver(wrapRef, update))\n stopResizeListener = useEventListener('resize', update)\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => [props.maxHeight, props.height],\n () => {\n if (!props.native)\n nextTick(() => {\n update()\n })\n }\n)\n\nprovide(\n scrollbarContextKey,\n reactive({\n scrollbarElement: scrollbarRef,\n wrapElement: wrapRef,\n })\n)\n\nonActivated(() => {\n if (wrapRef.value) {\n wrapRef.value.scrollTop = wrapScrollTop\n wrapRef.value.scrollLeft = wrapScrollLeft\n }\n})\n\nonMounted(() => {\n if (!props.native)\n nextTick(() => {\n update()\n })\n})\nonUpdated(() => update())\n\ndefineExpose({\n /** @description scrollbar wrap ref */\n wrapRef,\n /** @description update scrollbar state manually */\n update,\n /** @description scrolls to a particular set of coordinates */\n scrollTo,\n /** @description set distance to scroll top */\n setScrollTop,\n /** @description set distance to scroll left */\n setScrollLeft,\n /** @description handle scroll event */\n handleScroll,\n})\n</script>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"scrollbar2.mjs","names":[],"sources":["../../../../../../packages/components/scrollbar/src/scrollbar.vue"],"sourcesContent":["<template>\n <div ref=\"scrollbarRef\" :class=\"ns.b()\">\n <div\n ref=\"wrapRef\"\n :class=\"wrapKls\"\n :style=\"wrapStyle\"\n :tabindex=\"tabindex\"\n @scroll=\"handleScroll\"\n @transitionend=\"updateBar\"\n @animationend=\"updateBar\"\n >\n <component\n :is=\"tag\"\n :id=\"id\"\n ref=\"resizeRef\"\n :class=\"resizeKls\"\n :style=\"viewStyle\"\n :role=\"role\"\n :aria-label=\"ariaLabel\"\n :aria-orientation=\"ariaOrientation\"\n >\n <slot />\n </component>\n </div>\n <transition :name=\"ns.b('mask-fade')\">\n <scrollbar-mask v-if=\"mask\" ref=\"maskRef\" :mask=\"mask\" />\n </transition>\n <template v-if=\"!native\">\n <bar ref=\"barRef\" :always=\"always\" :min-size=\"minSize\" />\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onActivated,\n onMounted,\n onUpdated,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport {\n addUnit,\n debugWarn,\n isGreaterThan,\n isNumber,\n isObject,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Bar from './bar.vue'\nimport ScrollbarMask from './mask.vue'\nimport { scrollbarContextKey } from './constants'\nimport { scrollbarEmits } from './scrollbar'\n\nimport type { ScrollbarDirection, ScrollbarProps } from './scrollbar'\nimport type { BarInstance } from './bar'\nimport type { CSSProperties, StyleValue } from 'vue'\n\nconst COMPONENT_NAME = 'ElScrollbar'\n\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = withDefaults(defineProps<ScrollbarProps>(), {\n distance: 0,\n height: '',\n maxHeight: '',\n wrapStyle: '',\n wrapClass: '',\n viewStyle: '',\n viewClass: '',\n tag: 'div',\n mask: false,\n minSize: 20,\n tabindex: undefined,\n})\nconst emit = defineEmits(scrollbarEmits)\n\nconst ns = useNamespace('scrollbar')\n\nlet stopResizeObserver: (() => void) | undefined = undefined\nlet stopWrapResizeObserver: (() => void) | undefined = undefined\nlet stopResizeListener: (() => void) | undefined = undefined\nlet rafId = 0\nlet wrapScrollTop = 0\nlet wrapScrollLeft = 0\nlet direction = '' as ScrollbarDirection\nconst distanceScrollState = {\n bottom: false,\n top: false,\n right: false,\n left: false,\n}\n\nconst scrollbarRef = ref<HTMLDivElement>()\nconst wrapRef = ref<HTMLDivElement>()\nconst resizeRef = ref<HTMLElement>()\nconst barRef = ref<BarInstance>()\nconst maskRef = ref<InstanceType<typeof ScrollbarMask>>()\n\nconst wrapStyle = computed<StyleValue>(() => {\n const style: CSSProperties = {}\n const height = addUnit(props.height)\n const maxHeight = addUnit(props.maxHeight)\n if (height) style.height = height\n if (maxHeight) style.maxHeight = maxHeight\n return [props.wrapStyle, style]\n})\n\nconst wrapKls = computed(() => {\n return [\n props.wrapClass,\n ns.e('wrap'),\n { [ns.em('wrap', 'hidden-default')]: !props.native },\n ]\n})\n\nconst resizeKls = computed(() => {\n return [ns.e('view'), props.viewClass]\n})\n\nconst shouldSkipDirection = (direction: ScrollbarDirection) => {\n return distanceScrollState[direction] ?? false\n}\n\nconst DIRECTION_PAIRS: Record<ScrollbarDirection, ScrollbarDirection> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n}\nconst updateTriggerStatus = (arrivedStates: Record<string, boolean>) => {\n const oppositeDirection = DIRECTION_PAIRS[direction]\n if (!oppositeDirection) return\n\n const arrived = arrivedStates[direction]\n const oppositeArrived = arrivedStates[oppositeDirection]\n\n if (arrived && !distanceScrollState[direction]) {\n distanceScrollState[direction] = true\n }\n\n if (!oppositeArrived && distanceScrollState[oppositeDirection]) {\n distanceScrollState[oppositeDirection] = false\n }\n}\n\nconst handleScroll = () => {\n if (wrapRef.value) {\n barRef.value?.handleScroll(wrapRef.value)\n maskRef.value?.handleScroll()\n const prevTop = wrapScrollTop\n const prevLeft = wrapScrollLeft\n wrapScrollTop = wrapRef.value.scrollTop\n wrapScrollLeft = wrapRef.value.scrollLeft\n\n const arrivedStates = {\n bottom: !isGreaterThan(\n wrapRef.value.scrollHeight - props.distance,\n wrapRef.value.clientHeight + wrapScrollTop\n ),\n top: wrapScrollTop <= props.distance && prevTop !== 0,\n right:\n !isGreaterThan(\n wrapRef.value.scrollWidth - props.distance,\n wrapRef.value.clientWidth + wrapScrollLeft\n ) && prevLeft !== wrapScrollLeft,\n left: wrapScrollLeft <= props.distance && prevLeft !== 0,\n }\n\n emit('scroll', {\n scrollTop: wrapScrollTop,\n scrollLeft: wrapScrollLeft,\n })\n\n if (prevTop !== wrapScrollTop) {\n direction = wrapScrollTop > prevTop ? 'bottom' : 'top'\n }\n if (prevLeft !== wrapScrollLeft) {\n direction = wrapScrollLeft > prevLeft ? 'right' : 'left'\n }\n if (props.distance > 0) {\n if (shouldSkipDirection(direction)) {\n return\n }\n updateTriggerStatus(arrivedStates)\n }\n if (arrivedStates[direction]) emit('end-reached', direction)\n }\n}\n\nfunction scrollTo(xCord: number, yCord?: number): void\nfunction scrollTo(options: ScrollToOptions): void\nfunction scrollTo(arg1: unknown, arg2?: number) {\n if (isObject(arg1)) {\n wrapRef.value!.scrollTo(arg1)\n } else if (isNumber(arg1) && isNumber(arg2)) {\n wrapRef.value!.scrollTo(arg1, arg2)\n }\n}\n\nconst setScrollTop = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollTop = value\n}\n\nconst setScrollLeft = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(COMPONENT_NAME, 'value must be a number')\n return\n }\n wrapRef.value!.scrollLeft = value\n}\n\nconst update = () => {\n barRef.value?.update()\n maskRef.value?.update()\n distanceScrollState[direction] = false\n if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value)\n}\n\n// Transform-driven overflow (e.g. slide transitions) is not observable via\n// resize observers, so refresh the bar when transitions/animations end —\n// this applies even when `noresize` is set.\nconst updateBar = () => {\n if (rafId) return\n rafId = requestAnimationFrame(() => {\n rafId = 0\n if (!wrapRef.value) return\n\n // Bar state may be stale even when the final scroll dimensions match a\n // previously seen value (e.g. `onUpdated` measured the transient\n // overflow mid-transition), so always refresh the bar here.\n barRef.value?.update()\n barRef.value?.handleScroll(wrapRef.value)\n maskRef.value?.update()\n })\n}\n\nwatch(\n () => props.noresize,\n (noresize) => {\n if (noresize) {\n stopResizeObserver?.()\n stopWrapResizeObserver?.()\n stopResizeListener?.()\n } else {\n ;({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update))\n ;({ stop: stopWrapResizeObserver } = useResizeObserver(wrapRef, update))\n stopResizeListener = useEventListener('resize', update)\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => [props.maxHeight, props.height],\n () => {\n if (!props.native || props.mask)\n nextTick(() => {\n update()\n })\n }\n)\n\nprovide(\n scrollbarContextKey,\n reactive({\n scrollbarElement: scrollbarRef,\n wrapElement: wrapRef,\n })\n)\n\nonActivated(() => {\n if (wrapRef.value) {\n wrapRef.value.scrollTop = wrapScrollTop\n wrapRef.value.scrollLeft = wrapScrollLeft\n maskRef.value?.update()\n }\n})\n\nonMounted(() => {\n if (!props.native || props.mask)\n nextTick(() => {\n update()\n })\n})\nonUpdated(() => update())\n\ndefineExpose({\n /** @description scrollbar wrap ref */\n wrapRef,\n /** @description update scrollbar state manually */\n update,\n /** @description scrolls to a particular set of coordinates */\n scrollTo,\n /** @description set distance to scroll top */\n setScrollTop,\n /** @description set distance to scroll left */\n setScrollLeft,\n /** @description handle scroll event */\n handleScroll,\n})\n</script>\n"],"mappings":""}
|
|
@@ -11,7 +11,7 @@ declare const ElSegmented: (<T extends Option = Option>(__VLS_props: NonNullable
|
|
|
11
11
|
}) => any;
|
|
12
12
|
};
|
|
13
13
|
attrs: any;
|
|
14
|
-
emit: ((event: "
|
|
14
|
+
emit: ((event: "change", val: any) => void) & ((event: "update:modelValue", val: any) => void);
|
|
15
15
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
16
16
|
props: _$vue.PublicProps & {
|
|
17
17
|
direction?: "vertical" | "horizontal" | undefined;
|
|
@@ -25,8 +25,8 @@ declare const ElSegmented: (<T extends Option = Option>(__VLS_props: NonNullable
|
|
|
25
25
|
id?: string | undefined;
|
|
26
26
|
name?: string | undefined;
|
|
27
27
|
ariaLabel?: string | undefined;
|
|
28
|
-
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
29
28
|
onChange?: ((val: any) => any) | undefined;
|
|
29
|
+
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
30
30
|
} & (typeof globalThis extends {
|
|
31
31
|
__VLS_PROPS_FALLBACK: infer P;
|
|
32
32
|
} ? P : {});
|
|
@@ -37,7 +37,7 @@ declare const ElSegmented: (<T extends Option = Option>(__VLS_props: NonNullable
|
|
|
37
37
|
item: T;
|
|
38
38
|
}) => any;
|
|
39
39
|
};
|
|
40
|
-
emit: ((event: "
|
|
40
|
+
emit: ((event: "change", val: any) => void) & ((event: "update:modelValue", val: any) => void);
|
|
41
41
|
}>) => _$vue.VNode & {
|
|
42
42
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
43
43
|
}) & _$vue.ObjectPlugin & {
|
|
@@ -5,8 +5,8 @@ import * as _$vue from "vue";
|
|
|
5
5
|
//#region ../../packages/components/segmented/src/segmented.vue.d.ts
|
|
6
6
|
declare const __VLS_export: <T extends Option = Option>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
7
|
props: _$vue.PublicProps & __VLS_PrettifyLocal<SegmentedProps<T> & {
|
|
8
|
-
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
9
8
|
onChange?: ((val: any) => any) | undefined;
|
|
9
|
+
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
10
10
|
}> & (typeof globalThis extends {
|
|
11
11
|
__VLS_PROPS_FALLBACK: infer P;
|
|
12
12
|
} ? P : {});
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: <T extends Option = Option>(__VLS_props: NonNullable
|
|
|
17
17
|
item: T;
|
|
18
18
|
}) => any;
|
|
19
19
|
};
|
|
20
|
-
emit: ((event: "
|
|
20
|
+
emit: ((event: "change", val: any) => void) & ((event: "update:modelValue", val: any) => void);
|
|
21
21
|
}>) => _$vue.VNode & {
|
|
22
22
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
23
23
|
};
|
|
@@ -390,9 +390,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
390
390
|
};
|
|
391
391
|
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
|
392
392
|
}>> & Readonly<{
|
|
393
|
-
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
394
393
|
onChange?: ((val: any) => any) | undefined;
|
|
395
394
|
onClear?: (() => any) | undefined;
|
|
395
|
+
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
396
396
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
397
397
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
398
398
|
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
|
@@ -641,6 +641,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
641
641
|
}, _$vue.PublicProps, {
|
|
642
642
|
tabindex: string | number;
|
|
643
643
|
height: string | number;
|
|
644
|
+
mask: boolean | ScrollbarDirection;
|
|
644
645
|
maxHeight: string | number;
|
|
645
646
|
tag: (string & {}) | keyof HTMLElementTagNameMap;
|
|
646
647
|
distance: number;
|
|
@@ -675,6 +676,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
675
676
|
}, {}, {}, {}, {
|
|
676
677
|
tabindex: string | number;
|
|
677
678
|
height: string | number;
|
|
679
|
+
mask: boolean | ScrollbarDirection;
|
|
678
680
|
maxHeight: string | number;
|
|
679
681
|
tag: (string & {}) | keyof HTMLElementTagNameMap;
|
|
680
682
|
distance: number;
|
|
@@ -712,6 +714,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
712
714
|
}, string, {
|
|
713
715
|
tabindex: string | number;
|
|
714
716
|
height: string | number;
|
|
717
|
+
mask: boolean | ScrollbarDirection;
|
|
715
718
|
maxHeight: string | number;
|
|
716
719
|
tag: (string & {}) | keyof HTMLElementTagNameMap;
|
|
717
720
|
distance: number;
|
|
@@ -368,9 +368,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
368
368
|
readonly fitInputWidth: EpPropFinalized<readonly [BooleanConstructor, NumberConstructor], unknown, number | boolean, true, boolean>;
|
|
369
369
|
readonly suffixIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
|
370
370
|
}>> & Readonly<{
|
|
371
|
-
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
372
371
|
onChange?: ((val: any) => any) | undefined;
|
|
373
372
|
onClear?: (() => any) | undefined;
|
|
373
|
+
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
|
374
374
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
375
375
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
376
376
|
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
|
@@ -78,8 +78,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
78
78
|
}>, {
|
|
79
79
|
onSliderClick: (event: MouseEvent | TouchEvent) => void;
|
|
80
80
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
81
|
-
"update:modelValue": (value: Arrayable<number>) => void;
|
|
82
81
|
change: (value: Arrayable<number>) => void;
|
|
82
|
+
"update:modelValue": (value: Arrayable<number>) => void;
|
|
83
83
|
input: (value: Arrayable<number>) => void;
|
|
84
84
|
}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
|
85
85
|
readonly ariaLabel: StringConstructor;
|
|
@@ -153,8 +153,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
153
153
|
readonly validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
154
154
|
readonly persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
155
155
|
}>> & Readonly<{
|
|
156
|
-
"onUpdate:modelValue"?: ((value: Arrayable<number>) => any) | undefined;
|
|
157
156
|
onChange?: ((value: Arrayable<number>) => any) | undefined;
|
|
157
|
+
"onUpdate:modelValue"?: ((value: Arrayable<number>) => any) | undefined;
|
|
158
158
|
onInput?: ((value: Arrayable<number>) => any) | undefined;
|
|
159
159
|
}>, {
|
|
160
160
|
readonly id: string;
|
|
@@ -26,12 +26,12 @@ declare const __VLS_base: _$vue.DefineComponent<SwitchProps, {
|
|
|
26
26
|
*/
|
|
27
27
|
checked: _$vue.ComputedRef<boolean>;
|
|
28
28
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
29
|
-
"update:modelValue": (val: string | number | boolean) => void;
|
|
30
29
|
change: (val: string | number | boolean) => void;
|
|
30
|
+
"update:modelValue": (val: string | number | boolean) => void;
|
|
31
31
|
input: (val: string | number | boolean) => void;
|
|
32
32
|
}, string, _$vue.PublicProps, Readonly<SwitchProps> & Readonly<{
|
|
33
|
-
"onUpdate:modelValue"?: ((val: string | number | boolean) => any) | undefined;
|
|
34
33
|
onChange?: ((val: string | number | boolean) => any) | undefined;
|
|
34
|
+
"onUpdate:modelValue"?: ((val: string | number | boolean) => any) | undefined;
|
|
35
35
|
onInput?: ((val: string | number | boolean) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
37
|
disabled: boolean;
|
|
@@ -106,11 +106,11 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
106
106
|
}, {}, {
|
|
107
107
|
ElCheckbox: {
|
|
108
108
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<CheckboxProps> & Readonly<{
|
|
109
|
-
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
110
109
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
110
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
111
111
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
112
|
-
"update:modelValue": (val: CheckboxValueType) => void;
|
|
113
112
|
change: (val: CheckboxValueType) => void;
|
|
113
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
114
114
|
}, _$vue.PublicProps, {
|
|
115
115
|
id: string;
|
|
116
116
|
disabled: boolean;
|
|
@@ -131,8 +131,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
131
131
|
M: {};
|
|
132
132
|
Defaults: {};
|
|
133
133
|
}, Readonly<CheckboxProps> & Readonly<{
|
|
134
|
-
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
135
134
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
135
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
136
136
|
}>, {}, {}, {}, {}, {
|
|
137
137
|
id: string;
|
|
138
138
|
disabled: boolean;
|
|
@@ -150,11 +150,11 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
150
150
|
__isTeleport?: never;
|
|
151
151
|
__isSuspense?: never;
|
|
152
152
|
} & _$vue.ComponentOptionsBase<Readonly<CheckboxProps> & Readonly<{
|
|
153
|
-
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
154
153
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
154
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
155
155
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
156
|
-
"update:modelValue": (val: CheckboxValueType) => void;
|
|
157
156
|
change: (val: CheckboxValueType) => void;
|
|
157
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
158
158
|
}, string, {
|
|
159
159
|
id: string;
|
|
160
160
|
disabled: boolean;
|
|
@@ -198,11 +198,11 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
198
198
|
};
|
|
199
199
|
ElCheckboxGroup: SFCWithInstall<{
|
|
200
200
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<CheckboxGroupProps> & Readonly<{
|
|
201
|
-
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
202
201
|
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
202
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
203
203
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
204
|
-
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
205
204
|
change: (val: CheckboxValueType[]) => void;
|
|
205
|
+
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
206
206
|
}, _$vue.PublicProps, {
|
|
207
207
|
type: "button" | "checkbox";
|
|
208
208
|
props: {
|
|
@@ -222,8 +222,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
222
222
|
M: {};
|
|
223
223
|
Defaults: {};
|
|
224
224
|
}, Readonly<CheckboxGroupProps> & Readonly<{
|
|
225
|
-
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
226
225
|
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
226
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
227
227
|
}>, {}, {}, {}, {}, {
|
|
228
228
|
type: "button" | "checkbox";
|
|
229
229
|
props: {
|
|
@@ -240,11 +240,11 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
240
240
|
__isTeleport?: never;
|
|
241
241
|
__isSuspense?: never;
|
|
242
242
|
} & _$vue.ComponentOptionsBase<Readonly<CheckboxGroupProps> & Readonly<{
|
|
243
|
-
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
244
243
|
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
244
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
245
245
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
246
|
-
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
247
246
|
change: (val: CheckboxValueType[]) => void;
|
|
247
|
+
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
248
248
|
}, string, {
|
|
249
249
|
type: "button" | "checkbox";
|
|
250
250
|
props: {
|
|
@@ -287,6 +287,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
287
287
|
}, _$vue.PublicProps, {
|
|
288
288
|
tabindex: string | number;
|
|
289
289
|
height: string | number;
|
|
290
|
+
mask: boolean | ScrollbarDirection;
|
|
290
291
|
maxHeight: string | number;
|
|
291
292
|
tag: (string & {}) | keyof HTMLElementTagNameMap;
|
|
292
293
|
distance: number;
|
|
@@ -321,6 +322,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
321
322
|
}, {}, {}, {}, {
|
|
322
323
|
tabindex: string | number;
|
|
323
324
|
height: string | number;
|
|
325
|
+
mask: boolean | ScrollbarDirection;
|
|
324
326
|
maxHeight: string | number;
|
|
325
327
|
tag: (string & {}) | keyof HTMLElementTagNameMap;
|
|
326
328
|
distance: number;
|
|
@@ -358,6 +360,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
358
360
|
}, string, {
|
|
359
361
|
tabindex: string | number;
|
|
360
362
|
height: string | number;
|
|
363
|
+
mask: boolean | ScrollbarDirection;
|
|
361
364
|
maxHeight: string | number;
|
|
362
365
|
tag: (string & {}) | keyof HTMLElementTagNameMap;
|
|
363
366
|
distance: number;
|
|
@@ -119,11 +119,11 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
119
119
|
}, {}, {
|
|
120
120
|
ElCheckbox: {
|
|
121
121
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<CheckboxProps> & Readonly<{
|
|
122
|
-
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
123
122
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
123
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
124
124
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
125
|
-
"update:modelValue": (val: CheckboxValueType) => void;
|
|
126
125
|
change: (val: CheckboxValueType) => void;
|
|
126
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
127
127
|
}, _$vue.PublicProps, {
|
|
128
128
|
id: string;
|
|
129
129
|
disabled: boolean;
|
|
@@ -144,8 +144,8 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
144
144
|
M: {};
|
|
145
145
|
Defaults: {};
|
|
146
146
|
}, Readonly<CheckboxProps> & Readonly<{
|
|
147
|
-
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
148
147
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
148
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
149
149
|
}>, {}, {}, {}, {}, {
|
|
150
150
|
id: string;
|
|
151
151
|
disabled: boolean;
|
|
@@ -163,11 +163,11 @@ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
163
163
|
__isTeleport?: never;
|
|
164
164
|
__isSuspense?: never;
|
|
165
165
|
} & _$vue.ComponentOptionsBase<Readonly<CheckboxProps> & Readonly<{
|
|
166
|
-
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
167
166
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
167
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
168
168
|
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
169
|
-
"update:modelValue": (val: CheckboxValueType) => void;
|
|
170
169
|
change: (val: CheckboxValueType) => void;
|
|
170
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
171
171
|
}, string, {
|
|
172
172
|
id: string;
|
|
173
173
|
disabled: boolean;
|