@element-plus/nightly 0.0.20220119 → 0.0.20220120
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 +488 -470
- package/dist/index.full.min.js +6 -6
- 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 +488 -470
- 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/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/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/calendar/index.d.ts +11 -0
- package/es/components/calendar/src/calendar.vue.d.ts +11 -0
- package/es/components/calendar/src/calendar.vue_vue_type_script_lang.mjs +4 -1
- package/es/components/calendar/src/calendar.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/calendar/src/calendar.vue_vue_type_template_id_76705c76_lang.mjs +26 -26
- package/es/components/calendar/src/calendar.vue_vue_type_template_id_76705c76_lang.mjs.map +1 -1
- package/es/components/calendar/src/date-table.vue.d.ts +22 -0
- package/es/components/calendar/src/date-table.vue_vue_type_script_lang.mjs +6 -1
- package/es/components/calendar/src/date-table.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/calendar/src/date-table.vue_vue_type_template_id_297fdb36_lang.mjs +7 -9
- package/es/components/calendar/src/date-table.vue_vue_type_template_id_297fdb36_lang.mjs.map +1 -1
- package/es/components/container/index.d.ts +103 -2
- package/es/components/container/src/aside.vue.d.ts +11 -0
- package/es/components/container/src/aside.vue_vue_type_script_lang.mjs +5 -1
- package/es/components/container/src/aside.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/container/src/aside.vue_vue_type_template_id_47e12f0a_lang.mjs +3 -3
- package/es/components/container/src/aside.vue_vue_type_template_id_47e12f0a_lang.mjs.map +1 -1
- package/es/components/container/src/container.vue.d.ts +11 -0
- package/es/components/container/src/container.vue_vue_type_script_lang.mjs +5 -1
- package/es/components/container/src/container.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/container/src/container.vue_vue_type_template_id_60a2865a_lang.mjs +1 -1
- package/es/components/container/src/footer.vue.d.ts +11 -0
- package/es/components/container/src/footer.vue_vue_type_script_lang.mjs +5 -1
- package/es/components/container/src/footer.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/container/src/footer.vue_vue_type_template_id_2c2b128e_lang.mjs +3 -3
- package/es/components/container/src/footer.vue_vue_type_template_id_2c2b128e_lang.mjs.map +1 -1
- package/es/components/container/src/header.vue.d.ts +11 -0
- package/es/components/container/src/header.vue_vue_type_script_lang.mjs +5 -1
- package/es/components/container/src/header.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/container/src/header.vue_vue_type_template_id_0b1cdaab_lang.mjs +3 -3
- package/es/components/container/src/header.vue_vue_type_template_id_0b1cdaab_lang.mjs.map +1 -1
- package/es/components/container/src/main.vue.d.ts +13 -1
- package/es/components/container/src/main.vue_vue_type_script_lang.mjs +9 -1
- package/es/components/container/src/main.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/container/src/main.vue_vue_type_template_id_526ed157_lang.mjs +5 -4
- package/es/components/container/src/main.vue_vue_type_template_id_526ed157_lang.mjs.map +1 -1
- package/es/components/descriptions/index.d.ts +11 -0
- package/es/components/descriptions/src/descriptions-cell.mjs +14 -15
- package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
- package/es/components/descriptions/src/index.vue.d.ts +11 -0
- package/es/components/descriptions/src/index.vue_vue_type_script_lang.mjs +6 -4
- package/es/components/descriptions/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.mjs +18 -16
- package/es/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.mjs.map +1 -1
- package/es/components/slider/src/button.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/slider/src/button.vue_vue_type_template_id_9cd3e794_lang.mjs +3 -4
- package/es/components/slider/src/button.vue_vue_type_template_id_9cd3e794_lang.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/calendar/index.d.ts +11 -0
- package/lib/components/calendar/src/calendar.vue.d.ts +11 -0
- package/lib/components/calendar/src/calendar.vue_vue_type_script_lang.js +6 -3
- package/lib/components/calendar/src/calendar.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/calendar/src/calendar.vue_vue_type_template_id_76705c76_lang.js +25 -25
- package/lib/components/calendar/src/calendar.vue_vue_type_template_id_76705c76_lang.js.map +1 -1
- package/lib/components/calendar/src/date-table.vue.d.ts +22 -0
- package/lib/components/calendar/src/date-table.vue_vue_type_script_lang.js +6 -1
- package/lib/components/calendar/src/date-table.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/calendar/src/date-table.vue_vue_type_template_id_297fdb36_lang.js +7 -9
- package/lib/components/calendar/src/date-table.vue_vue_type_template_id_297fdb36_lang.js.map +1 -1
- package/lib/components/container/index.d.ts +103 -2
- package/lib/components/container/src/aside.vue.d.ts +11 -0
- package/lib/components/container/src/aside.vue_vue_type_script_lang.js +5 -1
- package/lib/components/container/src/aside.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/container/src/aside.vue_vue_type_template_id_47e12f0a_lang.js +2 -2
- package/lib/components/container/src/aside.vue_vue_type_template_id_47e12f0a_lang.js.map +1 -1
- package/lib/components/container/src/container.vue.d.ts +11 -0
- package/lib/components/container/src/container.vue_vue_type_script_lang.js +5 -1
- package/lib/components/container/src/container.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/container/src/container.vue_vue_type_template_id_60a2865a_lang.js +1 -1
- package/lib/components/container/src/footer.vue.d.ts +11 -0
- package/lib/components/container/src/footer.vue_vue_type_script_lang.js +5 -1
- package/lib/components/container/src/footer.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/container/src/footer.vue_vue_type_template_id_2c2b128e_lang.js +2 -2
- package/lib/components/container/src/footer.vue_vue_type_template_id_2c2b128e_lang.js.map +1 -1
- package/lib/components/container/src/header.vue.d.ts +11 -0
- package/lib/components/container/src/header.vue_vue_type_script_lang.js +5 -1
- package/lib/components/container/src/header.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/container/src/header.vue_vue_type_template_id_0b1cdaab_lang.js +2 -2
- package/lib/components/container/src/header.vue_vue_type_template_id_0b1cdaab_lang.js.map +1 -1
- package/lib/components/container/src/main.vue.d.ts +13 -1
- package/lib/components/container/src/main.vue_vue_type_script_lang.js +9 -1
- package/lib/components/container/src/main.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/container/src/main.vue_vue_type_template_id_526ed157_lang.js +4 -3
- package/lib/components/container/src/main.vue_vue_type_template_id_526ed157_lang.js.map +1 -1
- package/lib/components/descriptions/index.d.ts +11 -0
- package/lib/components/descriptions/src/descriptions-cell.js +14 -15
- package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
- package/lib/components/descriptions/src/index.vue.d.ts +11 -0
- package/lib/components/descriptions/src/index.vue_vue_type_script_lang.js +6 -4
- package/lib/components/descriptions/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.js +18 -16
- package/lib/components/descriptions/src/index.vue_vue_type_template_id_788d3854_lang.js.map +1 -1
- package/lib/components/slider/src/button.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/slider/src/button.vue_vue_type_template_id_9cd3e794_lang.js +3 -4
- package/lib/components/slider/src/button.vue_vue_type_template_id_9cd3e794_lang.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/table.scss +2 -2
- package/web-types.json +1 -1
|
@@ -5,6 +5,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
};
|
|
6
6
|
}, {
|
|
7
7
|
isVertical: import("vue").ComputedRef<boolean>;
|
|
8
|
+
ns: {
|
|
9
|
+
namespace: import("vue").ComputedRef<string>;
|
|
10
|
+
b: (blockSuffix?: string) => string;
|
|
11
|
+
e: (element?: string | undefined) => string;
|
|
12
|
+
m: (modifier?: string | undefined) => string;
|
|
13
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
14
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
15
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
16
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
17
|
+
is: (name: string, state?: boolean) => string;
|
|
18
|
+
};
|
|
8
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
20
|
direction: {
|
|
10
21
|
type: StringConstructor;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
6
8
|
|
|
7
9
|
var script = vue.defineComponent({
|
|
8
10
|
name: "ElContainer",
|
|
@@ -13,6 +15,7 @@ var script = vue.defineComponent({
|
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
setup(props, { slots }) {
|
|
18
|
+
const ns = index.useNamespace("container");
|
|
16
19
|
const isVertical = vue.computed(() => {
|
|
17
20
|
if (props.direction === "vertical") {
|
|
18
21
|
return true;
|
|
@@ -30,7 +33,8 @@ var script = vue.defineComponent({
|
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
35
|
return {
|
|
33
|
-
isVertical
|
|
36
|
+
isVertical,
|
|
37
|
+
ns
|
|
34
38
|
};
|
|
35
39
|
}
|
|
36
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/container.vue"],"sourcesContent":["<template>\n <section
|
|
1
|
+
{"version":3,"file":"container.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/container.vue"],"sourcesContent":["<template>\n <section :class=\"[ns.b(), ns.is('vertical', isVertical)]\">\n <slot></slot>\n </section>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { Component, VNode } from 'vue'\n\nexport default defineComponent({\n name: 'ElContainer',\n props: {\n direction: {\n type: String,\n default: '',\n },\n },\n setup(props, { slots }) {\n const ns = useNamespace('container')\n\n const isVertical = computed(() => {\n if (props.direction === 'vertical') {\n return true\n } else if (props.direction === 'horizontal') {\n return false\n }\n if (slots && slots.default) {\n const vNodes: VNode[] = slots.default()\n return vNodes.some((vNode) => {\n const tag = (vNode.type as Component).name\n return tag === 'ElHeader' || tag === 'ElFooter'\n })\n } else {\n return false\n }\n })\n return {\n isVertical,\n ns,\n }\n },\n})\n</script>\n"],"names":["defineComponent","useNamespace"],"mappings":";;;;;;;;AAOA,aAAeA,mBAAe,CAAC;;AAE/B,EAAE,KAAK,EAAE;;AAET,UAAU,EAAE,MAAM;MACZ,OAAO,EAAE,EAAE;KACZ;;OAEE,CAAC,KAAK,EAAE,EAAE;UACP,EAAE,GAAGC;IACX;;QAEI,OAAO,IAAI,CAAC;OACb,MAAM,IAAI,KAAK,CAAC,SAAS,KAAK;;OAE9B;MACD,IAAI,KAAK,IAAI,KAAK,QAAQ,EAAE;QAC1B;QACA,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK;UAC5B,MAAM,GAAG;;SAEV,CAAC,CAAC;;QAEH,OAAO,KAAK,CAAC;;;;MAIf;QACE;MACF;;;;;;"}
|
|
@@ -6,7 +6,7 @@ var vue = require('vue');
|
|
|
6
6
|
|
|
7
7
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8
8
|
return vue.openBlock(), vue.createElementBlock("section", {
|
|
9
|
-
class: vue.normalizeClass([
|
|
9
|
+
class: vue.normalizeClass([_ctx.ns.b(), _ctx.ns.is("vertical", _ctx.isVertical)])
|
|
10
10
|
}, [
|
|
11
11
|
vue.renderSlot(_ctx.$slots, "default")
|
|
12
12
|
], 2);
|
|
@@ -6,6 +6,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
};
|
|
7
7
|
}, {
|
|
8
8
|
style: import("vue").ComputedRef<CSSProperties>;
|
|
9
|
+
ns: {
|
|
10
|
+
namespace: import("vue").ComputedRef<string>;
|
|
11
|
+
b: (blockSuffix?: string) => string;
|
|
12
|
+
e: (element?: string | undefined) => string;
|
|
13
|
+
m: (modifier?: string | undefined) => string;
|
|
14
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
15
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
16
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
17
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
18
|
+
is: (name: string, state?: boolean) => string;
|
|
19
|
+
};
|
|
9
20
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
21
|
height: {
|
|
11
22
|
type: StringConstructor;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
6
8
|
|
|
7
9
|
var script = vue.defineComponent({
|
|
8
10
|
name: "ElFooter",
|
|
@@ -13,10 +15,12 @@ var script = vue.defineComponent({
|
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
setup(props) {
|
|
18
|
+
const ns = index.useNamespace("footer");
|
|
16
19
|
return {
|
|
17
20
|
style: vue.computed(() => props.height ? {
|
|
18
21
|
"--el-footer-height": props.height
|
|
19
|
-
} : {})
|
|
22
|
+
} : {}),
|
|
23
|
+
ns
|
|
20
24
|
};
|
|
21
25
|
}
|
|
22
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/footer.vue"],"sourcesContent":["<template>\n <footer class=\"
|
|
1
|
+
{"version":3,"file":"footer.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/footer.vue"],"sourcesContent":["<template>\n <footer :class=\"ns.b()\" :style=\"style\">\n <slot></slot>\n </footer>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { CSSProperties } from 'vue'\n\nexport default defineComponent({\n name: 'ElFooter',\n props: {\n height: {\n type: String,\n default: null,\n },\n },\n setup(props) {\n const ns = useNamespace('footer')\n\n return {\n style: computed(\n () =>\n (props.height\n ? {\n '--el-footer-height': props.height,\n }\n : {}) as CSSProperties\n ),\n ns,\n }\n },\n})\n</script>\n"],"names":["defineComponent","useNamespace"],"mappings":";;;;;;;;AAOA,aAAeA,mBAAe,CAAC;;AAE/B,EAAE,KAAK,EAAE;;AAET,UAAU,EAAE,MAAM;MACZ,OAAO,EAAE;KACV;;OAEE,CAAC,KAAK,EAAE;UACL,EAAE,GAAGC;IACX;;QAEI;OACD,GAAG,GAAG;;KAER,CAAC;;;;;;"}
|
|
@@ -6,11 +6,11 @@ var vue = require('vue');
|
|
|
6
6
|
|
|
7
7
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8
8
|
return vue.openBlock(), vue.createElementBlock("footer", {
|
|
9
|
-
class:
|
|
9
|
+
class: vue.normalizeClass(_ctx.ns.b()),
|
|
10
10
|
style: vue.normalizeStyle(_ctx.style)
|
|
11
11
|
}, [
|
|
12
12
|
vue.renderSlot(_ctx.$slots, "default")
|
|
13
|
-
],
|
|
13
|
+
], 6);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
exports.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.vue_vue_type_template_id_2c2b128e_lang.js","sources":["../../../../../../packages/components/container/src/footer.vue?vue&type=template&id=2c2b128e&lang.js"],"sourcesContent":["<template>\n <footer class=\"
|
|
1
|
+
{"version":3,"file":"footer.vue_vue_type_template_id_2c2b128e_lang.js","sources":["../../../../../../packages/components/container/src/footer.vue?vue&type=template&id=2c2b128e&lang.js"],"sourcesContent":["<template>\n <footer :class=\"ns.b()\" :style=\"style\">\n <slot></slot>\n </footer>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { CSSProperties } from 'vue'\n\nexport default defineComponent({\n name: 'ElFooter',\n props: {\n height: {\n type: String,\n default: null,\n },\n },\n setup(props) {\n const ns = useNamespace('footer')\n\n return {\n style: computed(\n () =>\n (props.height\n ? {\n '--el-footer-height': props.height,\n }\n : {}) as CSSProperties\n ),\n ns,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;IACW,KAAK,qBAAE;;;;;;;;"}
|
|
@@ -6,6 +6,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
};
|
|
7
7
|
}, {
|
|
8
8
|
style: import("vue").ComputedRef<CSSProperties>;
|
|
9
|
+
ns: {
|
|
10
|
+
namespace: import("vue").ComputedRef<string>;
|
|
11
|
+
b: (blockSuffix?: string) => string;
|
|
12
|
+
e: (element?: string | undefined) => string;
|
|
13
|
+
m: (modifier?: string | undefined) => string;
|
|
14
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
15
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
16
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
17
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
18
|
+
is: (name: string, state?: boolean) => string;
|
|
19
|
+
};
|
|
9
20
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
21
|
height: {
|
|
11
22
|
type: StringConstructor;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
6
8
|
|
|
7
9
|
var script = vue.defineComponent({
|
|
8
10
|
name: "ElHeader",
|
|
@@ -13,10 +15,12 @@ var script = vue.defineComponent({
|
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
setup(props) {
|
|
18
|
+
const ns = index.useNamespace("header");
|
|
16
19
|
return {
|
|
17
20
|
style: vue.computed(() => props.height ? {
|
|
18
21
|
"--el-header-height": props.height
|
|
19
|
-
} : {})
|
|
22
|
+
} : {}),
|
|
23
|
+
ns
|
|
20
24
|
};
|
|
21
25
|
}
|
|
22
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/header.vue"],"sourcesContent":["<template>\n <header class=\"
|
|
1
|
+
{"version":3,"file":"header.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/header.vue"],"sourcesContent":["<template>\n <header :class=\"ns.b()\" :style=\"style\">\n <slot></slot>\n </header>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { CSSProperties } from 'vue'\n\nexport default defineComponent({\n name: 'ElHeader',\n props: {\n height: {\n type: String,\n default: null,\n },\n },\n setup(props) {\n const ns = useNamespace('header')\n\n return {\n style: computed(\n () =>\n (props.height\n ? {\n '--el-header-height': props.height,\n }\n : {}) as CSSProperties\n ),\n ns,\n }\n },\n})\n</script>\n"],"names":["defineComponent","useNamespace"],"mappings":";;;;;;;;AAOA,aAAeA,mBAAe,CAAC;;AAE/B,EAAE,KAAK,EAAE;;AAET,UAAU,EAAE,MAAM;MACZ,OAAO,EAAE;KACV;;OAEE,CAAC,KAAK,EAAE;UACL,EAAE,GAAGC;IACX;;QAEI;OACD,GAAG,GAAG;;KAER,CAAC;;;;;;"}
|
|
@@ -6,11 +6,11 @@ var vue = require('vue');
|
|
|
6
6
|
|
|
7
7
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8
8
|
return vue.openBlock(), vue.createElementBlock("header", {
|
|
9
|
-
class:
|
|
9
|
+
class: vue.normalizeClass(_ctx.ns.b()),
|
|
10
10
|
style: vue.normalizeStyle(_ctx.style)
|
|
11
11
|
}, [
|
|
12
12
|
vue.renderSlot(_ctx.$slots, "default")
|
|
13
|
-
],
|
|
13
|
+
], 6);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
exports.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.vue_vue_type_template_id_0b1cdaab_lang.js","sources":["../../../../../../packages/components/container/src/header.vue?vue&type=template&id=0b1cdaab&lang.js"],"sourcesContent":["<template>\n <header class=\"
|
|
1
|
+
{"version":3,"file":"header.vue_vue_type_template_id_0b1cdaab_lang.js","sources":["../../../../../../packages/components/container/src/header.vue?vue&type=template&id=0b1cdaab&lang.js"],"sourcesContent":["<template>\n <header :class=\"ns.b()\" :style=\"style\">\n <slot></slot>\n </header>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { CSSProperties } from 'vue'\n\nexport default defineComponent({\n name: 'ElHeader',\n props: {\n height: {\n type: String,\n default: null,\n },\n },\n setup(props) {\n const ns = useNamespace('header')\n\n return {\n style: computed(\n () =>\n (props.height\n ? {\n '--el-header-height': props.height,\n }\n : {}) as CSSProperties\n ),\n ns,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;IACW,KAAK,qBAAE;;;;;;;;"}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
ns: {
|
|
3
|
+
namespace: import("vue").ComputedRef<string>;
|
|
4
|
+
b: (blockSuffix?: string) => string;
|
|
5
|
+
e: (element?: string | undefined) => string;
|
|
6
|
+
m: (modifier?: string | undefined) => string;
|
|
7
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
8
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
9
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
10
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
11
|
+
is: (name: string, state?: boolean) => string;
|
|
12
|
+
};
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
14
|
export default _default;
|
|
@@ -3,9 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
6
8
|
|
|
7
9
|
var script = vue.defineComponent({
|
|
8
|
-
name: "ElMain"
|
|
10
|
+
name: "ElMain",
|
|
11
|
+
setup() {
|
|
12
|
+
const ns = index.useNamespace("main");
|
|
13
|
+
return {
|
|
14
|
+
ns
|
|
15
|
+
};
|
|
16
|
+
}
|
|
9
17
|
});
|
|
10
18
|
|
|
11
19
|
exports["default"] = script;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/main.vue"],"sourcesContent":["<template>\n <main class=\"
|
|
1
|
+
{"version":3,"file":"main.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/container/src/main.vue"],"sourcesContent":["<template>\n <main :class=\"ns.b()\">\n <slot></slot>\n </main>\n</template>\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nexport default defineComponent({\n name: 'ElMain',\n setup() {\n const ns = useNamespace('main')\n\n return {\n ns,\n }\n },\n})\n</script>\n"],"names":["defineComponent","useNamespace"],"mappings":";;;;;;;;AAOA,aAAeA,mBAAe,CAAC;;AAE/B,EAAE,KAAK,GAAG;IACN,MAAM,EAAE,GAAGC;IACX;MACE,EAAE;;;;;;;"}
|
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
|
|
7
|
-
const _hoisted_1 = { class: "el-main" };
|
|
8
7
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9
|
-
return vue.openBlock(), vue.createElementBlock("main",
|
|
8
|
+
return vue.openBlock(), vue.createElementBlock("main", {
|
|
9
|
+
class: vue.normalizeClass(_ctx.ns.b())
|
|
10
|
+
}, [
|
|
10
11
|
vue.renderSlot(_ctx.$slots, "default")
|
|
11
|
-
]);
|
|
12
|
+
], 2);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
exports.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.vue_vue_type_template_id_526ed157_lang.js","sources":[
|
|
1
|
+
{"version":3,"file":"main.vue_vue_type_template_id_526ed157_lang.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -26,6 +26,17 @@ export declare const ElDescriptions: import("../../utils/types").SFCWithInstall<
|
|
|
26
26
|
}, {
|
|
27
27
|
descriptionKls: import("vue").ComputedRef<string[]>;
|
|
28
28
|
getRows: () => never[];
|
|
29
|
+
ns: {
|
|
30
|
+
namespace: import("vue").ComputedRef<string>;
|
|
31
|
+
b: (blockSuffix?: string) => string;
|
|
32
|
+
e: (element?: string | undefined) => string;
|
|
33
|
+
m: (modifier?: string | undefined) => string;
|
|
34
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
35
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
36
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
37
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
38
|
+
is: (name: string, state?: boolean) => string;
|
|
39
|
+
};
|
|
29
40
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
41
|
border: {
|
|
31
42
|
type: BooleanConstructor;
|
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var util = require('../../../utils/util.js');
|
|
7
7
|
var vnode = require('../../../utils/vnode.js');
|
|
8
|
+
require('../../../hooks/index.js');
|
|
8
9
|
var token = require('./token.js');
|
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
9
11
|
|
|
10
12
|
var DescriptionsCell = vue.defineComponent({
|
|
11
13
|
name: "ElDescriptionsCell",
|
|
@@ -42,17 +44,16 @@ var DescriptionsCell = vue.defineComponent({
|
|
|
42
44
|
width: util.addUnit(item.width),
|
|
43
45
|
minWidth: util.addUnit(item.minWidth)
|
|
44
46
|
};
|
|
47
|
+
const ns = index.useNamespace("descriptions");
|
|
45
48
|
switch (this.type) {
|
|
46
49
|
case "label":
|
|
47
50
|
return vue.h(this.tag, {
|
|
48
51
|
style,
|
|
49
52
|
class: [
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"is-vertical-label": isVertical
|
|
55
|
-
},
|
|
53
|
+
ns.e("cell"),
|
|
54
|
+
ns.e("label"),
|
|
55
|
+
ns.is("bordered-label", border),
|
|
56
|
+
ns.is("vertical-label", isVertical),
|
|
56
57
|
labelAlign,
|
|
57
58
|
labelClassName
|
|
58
59
|
],
|
|
@@ -62,12 +63,10 @@ var DescriptionsCell = vue.defineComponent({
|
|
|
62
63
|
return vue.h(this.tag, {
|
|
63
64
|
style,
|
|
64
65
|
class: [
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"is-vertical-content": isVertical
|
|
70
|
-
},
|
|
66
|
+
ns.e("cell"),
|
|
67
|
+
ns.e("content"),
|
|
68
|
+
ns.is("bordered-content", border),
|
|
69
|
+
ns.is("vertical-content", isVertical),
|
|
71
70
|
align,
|
|
72
71
|
className
|
|
73
72
|
],
|
|
@@ -76,14 +75,14 @@ var DescriptionsCell = vue.defineComponent({
|
|
|
76
75
|
default:
|
|
77
76
|
return vue.h("td", {
|
|
78
77
|
style,
|
|
79
|
-
class: ["
|
|
78
|
+
class: [ns.e("cell"), align],
|
|
80
79
|
colSpan: span
|
|
81
80
|
}, [
|
|
82
81
|
vue.h("span", {
|
|
83
|
-
class: ["
|
|
82
|
+
class: [ns.e("label"), labelClassName]
|
|
84
83
|
}, label),
|
|
85
84
|
vue.h("span", {
|
|
86
|
-
class: ["
|
|
85
|
+
class: [ns.e("content"), className]
|
|
87
86
|
}, content)
|
|
88
87
|
]);
|
|
89
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptions-cell.js","sources":["../../../../../../packages/components/descriptions/src/descriptions-cell.ts"],"sourcesContent":["import { defineComponent, h, inject } from 'vue'\nimport { addUnit } from '@element-plus/utils/util'\nimport { getNormalizedProps } from '@element-plus/utils/vnode'\nimport { elDescriptionsKey } from './token'\n\nimport type { VNode } from 'vue'\nimport type {\n IDescriptionsInject,\n IDescriptionsItemInject,\n} from './descriptions.type'\n\nexport default defineComponent({\n name: 'ElDescriptionsCell',\n props: {\n cell: {\n type: Object,\n },\n tag: {\n type: String,\n },\n type: {\n type: String,\n },\n },\n setup() {\n const descriptions = inject(elDescriptionsKey, {} as IDescriptionsInject)\n\n return {\n descriptions,\n }\n },\n render() {\n const item = getNormalizedProps(\n this.cell as VNode\n ) as IDescriptionsItemInject\n\n const { border, direction } = this.descriptions\n const isVertical = direction === 'vertical'\n const label = this.cell?.children?.label?.() || item.label\n const content = this.cell?.children?.default?.()\n const span = item.span\n const align = item.align ? `is-${item.align}` : ''\n const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : '' || align\n const className = item.className\n const labelClassName = item.labelClassName\n const style = {\n width: addUnit(item.width),\n minWidth: addUnit(item.minWidth),\n }\n\n switch (this.type) {\n case 'label':\n return h(\n this.tag,\n {\n style,\n class: [\n '
|
|
1
|
+
{"version":3,"file":"descriptions-cell.js","sources":["../../../../../../packages/components/descriptions/src/descriptions-cell.ts"],"sourcesContent":["import { defineComponent, h, inject } from 'vue'\nimport { addUnit } from '@element-plus/utils/util'\nimport { getNormalizedProps } from '@element-plus/utils/vnode'\nimport { useNamespace } from '@element-plus/hooks'\nimport { elDescriptionsKey } from './token'\n\nimport type { VNode } from 'vue'\nimport type {\n IDescriptionsInject,\n IDescriptionsItemInject,\n} from './descriptions.type'\n\nexport default defineComponent({\n name: 'ElDescriptionsCell',\n props: {\n cell: {\n type: Object,\n },\n tag: {\n type: String,\n },\n type: {\n type: String,\n },\n },\n setup() {\n const descriptions = inject(elDescriptionsKey, {} as IDescriptionsInject)\n\n return {\n descriptions,\n }\n },\n render() {\n const item = getNormalizedProps(\n this.cell as VNode\n ) as IDescriptionsItemInject\n\n const { border, direction } = this.descriptions\n const isVertical = direction === 'vertical'\n const label = this.cell?.children?.label?.() || item.label\n const content = this.cell?.children?.default?.()\n const span = item.span\n const align = item.align ? `is-${item.align}` : ''\n const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : '' || align\n const className = item.className\n const labelClassName = item.labelClassName\n const style = {\n width: addUnit(item.width),\n minWidth: addUnit(item.minWidth),\n }\n const ns = useNamespace('descriptions')\n\n switch (this.type) {\n case 'label':\n return h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('label'),\n ns.is('bordered-label', border),\n ns.is('vertical-label', isVertical),\n labelAlign,\n labelClassName,\n ],\n colSpan: isVertical ? span : 1,\n },\n label\n )\n case 'content':\n return h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('content'),\n ns.is('bordered-content', border),\n ns.is('vertical-content', isVertical),\n align,\n className,\n ],\n colSpan: isVertical ? span : span * 2 - 1,\n },\n content\n )\n default:\n return h(\n 'td',\n {\n style,\n class: [ns.e('cell'), align],\n colSpan: span,\n },\n [\n h(\n 'span',\n {\n class: [ns.e('label'), labelClassName],\n },\n label\n ),\n h(\n 'span',\n {\n class: [ns.e('content'), className],\n },\n content\n ),\n ]\n )\n }\n },\n})\n"],"names":["defineComponent","inject","elDescriptionsKey","getNormalizedProps","addUnit","useNamespace","h"],"mappings":"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"}
|
|
@@ -28,6 +28,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
}, {
|
|
29
29
|
descriptionKls: import("vue").ComputedRef<string[]>;
|
|
30
30
|
getRows: () => never[];
|
|
31
|
+
ns: {
|
|
32
|
+
namespace: import("vue").ComputedRef<string>;
|
|
33
|
+
b: (blockSuffix?: string) => string;
|
|
34
|
+
e: (element?: string | undefined) => string;
|
|
35
|
+
m: (modifier?: string | undefined) => string;
|
|
36
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
37
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
38
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
39
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
40
|
+
is: (name: string, state?: boolean) => string;
|
|
41
|
+
};
|
|
31
42
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
43
|
border: {
|
|
33
44
|
type: BooleanConstructor;
|
|
@@ -9,6 +9,7 @@ require('./descriptions-row.js');
|
|
|
9
9
|
var token = require('./token.js');
|
|
10
10
|
var descriptionsRow_vue_vue_type_script_lang = require('./descriptions-row.vue_vue_type_script_lang.js');
|
|
11
11
|
var index = require('../../../hooks/use-common-props/index.js');
|
|
12
|
+
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
12
13
|
|
|
13
14
|
var script = vue.defineComponent({
|
|
14
15
|
name: "ElDescriptions",
|
|
@@ -44,10 +45,10 @@ var script = vue.defineComponent({
|
|
|
44
45
|
setup(props, { slots }) {
|
|
45
46
|
vue.provide(token.elDescriptionsKey, props);
|
|
46
47
|
const descriptionsSize = index.useSize();
|
|
47
|
-
const
|
|
48
|
+
const ns = index$1.useNamespace("descriptions");
|
|
48
49
|
const descriptionKls = vue.computed(() => [
|
|
49
|
-
|
|
50
|
-
descriptionsSize.value
|
|
50
|
+
ns.b(),
|
|
51
|
+
ns.is(ns.m(descriptionsSize.value), !!descriptionsSize.value)
|
|
51
52
|
]);
|
|
52
53
|
const flattedChildren = (children) => {
|
|
53
54
|
const temp = Array.isArray(children) ? children : [children];
|
|
@@ -109,7 +110,8 @@ var script = vue.defineComponent({
|
|
|
109
110
|
};
|
|
110
111
|
return {
|
|
111
112
|
descriptionKls,
|
|
112
|
-
getRows
|
|
113
|
+
getRows,
|
|
114
|
+
ns
|
|
113
115
|
};
|
|
114
116
|
}
|
|
115
117
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/descriptions/src/index.vue"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n class=\"
|
|
1
|
+
{"version":3,"file":"index.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/descriptions/src/index.vue"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n :class=\"ns.e('header')\"\n >\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div :class=\"ns.e('extra')\">\n <slot name=\"extra\">{{ extra }}</slot>\n </div>\n </div>\n\n <div :class=\"ns.e('body')\">\n <table :class=\"[ns.e('table'), ns.is('bordered', border)]\">\n <tbody>\n <template v-for=\"(row, index) in getRows()\" :key=\"index\">\n <el-descriptions-row :row=\"row\" />\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, provide } from 'vue'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { useSize, useNamespace } from '@element-plus/hooks'\nimport DescriptionsRow from './descriptions-row.vue'\nimport { elDescriptionsKey } from './token'\n\nimport type { PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\n\nexport default defineComponent({\n name: 'ElDescriptions',\n components: {\n [DescriptionsRow.name]: DescriptionsRow,\n },\n props: {\n border: {\n type: Boolean,\n default: false,\n },\n column: {\n type: Number,\n default: 3,\n },\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n title: {\n type: String,\n default: '',\n },\n extra: {\n type: String,\n default: '',\n },\n },\n setup(props, { slots }) {\n provide(elDescriptionsKey, props)\n\n const descriptionsSize = useSize()\n const ns = useNamespace('descriptions')\n\n const descriptionKls = computed(() => [\n ns.b(),\n ns.is(ns.m(descriptionsSize.value), !!descriptionsSize.value),\n ])\n\n const flattedChildren = (children) => {\n const temp = Array.isArray(children) ? children : [children]\n const res = []\n temp.forEach((child) => {\n if (Array.isArray(child.children)) {\n res.push(...flattedChildren(child.children))\n } else {\n res.push(child)\n }\n })\n return res\n }\n\n const filledNode = (node, span, count, isLast = false) => {\n if (!node.props) {\n node.props = {}\n }\n if (span > count) {\n node.props.span = count\n }\n if (isLast) {\n // set the last span\n node.props.span = span\n }\n return node\n }\n\n const getRows = () => {\n const children = flattedChildren(slots.default?.()).filter(\n (node) => node?.type?.name === 'ElDescriptionsItem'\n )\n const rows = []\n let temp = []\n let count = props.column\n let totalSpan = 0 // all spans number of item\n\n children.forEach((node, index) => {\n const span = node.props?.span || 1\n\n if (index < children.length - 1) {\n totalSpan += span > count ? count : span\n }\n\n if (index === children.length - 1) {\n // calculate the last item span\n const lastSpan = props.column - (totalSpan % props.column)\n temp.push(filledNode(node, lastSpan, count, true))\n rows.push(temp)\n return\n }\n\n if (span < count) {\n count -= span\n temp.push(node)\n } else {\n temp.push(filledNode(node, span, count))\n rows.push(temp)\n count = props.column\n temp = []\n }\n })\n\n return rows\n }\n\n return {\n descriptionKls,\n getRows,\n ns,\n }\n },\n})\n</script>\n"],"names":["defineComponent","DescriptionsRow","isValidComponentSize","elDescriptionsKey"],"mappings":";;;;;;;;;;;;;AA+BA,aAAeA,mBAAe,CAAC;;AAE/B,EAAE,UAAU,EAAE;AACd,IAAI,CAACC,mDAAe,CAAC,IAAI,GAAGA,mDAAe;;AAE3C,EAAE,KAAK,EAAE;IACL,MAAM,EAAE;MACN,IAAI,EAAE;MACN,OAAO,EAAE,KAAK;;IAEhB;MACE,IAAI,EAAE;MACN,OAAO,EAAE,CAAC;;IAEZ;MACE,IAAI,EAAE;MACN,OAAO,EAAE;;IAEX;MACE,IAAI,EAAE;MACN,SAAS,EAAEC,+BAAoB;;IAEjC;MACE,IAAI;MACJ,OAAO,EAAE,EAAE;;IAEb;MACE;MACA,OAAO,EAAE,EAAE;;;OAGV,CAAC;gBACIC;UACF;IACN;;MAEE,EAAE,CAAC,CAAC,EAAE;MACN,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC;;IAE9B,MAAM,eAAe,IAAI,QAAQ;MAC/B,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;;MAEpC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK;QACtB,IAAI;UACF,GAAG,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;OAIhD,CAAC,CAAC;MACH,OAAO,GAAG;MACV;oBACc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE;UACjC,CAAC,IAAI,CAAC,KAAK,EAAE;QACf,IAAI,CAAC;;;;OAIN;;;OAGA;MACD,OAAO,IAAI,CAAC;;;MAGZ,IAAI,EAAE,CAAC;YACD,QAAQ;;eAEL,CAAC;QACR,CAAC;YACG,IAAI,GAAG,EAAE,CAAC;MAChB;MACA,IAAI,KAAK;;;QAGP,IAAI,GAAG,CAAC;QACR,MAAM,IAAI,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC;QACxD,IAAI,QAAQ,QAAQ,CAAC,MAAM,IAAI,EAAE;;SAEhC;QACD,IAAI,KAAK;UACP,MAAM,QAAQ,GAAG;UACjB,IAAI,CAAC,KAAK,WAAW,IAAI,EAAE,QAAQ,EAAE;;UAErC,OAAO;SACR;;eAEM,QAAQ,CAAC;UACd,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;;;cAGZ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;UAChB,KAAK,GAAG,KAAK,CAAC,MAAM;UACpB,IAAI,GAAG,EAAE,CAAC;;;aAGP;;;oBAGO;aACP;;;;;;;;"}
|
|
@@ -4,33 +4,35 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
|
|
7
|
-
const _hoisted_1 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "el-descriptions__header"
|
|
10
|
-
};
|
|
11
|
-
const _hoisted_2 = { class: "el-descriptions__title" };
|
|
12
|
-
const _hoisted_3 = { class: "el-descriptions__extra" };
|
|
13
|
-
const _hoisted_4 = { class: "el-descriptions__body" };
|
|
14
7
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15
8
|
const _component_el_descriptions_row = vue.resolveComponent("el-descriptions-row");
|
|
16
9
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
17
10
|
class: vue.normalizeClass(_ctx.descriptionKls)
|
|
18
11
|
}, [
|
|
19
|
-
_ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div",
|
|
20
|
-
|
|
12
|
+
_ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: vue.normalizeClass(_ctx.ns.e("header"))
|
|
15
|
+
}, [
|
|
16
|
+
vue.createElementVNode("div", {
|
|
17
|
+
class: vue.normalizeClass(_ctx.ns.e("title"))
|
|
18
|
+
}, [
|
|
21
19
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
22
20
|
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
23
21
|
])
|
|
24
|
-
]),
|
|
25
|
-
vue.createElementVNode("div",
|
|
22
|
+
], 2),
|
|
23
|
+
vue.createElementVNode("div", {
|
|
24
|
+
class: vue.normalizeClass(_ctx.ns.e("extra"))
|
|
25
|
+
}, [
|
|
26
26
|
vue.renderSlot(_ctx.$slots, "extra", {}, () => [
|
|
27
27
|
vue.createTextVNode(vue.toDisplayString(_ctx.extra), 1)
|
|
28
28
|
])
|
|
29
|
-
])
|
|
30
|
-
])) : vue.createCommentVNode("v-if", true),
|
|
31
|
-
vue.createElementVNode("div",
|
|
29
|
+
], 2)
|
|
30
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
31
|
+
vue.createElementVNode("div", {
|
|
32
|
+
class: vue.normalizeClass(_ctx.ns.e("body"))
|
|
33
|
+
}, [
|
|
32
34
|
vue.createElementVNode("table", {
|
|
33
|
-
class: vue.normalizeClass(["
|
|
35
|
+
class: vue.normalizeClass([_ctx.ns.e("table"), _ctx.ns.is("bordered", _ctx.border)])
|
|
34
36
|
}, [
|
|
35
37
|
vue.createElementVNode("tbody", null, [
|
|
36
38
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.getRows(), (row, index) => {
|
|
@@ -41,7 +43,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
41
43
|
}), 128))
|
|
42
44
|
])
|
|
43
45
|
], 2)
|
|
44
|
-
])
|
|
46
|
+
], 2)
|
|
45
47
|
], 2);
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue_type_template_id_788d3854_lang.js","sources":["../../../../../../packages/components/descriptions/src/index.vue?vue&type=template&id=788d3854&lang.js"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n class=\"
|
|
1
|
+
{"version":3,"file":"index.vue_vue_type_template_id_788d3854_lang.js","sources":["../../../../../../packages/components/descriptions/src/index.vue?vue&type=template&id=788d3854&lang.js"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n :class=\"ns.e('header')\"\n >\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div :class=\"ns.e('extra')\">\n <slot name=\"extra\">{{ extra }}</slot>\n </div>\n </div>\n\n <div :class=\"ns.e('body')\">\n <table :class=\"[ns.e('table'), ns.is('bordered', border)]\">\n <tbody>\n <template v-for=\"(row, index) in getRows()\" :key=\"index\">\n <el-descriptions-row :row=\"row\" />\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, provide } from 'vue'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { useSize, useNamespace } from '@element-plus/hooks'\nimport DescriptionsRow from './descriptions-row.vue'\nimport { elDescriptionsKey } from './token'\n\nimport type { PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\n\nexport default defineComponent({\n name: 'ElDescriptions',\n components: {\n [DescriptionsRow.name]: DescriptionsRow,\n },\n props: {\n border: {\n type: Boolean,\n default: false,\n },\n column: {\n type: Number,\n default: 3,\n },\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n title: {\n type: String,\n default: '',\n },\n extra: {\n type: String,\n default: '',\n },\n },\n setup(props, { slots }) {\n provide(elDescriptionsKey, props)\n\n const descriptionsSize = useSize()\n const ns = useNamespace('descriptions')\n\n const descriptionKls = computed(() => [\n ns.b(),\n ns.is(ns.m(descriptionsSize.value), !!descriptionsSize.value),\n ])\n\n const flattedChildren = (children) => {\n const temp = Array.isArray(children) ? children : [children]\n const res = []\n temp.forEach((child) => {\n if (Array.isArray(child.children)) {\n res.push(...flattedChildren(child.children))\n } else {\n res.push(child)\n }\n })\n return res\n }\n\n const filledNode = (node, span, count, isLast = false) => {\n if (!node.props) {\n node.props = {}\n }\n if (span > count) {\n node.props.span = count\n }\n if (isLast) {\n // set the last span\n node.props.span = span\n }\n return node\n }\n\n const getRows = () => {\n const children = flattedChildren(slots.default?.()).filter(\n (node) => node?.type?.name === 'ElDescriptionsItem'\n )\n const rows = []\n let temp = []\n let count = props.column\n let totalSpan = 0 // all spans number of item\n\n children.forEach((node, index) => {\n const span = node.props?.span || 1\n\n if (index < children.length - 1) {\n totalSpan += span > count ? count : span\n }\n\n if (index === children.length - 1) {\n // calculate the last item span\n const lastSpan = props.column - (totalSpan % props.column)\n temp.push(filledNode(node, lastSpan, count, true))\n rows.push(temp)\n return\n }\n\n if (span < count) {\n count -= span\n temp.push(node)\n } else {\n temp.push(filledNode(node, span, count))\n rows.push(temp)\n count = props.column\n temp = []\n }\n })\n\n return rows\n }\n\n return {\n descriptionKls,\n getRows,\n ns,\n }\n },\n})\n</script>\n"],"names":["_normalizeClass"],"mappings":";;;;;;;;;;;IACQ,KAAK;;oCAEiB;;;eAClBA,4BAAI,CAAC;;;iDAEK,CAAC;;;;;;;iDAGD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n class=\"el-slider__button-wrapper\"\n :class=\"{ hover: hovering, dragging: dragging }\"\n :style=\"wrapperStyle\"\n tabindex=\"0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @touchstart=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown.left=\"onLeftKeyDown\"\n @keydown.right=\"onRightKeyDown\"\n @keydown.down.prevent=\"onLeftKeyDown\"\n @keydown.up.prevent=\"onRightKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n v-model=\"tooltipVisible\"\n placement=\"top\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n
|
|
1
|
+
{"version":3,"file":"button.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n class=\"el-slider__button-wrapper\"\n :class=\"{ hover: hovering, dragging: dragging }\"\n :style=\"wrapperStyle\"\n tabindex=\"0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @touchstart=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown.left=\"onLeftKeyDown\"\n @keydown.right=\"onRightKeyDown\"\n @keydown.down.prevent=\"onLeftKeyDown\"\n @keydown.up.prevent=\"onRightKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n v-model:visible=\"tooltipVisible\"\n placement=\"top\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n persistent\n >\n <template #content>\n <span>{{ formatValue }}</span>\n </template>\n <div\n class=\"el-slider__button\"\n :class=\"{ hover: hovering, dragging: dragging }\"\n ></div>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, reactive, toRefs } from 'vue'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { useSliderButton } from './useSliderButton'\n\nexport default defineComponent({\n name: 'ElSliderButton',\n\n components: {\n ElTooltip,\n },\n\n props: {\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: {\n type: Boolean,\n default: false,\n },\n tooltipClass: {\n type: String,\n default: '',\n },\n },\n\n emits: [UPDATE_MODEL_EVENT],\n\n setup(props, { emit }) {\n const initData = reactive({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue,\n })\n\n const {\n tooltip,\n showTooltip,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onLeftKeyDown,\n onRightKeyDown,\n setPosition,\n } = useSliderButton(props, initData, emit)\n\n const { hovering, dragging } = toRefs(initData)\n\n return {\n tooltip,\n tooltipVisible,\n showTooltip,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onLeftKeyDown,\n onRightKeyDown,\n setPosition,\n\n hovering,\n dragging,\n }\n },\n})\n</script>\n"],"names":["defineComponent","ElTooltip","UPDATE_MODEL_EVENT","useSliderButton"],"mappings":";;;;;;;;;AA0CA,aAAeA,mBAAe;;AAE9B,EAAE,UAAU;eACRC,eAAS;;EAEX,KAAK,EAAE;IACL;;;KAGC;IACD,QAAQ,EAAE;MACR,IAAI,EAAE;MACN,OAAO,EAAE;KACV;IACD;MACE,IAAI,EAAE,MAAM;MACZ,OAAO,EAAE,EAAE;KACZ;;OAEE,EAAE,CAACC;OACH,CAAC,KAAK,EAAE,EAAE;IACb;;;MAGE,OAAO,EAAE,KAAK;;MAEd,WAAW;MACX,MAAM,EAAE,CAAC;MACT,QAAQ,EAAE,CAAC;MACX,aAAa,EAAE;MACf,WAAW,EAAE,CAAC;MACd,QAAQ;MACR,CAAC;UACG;MACJ,OAAO;MACP,WAAW;MACX,cAAc;MACd,YAAY;;;MAGZ;MACA;MACA;MACA,cAAc;MACd,WAAW;QACTC;UACE,EAAE,QAAQ,EAAE;WACX;MACL,OAAO;MACP;MACA,WAAW;MACX;MACA,WAAW;;MAEX,gBAAgB;;MAEhB;MACA;MACA,WAAW;MACX,QAAQ;MACR,QAAQ;MACR;;;;;;"}
|