element-plus 2.2.14 → 2.2.15
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 +211 -142
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +13 -13
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +212 -143
- 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.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/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/cascader/src/index.mjs +1 -1
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.mjs +2 -2
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/form/index.d.ts +4 -0
- package/es/components/form/src/form-item2.mjs +1 -0
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.d.ts +1 -0
- package/es/components/form/src/form.mjs +5 -0
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form.vue.d.ts +4 -0
- package/es/components/index.mjs +1 -1
- package/es/components/menu/index.d.ts +224 -0
- package/es/components/menu/src/menu.mjs +2 -2
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.d.ts +138 -2
- package/es/components/menu/src/sub-menu.mjs +18 -3
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/message/src/instance.mjs +1 -1
- package/es/components/message/src/instance.mjs.map +1 -1
- package/es/components/message/src/method.mjs +1 -1
- package/es/components/message/src/method.mjs.map +1 -1
- package/es/components/message-box/src/message-box.type.d.ts +1 -1
- package/es/components/message-box/src/messageBox.mjs +10 -9
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/page-header/index.d.ts +46 -0
- package/es/components/page-header/src/page-header.vue.d.ts +46 -0
- package/es/components/page-header/src/page-header2.mjs +70 -28
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +169 -44
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +44 -169
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/src/space.d.ts +5 -4
- package/es/components/space/src/space.mjs.map +1 -1
- package/es/components/space/src/use-space.d.ts +1 -1
- package/es/components/table/src/table/style-helper.mjs +7 -5
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/index.mjs +1 -2
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/tree-v2/src/composables/useTree.d.ts +1 -0
- package/es/components/tree-v2/src/composables/useTree.mjs +5 -1
- package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.mjs +4 -2
- package/es/components/tree-v2/src/tree.mjs.map +1 -1
- package/es/index.mjs +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/cascader/src/index.js +1 -1
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.js +1 -1
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/form/index.d.ts +4 -0
- package/lib/components/form/src/form-item2.js +1 -0
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.d.ts +1 -0
- package/lib/components/form/src/form.js +5 -0
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form.vue.d.ts +4 -0
- package/lib/components/index.js +1 -1
- package/lib/components/menu/index.d.ts +224 -0
- package/lib/components/menu/src/menu.js +2 -2
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.d.ts +138 -2
- package/lib/components/menu/src/sub-menu.js +17 -2
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/message/src/instance.js +1 -1
- package/lib/components/message/src/instance.js.map +1 -1
- package/lib/components/message/src/method.js +1 -1
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/message-box/src/message-box.type.d.ts +1 -1
- package/lib/components/message-box/src/messageBox.js +10 -9
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/page-header/index.d.ts +46 -0
- package/lib/components/page-header/src/page-header.vue.d.ts +46 -0
- package/lib/components/page-header/src/page-header2.js +69 -27
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +169 -45
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +45 -169
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/src/space.d.ts +5 -4
- package/lib/components/space/src/space.js.map +1 -1
- package/lib/components/space/src/use-space.d.ts +1 -1
- package/lib/components/table/src/table/style-helper.js +7 -5
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-header/index.js +1 -2
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/tree-v2/src/composables/useTree.d.ts +1 -0
- package/lib/components/tree-v2/src/composables/useTree.js +5 -1
- package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
- package/lib/components/tree-v2/src/tree.js +4 -2
- package/lib/components/tree-v2/src/tree.js.map +1 -1
- package/lib/index.js +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/tags.json +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-page-header.css +1 -1
- package/theme-chalk/el-popover.css +1 -1
- package/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +0 -2
- package/theme-chalk/src/form.scss +17 -6
- package/theme-chalk/src/menu.scss +0 -11
- package/theme-chalk/src/page-header.scss +40 -26
- package/theme-chalk/src/popover.scss +7 -0
- package/theme-chalk/src/rate.scss +1 -1
- package/theme-chalk/src/select.scss +1 -0
- package/theme-chalk/src/table.scss +8 -15
- package/web-types.json +1 -1
|
@@ -4,6 +4,9 @@ export declare const ElPageHeader: import("element-plus/es/utils").SFCWithInstal
|
|
|
4
4
|
readonly content: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
5
5
|
}, {
|
|
6
6
|
emit: (event: "back") => void;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
[name: string]: import("vue").Slot | undefined;
|
|
9
|
+
}>;
|
|
7
10
|
t: import("../..").Translator;
|
|
8
11
|
ns: {
|
|
9
12
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -23,6 +26,9 @@ export declare const ElPageHeader: import("element-plus/es/utils").SFCWithInstal
|
|
|
23
26
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
24
27
|
cssVarBlockName: (name: string) => string;
|
|
25
28
|
};
|
|
29
|
+
kls: import("vue").ComputedRef<(string | {
|
|
30
|
+
[x: string]: boolean;
|
|
31
|
+
})[]>;
|
|
26
32
|
handleClick: () => void;
|
|
27
33
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
28
34
|
readonly size: {
|
|
@@ -87,6 +93,46 @@ export declare const ElPageHeader: import("element-plus/es/utils").SFCWithInstal
|
|
|
87
93
|
__epPropKey: true;
|
|
88
94
|
};
|
|
89
95
|
}>>, {}>> & Record<string, any>;
|
|
96
|
+
ElDivider: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
97
|
+
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
98
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
99
|
+
readonly borderStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
100
|
+
}, {
|
|
101
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
102
|
+
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
103
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
104
|
+
readonly borderStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
105
|
+
}>> & {
|
|
106
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
107
|
+
}>>;
|
|
108
|
+
ns: {
|
|
109
|
+
namespace: import("vue").ComputedRef<string>;
|
|
110
|
+
b: (blockSuffix?: string) => string;
|
|
111
|
+
e: (element?: string | undefined) => string;
|
|
112
|
+
m: (modifier?: string | undefined) => string;
|
|
113
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
114
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
115
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
116
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
117
|
+
is: {
|
|
118
|
+
(name: string, state: boolean | undefined): string;
|
|
119
|
+
(name: string): string;
|
|
120
|
+
};
|
|
121
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
122
|
+
cssVarName: (name: string) => string;
|
|
123
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
124
|
+
cssVarBlockName: (name: string) => string;
|
|
125
|
+
};
|
|
126
|
+
dividerStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
127
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
|
+
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
129
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
130
|
+
readonly borderStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
131
|
+
}>>, {
|
|
132
|
+
readonly direction: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "vertical" | "horizontal", unknown>;
|
|
133
|
+
readonly borderStyle: string;
|
|
134
|
+
readonly contentPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "left" | "right" | "center", unknown>;
|
|
135
|
+
}>> & Record<string, any>;
|
|
90
136
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
91
137
|
back: () => boolean;
|
|
92
138
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -4,6 +4,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly content: import("../../../utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
5
5
|
}, {
|
|
6
6
|
emit: (event: "back") => void;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
[name: string]: import("vue").Slot | undefined;
|
|
9
|
+
}>;
|
|
7
10
|
t: import("element-plus/es/hooks").Translator;
|
|
8
11
|
ns: {
|
|
9
12
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -23,6 +26,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
26
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
24
27
|
cssVarBlockName: (name: string) => string;
|
|
25
28
|
};
|
|
29
|
+
kls: import("vue").ComputedRef<(string | {
|
|
30
|
+
[x: string]: boolean;
|
|
31
|
+
})[]>;
|
|
26
32
|
handleClick: () => void;
|
|
27
33
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
28
34
|
readonly size: {
|
|
@@ -87,6 +93,46 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
93
|
__epPropKey: true;
|
|
88
94
|
};
|
|
89
95
|
}>>, {}>> & Record<string, any>;
|
|
96
|
+
ElDivider: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
97
|
+
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
98
|
+
readonly contentPosition: import("../../../utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
99
|
+
readonly borderStyle: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
100
|
+
}, {
|
|
101
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
102
|
+
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
103
|
+
readonly contentPosition: import("../../../utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
104
|
+
readonly borderStyle: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
105
|
+
}>> & {
|
|
106
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
107
|
+
}>>;
|
|
108
|
+
ns: {
|
|
109
|
+
namespace: import("vue").ComputedRef<string>;
|
|
110
|
+
b: (blockSuffix?: string) => string;
|
|
111
|
+
e: (element?: string | undefined) => string;
|
|
112
|
+
m: (modifier?: string | undefined) => string;
|
|
113
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
114
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
115
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
116
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
117
|
+
is: {
|
|
118
|
+
(name: string, state: boolean | undefined): string;
|
|
119
|
+
(name: string): string;
|
|
120
|
+
};
|
|
121
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
122
|
+
cssVarName: (name: string) => string;
|
|
123
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
124
|
+
cssVarBlockName: (name: string) => string;
|
|
125
|
+
};
|
|
126
|
+
dividerStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
127
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
|
+
readonly direction: import("../../../utils").EpPropFinalized<StringConstructor, "vertical" | "horizontal", unknown, "horizontal", boolean>;
|
|
129
|
+
readonly contentPosition: import("../../../utils").EpPropFinalized<StringConstructor, "left" | "right" | "center", unknown, "center", boolean>;
|
|
130
|
+
readonly borderStyle: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "solid", boolean>;
|
|
131
|
+
}>>, {
|
|
132
|
+
readonly direction: import("../../../utils").EpPropMergeType<StringConstructor, "vertical" | "horizontal", unknown>;
|
|
133
|
+
readonly borderStyle: string;
|
|
134
|
+
readonly contentPosition: import("../../../utils").EpPropMergeType<StringConstructor, "left" | "right" | "center", unknown>;
|
|
135
|
+
}>> & Record<string, any>;
|
|
90
136
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
91
137
|
back: () => boolean;
|
|
92
138
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var index$2 = require('../../icon/index.js');
|
|
7
|
+
var index$3 = require('../../divider/index.js');
|
|
7
8
|
require('../../../hooks/index.js');
|
|
8
9
|
var pageHeader = require('./page-header.js');
|
|
9
10
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
11
|
var index = require('../../../hooks/use-locale/index.js');
|
|
11
12
|
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
12
13
|
|
|
14
|
+
const _hoisted_1 = ["aria-label"];
|
|
13
15
|
const __default__ = {
|
|
14
16
|
name: "ElPageHeader"
|
|
15
17
|
};
|
|
@@ -18,47 +20,87 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18
20
|
props: pageHeader.pageHeaderProps,
|
|
19
21
|
emits: pageHeader.pageHeaderEmits,
|
|
20
22
|
setup(__props, { emit }) {
|
|
23
|
+
const slots = vue.useSlots();
|
|
21
24
|
const { t } = index.useLocale();
|
|
22
25
|
const ns = index$1.useNamespace("page-header");
|
|
26
|
+
const kls = vue.computed(() => {
|
|
27
|
+
return [
|
|
28
|
+
ns.b(),
|
|
29
|
+
{
|
|
30
|
+
[ns.m("has-breadcrumb")]: !!slots.breadcrumb,
|
|
31
|
+
[ns.m("has-extra")]: !!slots.extra,
|
|
32
|
+
[ns.is("contentful")]: !!slots.default
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
});
|
|
23
36
|
function handleClick() {
|
|
24
37
|
emit("back");
|
|
25
38
|
}
|
|
26
39
|
return (_ctx, _cache) => {
|
|
27
40
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
28
|
-
class: vue.normalizeClass(vue.unref(
|
|
41
|
+
class: vue.normalizeClass(vue.unref(kls))
|
|
29
42
|
}, [
|
|
30
43
|
vue.createElementVNode("div", {
|
|
31
|
-
class: vue.normalizeClass(vue.unref(ns).e("
|
|
32
|
-
|
|
44
|
+
class: vue.normalizeClass(vue.unref(ns).e("breadcrumb"))
|
|
45
|
+
}, [
|
|
46
|
+
vue.renderSlot(_ctx.$slots, "breadcrumb")
|
|
47
|
+
], 2),
|
|
48
|
+
vue.createElementVNode("div", {
|
|
49
|
+
class: vue.normalizeClass(vue.unref(ns).e("header"))
|
|
33
50
|
}, [
|
|
34
|
-
_ctx.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
35
|
-
key: 0,
|
|
36
|
-
class: vue.normalizeClass(vue.unref(ns).e("icon"))
|
|
37
|
-
}, [
|
|
38
|
-
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
39
|
-
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), { key: 0 }, {
|
|
40
|
-
default: vue.withCtx(() => [
|
|
41
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
42
|
-
]),
|
|
43
|
-
_: 1
|
|
44
|
-
})) : vue.createCommentVNode("v-if", true)
|
|
45
|
-
])
|
|
46
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
47
51
|
vue.createElementVNode("div", {
|
|
48
|
-
class: vue.normalizeClass(vue.unref(ns).e("
|
|
52
|
+
class: vue.normalizeClass(vue.unref(ns).e("left"))
|
|
53
|
+
}, [
|
|
54
|
+
vue.createElementVNode("div", {
|
|
55
|
+
class: vue.normalizeClass(vue.unref(ns).e("back")),
|
|
56
|
+
role: "button",
|
|
57
|
+
tabindex: "0",
|
|
58
|
+
onClick: handleClick
|
|
59
|
+
}, [
|
|
60
|
+
_ctx.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
61
|
+
key: 0,
|
|
62
|
+
"aria-label": _ctx.title || vue.unref(t)("el.pageHeader.title"),
|
|
63
|
+
class: vue.normalizeClass(vue.unref(ns).e("icon"))
|
|
64
|
+
}, [
|
|
65
|
+
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
66
|
+
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), { key: 0 }, {
|
|
67
|
+
default: vue.withCtx(() => [
|
|
68
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
72
|
+
])
|
|
73
|
+
], 10, _hoisted_1)) : vue.createCommentVNode("v-if", true),
|
|
74
|
+
vue.createElementVNode("div", {
|
|
75
|
+
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
76
|
+
}, [
|
|
77
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
78
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title || vue.unref(t)("el.pageHeader.title")), 1)
|
|
79
|
+
])
|
|
80
|
+
], 2)
|
|
81
|
+
], 2),
|
|
82
|
+
vue.createVNode(vue.unref(index$3.ElDivider), { direction: "vertical" }),
|
|
83
|
+
vue.createElementVNode("div", {
|
|
84
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
85
|
+
}, [
|
|
86
|
+
vue.renderSlot(_ctx.$slots, "content", {}, () => [
|
|
87
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
|
|
88
|
+
])
|
|
89
|
+
], 2)
|
|
90
|
+
], 2),
|
|
91
|
+
_ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: vue.normalizeClass(vue.unref(ns).e("extra"))
|
|
49
94
|
}, [
|
|
50
|
-
vue.renderSlot(_ctx.$slots, "
|
|
51
|
-
|
|
52
|
-
])
|
|
53
|
-
], 2)
|
|
95
|
+
vue.renderSlot(_ctx.$slots, "extra")
|
|
96
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
54
97
|
], 2),
|
|
55
|
-
vue.
|
|
56
|
-
|
|
98
|
+
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
99
|
+
key: 0,
|
|
100
|
+
class: vue.normalizeClass(vue.unref(ns).e("main"))
|
|
57
101
|
}, [
|
|
58
|
-
vue.renderSlot(_ctx.$slots, "
|
|
59
|
-
|
|
60
|
-
])
|
|
61
|
-
], 2)
|
|
102
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
103
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
62
104
|
], 2);
|
|
63
105
|
};
|
|
64
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header2.js","sources":["../../../../../../packages/components/page-header/src/page-header.vue"],"sourcesContent":["<template>\n <div :class=\"ns.
|
|
1
|
+
{"version":3,"file":"page-header2.js","sources":["../../../../../../packages/components/page-header/src/page-header.vue"],"sourcesContent":["<template>\n <div :class=\"kls\">\n <div :class=\"ns.e('breadcrumb')\">\n <slot name=\"breadcrumb\" />\n </div>\n <div :class=\"ns.e('header')\">\n <div :class=\"ns.e('left')\">\n <div\n :class=\"ns.e('back')\"\n role=\"button\"\n tabindex=\"0\"\n @click=\"handleClick\"\n >\n <div\n v-if=\"icon || $slots.icon\"\n :aria-label=\"title || t('el.pageHeader.title')\"\n :class=\"ns.e('icon')\"\n >\n <slot name=\"icon\">\n <el-icon v-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n </slot>\n </div>\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title || t('el.pageHeader.title') }}</slot>\n </div>\n </div>\n <el-divider direction=\"vertical\" />\n <div :class=\"ns.e('content')\">\n <slot name=\"content\">{{ content }}</slot>\n </div>\n </div>\n\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n\n <div v-if=\"$slots.default\" :class=\"ns.e('main')\">\n <slot />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ElDivider } from '@element-plus/components/divider'\n\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { pageHeaderEmits, pageHeaderProps } from './page-header'\n\ndefineOptions({\n name: 'ElPageHeader',\n})\n\ndefineProps(pageHeaderProps)\nconst emit = defineEmits(pageHeaderEmits)\nconst slots = useSlots()\n\nconst { t } = useLocale()\nconst ns = useNamespace('page-header')\nconst kls = computed(() => {\n return [\n ns.b(),\n {\n [ns.m('has-breadcrumb')]: !!slots.breadcrumb,\n [ns.m('has-extra')]: !!slots.extra,\n [ns.is('contentful')]: !!slots.default,\n },\n ]\n})\n\nfunction handleClick() {\n emit('back')\n}\n</script>\n"],"names":["useSlots","useLocale","useNamespace","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0DA,IAAA,MAAA,QAAAA,YAAA,EAAA,CAAA;AAEA,IAAA,MAAA,EAAA,MAAAC,eAAA,EAAA,CAAA;AACA,IAAA,MAAA,EAAA,GAAAC,qBAAA,aAAA,CAAA,CAAA;AACA,IAAA,MAAA,GAAA,GAAAC,aAAA,MAAA;AACA,MAAA,OAAA;AAAA,QACA,GAAA,CAAA,EAAA;AAAA,QACA;AAAA,UACA,CAAA,EAAA,CAAA,CAAA,CAAA,gBAAA,CAAA,GAAA,CAAA,CAAA,KAAA,CAAA,UAAA;AAAA,UACA,CAAA,EAAA,CAAA,CAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,KAAA,CAAA,KAAA;AAAA,UACA,CAAA,EAAA,CAAA,EAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,KAAA,CAAA,OAAA;AAAA,SACA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,SAAA,WAAA,GAAA;AACA,MAAA,IAAA,CAAA,MAAA,CAAA,CAAA;AAAA,KACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var scrollbar$1 = require('./src/
|
|
6
|
+
var scrollbar$1 = require('./src/scrollbar.js');
|
|
7
7
|
var util = require('./src/util.js');
|
|
8
|
-
var scrollbar = require('./src/
|
|
8
|
+
var scrollbar = require('./src/scrollbar2.js');
|
|
9
9
|
var thumb = require('./src/thumb.js');
|
|
10
10
|
var install = require('../../utils/vue/install.js');
|
|
11
11
|
|
|
@@ -2,54 +2,178 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
5
|
+
var vue = require('vue');
|
|
7
6
|
var core = require('@vueuse/core');
|
|
7
|
+
require('../../../utils/index.js');
|
|
8
|
+
require('../../../tokens/index.js');
|
|
9
|
+
require('../../../hooks/index.js');
|
|
10
|
+
var util = require('./util.js');
|
|
11
|
+
var bar = require('./bar2.js');
|
|
12
|
+
var scrollbar = require('./scrollbar2.js');
|
|
13
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
14
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
15
|
+
var style = require('../../../utils/dom/style.js');
|
|
16
|
+
var shared = require('@vue/shared');
|
|
17
|
+
var error = require('../../../utils/error.js');
|
|
18
|
+
var scrollbar$1 = require('../../../tokens/scrollbar.js');
|
|
8
19
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
const __default__ = {
|
|
21
|
+
name: "ElScrollbar"
|
|
22
|
+
};
|
|
23
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
24
|
+
...__default__,
|
|
25
|
+
props: scrollbar.scrollbarProps,
|
|
26
|
+
emits: scrollbar.scrollbarEmits,
|
|
27
|
+
setup(__props, { expose, emit }) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const ns = index.useNamespace("scrollbar");
|
|
30
|
+
let stopResizeObserver = void 0;
|
|
31
|
+
let stopResizeListener = void 0;
|
|
32
|
+
const scrollbar$ = vue.ref();
|
|
33
|
+
const wrap$ = vue.ref();
|
|
34
|
+
const resize$ = vue.ref();
|
|
35
|
+
const sizeWidth = vue.ref("0");
|
|
36
|
+
const sizeHeight = vue.ref("0");
|
|
37
|
+
const barRef = vue.ref();
|
|
38
|
+
const ratioY = vue.ref(1);
|
|
39
|
+
const ratioX = vue.ref(1);
|
|
40
|
+
const SCOPE = "ElScrollbar";
|
|
41
|
+
const style$1 = vue.computed(() => {
|
|
42
|
+
const style2 = {};
|
|
43
|
+
if (props.height)
|
|
44
|
+
style2.height = style.addUnit(props.height);
|
|
45
|
+
if (props.maxHeight)
|
|
46
|
+
style2.maxHeight = style.addUnit(props.maxHeight);
|
|
47
|
+
return [props.wrapStyle, style2];
|
|
48
|
+
});
|
|
49
|
+
const handleScroll = () => {
|
|
50
|
+
var _a;
|
|
51
|
+
if (wrap$.value) {
|
|
52
|
+
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrap$.value);
|
|
53
|
+
emit("scroll", {
|
|
54
|
+
scrollTop: wrap$.value.scrollTop,
|
|
55
|
+
scrollLeft: wrap$.value.scrollLeft
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
function scrollTo(arg1, arg2) {
|
|
60
|
+
if (shared.isObject(arg1)) {
|
|
61
|
+
wrap$.value.scrollTo(arg1);
|
|
62
|
+
} else if (core.isNumber(arg1) && core.isNumber(arg2)) {
|
|
63
|
+
wrap$.value.scrollTo(arg1, arg2);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const setScrollTop = (value) => {
|
|
67
|
+
if (!core.isNumber(value)) {
|
|
68
|
+
error.debugWarn(SCOPE, "value must be a number");
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
wrap$.value.scrollTop = value;
|
|
72
|
+
};
|
|
73
|
+
const setScrollLeft = (value) => {
|
|
74
|
+
if (!core.isNumber(value)) {
|
|
75
|
+
error.debugWarn(SCOPE, "value must be a number");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
wrap$.value.scrollLeft = value;
|
|
79
|
+
};
|
|
80
|
+
const update = () => {
|
|
81
|
+
if (!wrap$.value)
|
|
82
|
+
return;
|
|
83
|
+
const offsetHeight = wrap$.value.offsetHeight - util.GAP;
|
|
84
|
+
const offsetWidth = wrap$.value.offsetWidth - util.GAP;
|
|
85
|
+
const originalHeight = offsetHeight ** 2 / wrap$.value.scrollHeight;
|
|
86
|
+
const originalWidth = offsetWidth ** 2 / wrap$.value.scrollWidth;
|
|
87
|
+
const height = Math.max(originalHeight, props.minSize);
|
|
88
|
+
const width = Math.max(originalWidth, props.minSize);
|
|
89
|
+
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
|
90
|
+
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
|
91
|
+
sizeHeight.value = height + util.GAP < offsetHeight ? `${height}px` : "";
|
|
92
|
+
sizeWidth.value = width + util.GAP < offsetWidth ? `${width}px` : "";
|
|
93
|
+
};
|
|
94
|
+
vue.watch(() => props.noresize, (noresize) => {
|
|
95
|
+
if (noresize) {
|
|
96
|
+
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
97
|
+
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
98
|
+
} else {
|
|
99
|
+
;
|
|
100
|
+
({ stop: stopResizeObserver } = core.useResizeObserver(resize$, update));
|
|
101
|
+
stopResizeListener = core.useEventListener("resize", update);
|
|
102
|
+
}
|
|
103
|
+
}, { immediate: true });
|
|
104
|
+
vue.watch(() => [props.maxHeight, props.height], () => {
|
|
105
|
+
if (!props.native)
|
|
106
|
+
vue.nextTick(() => {
|
|
107
|
+
var _a;
|
|
108
|
+
update();
|
|
109
|
+
if (wrap$.value) {
|
|
110
|
+
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrap$.value);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
vue.provide(scrollbar$1.scrollbarContextKey, vue.reactive({
|
|
115
|
+
scrollbarElement: scrollbar$,
|
|
116
|
+
wrapElement: wrap$
|
|
117
|
+
}));
|
|
118
|
+
vue.onMounted(() => {
|
|
119
|
+
if (!props.native)
|
|
120
|
+
vue.nextTick(() => {
|
|
121
|
+
update();
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
vue.onUpdated(() => update());
|
|
125
|
+
expose({
|
|
126
|
+
wrap$,
|
|
127
|
+
update,
|
|
128
|
+
scrollTo,
|
|
129
|
+
setScrollTop,
|
|
130
|
+
setScrollLeft,
|
|
131
|
+
handleScroll
|
|
132
|
+
});
|
|
133
|
+
return (_ctx, _cache) => {
|
|
134
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
135
|
+
ref_key: "scrollbar$",
|
|
136
|
+
ref: scrollbar$,
|
|
137
|
+
class: vue.normalizeClass(vue.unref(ns).b())
|
|
138
|
+
}, [
|
|
139
|
+
vue.createElementVNode("div", {
|
|
140
|
+
ref_key: "wrap$",
|
|
141
|
+
ref: wrap$,
|
|
142
|
+
class: vue.normalizeClass([
|
|
143
|
+
_ctx.wrapClass,
|
|
144
|
+
vue.unref(ns).e("wrap"),
|
|
145
|
+
{ [vue.unref(ns).em("wrap", "hidden-default")]: !_ctx.native }
|
|
146
|
+
]),
|
|
147
|
+
style: vue.normalizeStyle(vue.unref(style$1)),
|
|
148
|
+
onScroll: handleScroll
|
|
149
|
+
}, [
|
|
150
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
|
151
|
+
ref_key: "resize$",
|
|
152
|
+
ref: resize$,
|
|
153
|
+
class: vue.normalizeClass([vue.unref(ns).e("view"), _ctx.viewClass]),
|
|
154
|
+
style: vue.normalizeStyle(_ctx.viewStyle)
|
|
155
|
+
}, {
|
|
156
|
+
default: vue.withCtx(() => [
|
|
157
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
158
|
+
]),
|
|
159
|
+
_: 3
|
|
160
|
+
}, 8, ["class", "style"]))
|
|
161
|
+
], 38),
|
|
162
|
+
!_ctx.native ? (vue.openBlock(), vue.createBlock(bar["default"], {
|
|
163
|
+
key: 0,
|
|
164
|
+
ref_key: "barRef",
|
|
165
|
+
ref: barRef,
|
|
166
|
+
height: sizeHeight.value,
|
|
167
|
+
width: sizeWidth.value,
|
|
168
|
+
always: _ctx.always,
|
|
169
|
+
"ratio-x": ratioX.value,
|
|
170
|
+
"ratio-y": ratioY.value
|
|
171
|
+
}, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"])) : vue.createCommentVNode("v-if", true)
|
|
172
|
+
], 2);
|
|
173
|
+
};
|
|
44
174
|
}
|
|
45
175
|
});
|
|
46
|
-
|
|
47
|
-
scroll: ({
|
|
48
|
-
scrollTop,
|
|
49
|
-
scrollLeft
|
|
50
|
-
}) => [scrollTop, scrollLeft].every(core.isNumber)
|
|
51
|
-
};
|
|
176
|
+
var Scrollbar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);
|
|
52
177
|
|
|
53
|
-
exports
|
|
54
|
-
exports.scrollbarProps = scrollbarProps;
|
|
178
|
+
exports["default"] = Scrollbar;
|
|
55
179
|
//# sourceMappingURL=scrollbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.
|
|
1
|
+
{"version":3,"file":"scrollbar.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.vue"],"sourcesContent":["<template>\n <div ref=\"scrollbar$\" :class=\"ns.b()\">\n <div\n ref=\"wrap$\"\n :class=\"[\n wrapClass,\n ns.e('wrap'),\n { [ns.em('wrap', 'hidden-default')]: !native },\n ]\"\n :style=\"style\"\n @scroll=\"handleScroll\"\n >\n <component\n :is=\"tag\"\n ref=\"resize$\"\n :class=\"[ns.e('view'), viewClass]\"\n :style=\"viewStyle\"\n >\n <slot />\n </component>\n </div>\n <template v-if=\"!native\">\n <bar\n ref=\"barRef\"\n :height=\"sizeHeight\"\n :width=\"sizeWidth\"\n :always=\"always\"\n :ratio-x=\"ratioX\"\n :ratio-y=\"ratioY\"\n />\n </template>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n onUpdated,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { addUnit, debugWarn, isNumber, isObject } from '@element-plus/utils'\nimport { scrollbarContextKey } from '@element-plus/tokens'\nimport { useNamespace } from '@element-plus/hooks'\nimport { GAP } from './util'\nimport Bar from './bar.vue'\nimport { scrollbarEmits, scrollbarProps } from './scrollbar'\nimport type { BarInstance } from './bar'\nimport type { CSSProperties, StyleValue } from 'vue'\n\ndefineOptions({\n name: 'ElScrollbar',\n})\n\nconst props = defineProps(scrollbarProps)\nconst emit = defineEmits(scrollbarEmits)\n\nconst ns = useNamespace('scrollbar')\n\nlet stopResizeObserver: (() => void) | undefined = undefined\nlet stopResizeListener: (() => void) | undefined = undefined\n\nconst scrollbar$ = ref<HTMLDivElement>()\nconst wrap$ = ref<HTMLDivElement>()\nconst resize$ = ref<HTMLElement>()\n\nconst sizeWidth = ref('0')\nconst sizeHeight = ref('0')\nconst barRef = ref<BarInstance>()\nconst ratioY = ref(1)\nconst ratioX = ref(1)\nconst SCOPE = 'ElScrollbar'\n\nconst style = computed<StyleValue>(() => {\n const style: CSSProperties = {}\n if (props.height) style.height = addUnit(props.height)\n if (props.maxHeight) style.maxHeight = addUnit(props.maxHeight)\n return [props.wrapStyle, style]\n})\n\nconst handleScroll = () => {\n if (wrap$.value) {\n barRef.value?.handleScroll(wrap$.value)\n\n emit('scroll', {\n scrollTop: wrap$.value.scrollTop,\n scrollLeft: wrap$.value.scrollLeft,\n })\n }\n}\n\n// TODO: refactor method overrides, due to script setup dts\n// @ts-nocheck\nfunction scrollTo(xCord: number, yCord?: number): void\nfunction scrollTo(options: ScrollToOptions): void\nfunction scrollTo(arg1: unknown, arg2?: number) {\n if (isObject(arg1)) {\n wrap$.value!.scrollTo(arg1)\n } else if (isNumber(arg1) && isNumber(arg2)) {\n wrap$.value!.scrollTo(arg1, arg2)\n }\n}\n\nconst setScrollTop = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(SCOPE, 'value must be a number')\n return\n }\n wrap$.value!.scrollTop = value\n}\n\nconst setScrollLeft = (value: number) => {\n if (!isNumber(value)) {\n debugWarn(SCOPE, 'value must be a number')\n return\n }\n wrap$.value!.scrollLeft = value\n}\n\nconst update = () => {\n if (!wrap$.value) return\n const offsetHeight = wrap$.value.offsetHeight - GAP\n const offsetWidth = wrap$.value.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrap$.value.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrap$.value.scrollWidth\n const height = Math.max(originalHeight, props.minSize)\n const width = Math.max(originalWidth, props.minSize)\n\n ratioY.value =\n originalHeight /\n (offsetHeight - originalHeight) /\n (height / (offsetHeight - height))\n ratioX.value =\n originalWidth /\n (offsetWidth - originalWidth) /\n (width / (offsetWidth - width))\n\n sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ''\n sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ''\n}\n\nwatch(\n () => props.noresize,\n (noresize) => {\n if (noresize) {\n stopResizeObserver?.()\n stopResizeListener?.()\n } else {\n ;({ stop: stopResizeObserver } = useResizeObserver(resize$, 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 if (wrap$.value) {\n barRef.value?.handleScroll(wrap$.value)\n }\n })\n }\n)\n\nprovide(\n scrollbarContextKey,\n reactive({\n scrollbarElement: scrollbar$,\n wrapElement: wrap$,\n })\n)\n\nonMounted(() => {\n if (!props.native)\n nextTick(() => {\n update()\n })\n})\nonUpdated(() => update())\n\ndefineExpose({\n /** @description scrollbar wrap ref */\n wrap$,\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"],"names":["useNamespace","ref","style","computed","addUnit","isObject","isNumber","debugWarn","GAP","watch","useResizeObserver","useEventListener","nextTick","provide","scrollbarContextKey","reactive","onMounted","onUpdated"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,IAAA,MAAA,EAAA,GAAAA,mBAAA,WAAA,CAAA,CAAA;AAEA,IAAA,IAAA,kBAAA,GAAA,KAAA,CAAA,CAAA;AACA,IAAA,IAAA,kBAAA,GAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,aAAAC,OAAA,EAAA,CAAA;AACA,IAAA,MAAA,QAAAA,OAAA,EAAA,CAAA;AACA,IAAA,MAAA,UAAAA,OAAA,EAAA,CAAA;AAEA,IAAA,MAAA,SAAA,GAAAA,QAAA,GAAA,CAAA,CAAA;AACA,IAAA,MAAA,UAAA,GAA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