@element-plus/nightly 0.0.20231123 → 0.0.20231125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- 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/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +131 -18
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +18 -131
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +11 -55
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +55 -11
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +17 -103
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +103 -17
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +31 -119
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +119 -31
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/index.mjs +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +131 -19
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +19 -131
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +11 -55
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +55 -11
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +18 -103
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +103 -18
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +32 -119
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +119 -32
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/index.js +5 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,136 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { calendarProps, calendarEmits } from './calendar.mjs';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { isArray, isDate } from '@vue/shared';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { UPDATE_MODEL_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
setup(__props, { expose, emit }) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const ns = useNamespace("calendar");
|
|
22
|
-
const {
|
|
23
|
-
calculateValidatedDateRange,
|
|
24
|
-
date,
|
|
25
|
-
pickDay,
|
|
26
|
-
realSelectedDay,
|
|
27
|
-
selectDate,
|
|
28
|
-
validatedRange
|
|
29
|
-
} = useCalendar(props, emit, COMPONENT_NAME);
|
|
30
|
-
const { t } = useLocale();
|
|
31
|
-
const i18nDate = computed(() => {
|
|
32
|
-
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
33
|
-
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
34
|
-
});
|
|
35
|
-
expose({
|
|
36
|
-
selectedDay: realSelectedDay,
|
|
37
|
-
pickDay,
|
|
38
|
-
selectDate,
|
|
39
|
-
calculateValidatedDateRange
|
|
40
|
-
});
|
|
41
|
-
return (_ctx, _cache) => {
|
|
42
|
-
return openBlock(), createElementBlock("div", {
|
|
43
|
-
class: normalizeClass(unref(ns).b())
|
|
44
|
-
}, [
|
|
45
|
-
createElementVNode("div", {
|
|
46
|
-
class: normalizeClass(unref(ns).e("header"))
|
|
47
|
-
}, [
|
|
48
|
-
renderSlot(_ctx.$slots, "header", { date: unref(i18nDate) }, () => [
|
|
49
|
-
createElementVNode("div", {
|
|
50
|
-
class: normalizeClass(unref(ns).e("title"))
|
|
51
|
-
}, toDisplayString(unref(i18nDate)), 3),
|
|
52
|
-
unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: normalizeClass(unref(ns).e("button-group"))
|
|
55
|
-
}, [
|
|
56
|
-
createVNode(unref(ElButtonGroup), null, {
|
|
57
|
-
default: withCtx(() => [
|
|
58
|
-
createVNode(unref(ElButton), {
|
|
59
|
-
size: "small",
|
|
60
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(selectDate)("prev-month"))
|
|
61
|
-
}, {
|
|
62
|
-
default: withCtx(() => [
|
|
63
|
-
createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)
|
|
64
|
-
]),
|
|
65
|
-
_: 1
|
|
66
|
-
}),
|
|
67
|
-
createVNode(unref(ElButton), {
|
|
68
|
-
size: "small",
|
|
69
|
-
onClick: _cache[1] || (_cache[1] = ($event) => unref(selectDate)("today"))
|
|
70
|
-
}, {
|
|
71
|
-
default: withCtx(() => [
|
|
72
|
-
createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)
|
|
73
|
-
]),
|
|
74
|
-
_: 1
|
|
75
|
-
}),
|
|
76
|
-
createVNode(unref(ElButton), {
|
|
77
|
-
size: "small",
|
|
78
|
-
onClick: _cache[2] || (_cache[2] = ($event) => unref(selectDate)("next-month"))
|
|
79
|
-
}, {
|
|
80
|
-
default: withCtx(() => [
|
|
81
|
-
createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)
|
|
82
|
-
]),
|
|
83
|
-
_: 1
|
|
84
|
-
})
|
|
85
|
-
]),
|
|
86
|
-
_: 1
|
|
87
|
-
})
|
|
88
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
89
|
-
])
|
|
90
|
-
], 2),
|
|
91
|
-
unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
|
|
92
|
-
key: 0,
|
|
93
|
-
class: normalizeClass(unref(ns).e("body"))
|
|
94
|
-
}, [
|
|
95
|
-
createVNode(DateTable, {
|
|
96
|
-
date: unref(date),
|
|
97
|
-
"selected-day": unref(realSelectedDay),
|
|
98
|
-
onPick: unref(pickDay)
|
|
99
|
-
}, createSlots({ _: 2 }, [
|
|
100
|
-
_ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
|
|
101
|
-
name: "date-cell",
|
|
102
|
-
fn: withCtx((data) => [
|
|
103
|
-
_ctx.$slots["date-cell"] ? renderSlot(_ctx.$slots, "date-cell", normalizeProps(mergeProps({ key: 0 }, data))) : renderSlot(_ctx.$slots, "dateCell", normalizeProps(mergeProps({ key: 1 }, data)))
|
|
104
|
-
])
|
|
105
|
-
} : void 0
|
|
106
|
-
]), 1032, ["date", "selected-day", "onPick"])
|
|
107
|
-
], 2)) : (openBlock(), createElementBlock("div", {
|
|
108
|
-
key: 1,
|
|
109
|
-
class: normalizeClass(unref(ns).e("body"))
|
|
110
|
-
}, [
|
|
111
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
|
|
112
|
-
return openBlock(), createBlock(DateTable, {
|
|
113
|
-
key: index,
|
|
114
|
-
date: range_[0],
|
|
115
|
-
"selected-day": unref(realSelectedDay),
|
|
116
|
-
range: range_,
|
|
117
|
-
"hide-header": index !== 0,
|
|
118
|
-
onPick: unref(pickDay)
|
|
119
|
-
}, createSlots({ _: 2 }, [
|
|
120
|
-
_ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
|
|
121
|
-
name: "date-cell",
|
|
122
|
-
fn: withCtx((data) => [
|
|
123
|
-
_ctx.$slots["date-cell"] ? renderSlot(_ctx.$slots, "date-cell", normalizeProps(mergeProps({ key: 0 }, data))) : renderSlot(_ctx.$slots, "dateCell", normalizeProps(mergeProps({ key: 1 }, data)))
|
|
124
|
-
])
|
|
125
|
-
} : void 0
|
|
126
|
-
]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
|
|
127
|
-
}), 128))
|
|
128
|
-
], 2))
|
|
129
|
-
], 2);
|
|
130
|
-
};
|
|
7
|
+
const isValidRange = (range) => isArray(range) && range.length === 2 && range.every((item) => isDate(item));
|
|
8
|
+
const calendarProps = buildProps({
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: Date
|
|
11
|
+
},
|
|
12
|
+
range: {
|
|
13
|
+
type: definePropType(Array),
|
|
14
|
+
validator: isValidRange
|
|
131
15
|
}
|
|
132
16
|
});
|
|
133
|
-
|
|
17
|
+
const calendarEmits = {
|
|
18
|
+
[UPDATE_MODEL_EVENT]: (value) => isDate(value),
|
|
19
|
+
[INPUT_EVENT]: (value) => isDate(value)
|
|
20
|
+
};
|
|
134
21
|
|
|
135
|
-
export {
|
|
22
|
+
export { calendarEmits, calendarProps };
|
|
136
23
|
//# sourceMappingURL=calendar2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar2.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.
|
|
1
|
+
{"version":3,"file":"calendar2.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isDate,\n} from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nconst isValidRange = (range: unknown): range is [Date, Date] =>\n isArray(range) && range.length === 2 && range.every((item) => isDate(item))\n\nexport const calendarProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Date,\n },\n /**\n * @description time range, including start time and end time.\n * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.\n */\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: isValidRange,\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => isDate(value),\n [INPUT_EVENT]: (value: Date) => isDate(value),\n}\nexport type CalendarEmits = typeof calendarEmits\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAChG,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,SAAS,EAAE,YAAY;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC;AAChD,EAAE,CAAC,WAAW,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC;AACzC;;;;"}
|
|
@@ -9,7 +9,7 @@ import { dropdownItemProps, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY as COLLECTION
|
|
|
9
9
|
import { DROPDOWN_INJECTION_KEY } from './tokens.mjs';
|
|
10
10
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
11
11
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
-
import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-
|
|
12
|
+
import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group.mjs';
|
|
13
13
|
import { ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from '../../roving-focus-group/src/tokens.mjs';
|
|
14
14
|
import { composeRefs } from '../../../utils/vue/refs.mjs';
|
|
15
15
|
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
@@ -11,7 +11,7 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
|
11
11
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
12
|
import { FOCUS_TRAP_INJECTION_KEY } from '../../focus-trap/src/tokens.mjs';
|
|
13
13
|
import { ROVING_FOCUS_GROUP_INJECTION_KEY } from '../../roving-focus-group/src/tokens.mjs';
|
|
14
|
-
import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-
|
|
14
|
+
import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group.mjs';
|
|
15
15
|
import { composeRefs } from '../../../utils/vue/refs.mjs';
|
|
16
16
|
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
17
17
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
@@ -13,7 +13,7 @@ import '../../../hooks/index.mjs';
|
|
|
13
13
|
import { ElCollection, dropdownProps } from './dropdown.mjs';
|
|
14
14
|
import { DROPDOWN_INJECTION_KEY } from './tokens.mjs';
|
|
15
15
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
16
|
-
import ElRovingFocusGroup from '../../roving-focus-group/src/roving-focus-
|
|
16
|
+
import ElRovingFocusGroup from '../../roving-focus-group/src/roving-focus-group2.mjs';
|
|
17
17
|
import { OnlyChild } from '../../slot/src/only-child.mjs';
|
|
18
18
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
19
19
|
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Empty from './src/
|
|
3
|
-
export { emptyProps } from './src/
|
|
2
|
+
import Empty from './src/empty2.mjs';
|
|
3
|
+
export { emptyProps } from './src/empty.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElEmpty = withInstall(Empty);
|
|
@@ -1,61 +1,17 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
-
import '../../../hooks/index.mjs';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import { emptyProps } from './empty2.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
10
3
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const props = __props;
|
|
21
|
-
const { t } = useLocale();
|
|
22
|
-
const ns = useNamespace("empty");
|
|
23
|
-
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
|
24
|
-
const imageStyle = computed(() => ({
|
|
25
|
-
width: addUnit(props.imageSize)
|
|
26
|
-
}));
|
|
27
|
-
return (_ctx, _cache) => {
|
|
28
|
-
return openBlock(), createElementBlock("div", {
|
|
29
|
-
class: normalizeClass(unref(ns).b())
|
|
30
|
-
}, [
|
|
31
|
-
createElementVNode("div", {
|
|
32
|
-
class: normalizeClass(unref(ns).e("image")),
|
|
33
|
-
style: normalizeStyle(unref(imageStyle))
|
|
34
|
-
}, [
|
|
35
|
-
_ctx.image ? (openBlock(), createElementBlock("img", {
|
|
36
|
-
key: 0,
|
|
37
|
-
src: _ctx.image,
|
|
38
|
-
ondragstart: "return false"
|
|
39
|
-
}, null, 8, _hoisted_1)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
|
40
|
-
createVNode(ImgEmpty)
|
|
41
|
-
])
|
|
42
|
-
], 6),
|
|
43
|
-
createElementVNode("div", {
|
|
44
|
-
class: normalizeClass(unref(ns).e("description"))
|
|
45
|
-
}, [
|
|
46
|
-
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(unref(emptyDescription)), 1))
|
|
47
|
-
], 2),
|
|
48
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
49
|
-
key: 0,
|
|
50
|
-
class: normalizeClass(unref(ns).e("bottom"))
|
|
51
|
-
}, [
|
|
52
|
-
renderSlot(_ctx.$slots, "default")
|
|
53
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
54
|
-
], 2);
|
|
55
|
-
};
|
|
4
|
+
const emptyProps = buildProps({
|
|
5
|
+
image: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
imageSize: Number,
|
|
10
|
+
description: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
56
13
|
}
|
|
57
14
|
});
|
|
58
|
-
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/empty/src/empty.vue"]]);
|
|
59
15
|
|
|
60
|
-
export {
|
|
16
|
+
export { emptyProps };
|
|
61
17
|
//# sourceMappingURL=empty.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
|
1
|
+
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,17 +1,61 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
4
|
+
import ImgEmpty from './img-empty.mjs';
|
|
5
|
+
import { emptyProps } from './empty.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
3
10
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const _hoisted_1 = ["src"];
|
|
12
|
+
const _hoisted_2 = { key: 1 };
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: "ElEmpty"
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: emptyProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const { t } = useLocale();
|
|
22
|
+
const ns = useNamespace("empty");
|
|
23
|
+
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
|
24
|
+
const imageStyle = computed(() => ({
|
|
25
|
+
width: addUnit(props.imageSize)
|
|
26
|
+
}));
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createElementBlock("div", {
|
|
29
|
+
class: normalizeClass(unref(ns).b())
|
|
30
|
+
}, [
|
|
31
|
+
createElementVNode("div", {
|
|
32
|
+
class: normalizeClass(unref(ns).e("image")),
|
|
33
|
+
style: normalizeStyle(unref(imageStyle))
|
|
34
|
+
}, [
|
|
35
|
+
_ctx.image ? (openBlock(), createElementBlock("img", {
|
|
36
|
+
key: 0,
|
|
37
|
+
src: _ctx.image,
|
|
38
|
+
ondragstart: "return false"
|
|
39
|
+
}, null, 8, _hoisted_1)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
|
40
|
+
createVNode(ImgEmpty)
|
|
41
|
+
])
|
|
42
|
+
], 6),
|
|
43
|
+
createElementVNode("div", {
|
|
44
|
+
class: normalizeClass(unref(ns).e("description"))
|
|
45
|
+
}, [
|
|
46
|
+
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(unref(emptyDescription)), 1))
|
|
47
|
+
], 2),
|
|
48
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: normalizeClass(unref(ns).e("bottom"))
|
|
51
|
+
}, [
|
|
52
|
+
renderSlot(_ctx.$slots, "default")
|
|
53
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
54
|
+
], 2);
|
|
55
|
+
};
|
|
13
56
|
}
|
|
14
57
|
});
|
|
58
|
+
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/empty/src/empty.vue"]]);
|
|
15
59
|
|
|
16
|
-
export {
|
|
60
|
+
export { Empty as default };
|
|
17
61
|
//# sourceMappingURL=empty2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
|
1
|
+
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,mBAAmB,QACvB,CAAA,MAAM,MAAM,WAAe,IAAA,CAAA,CAAE,oBAAoB,CACnD,CAAA,CAAA;AACA,IAAM,MAAA,UAAA,GAAa,SAAwB,OAAO;AAAA,MAChD,KAAA,EAAO,OAAQ,CAAA,KAAA,CAAM,SAAS,CAAA;AAAA,KAC9B,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -87,7 +87,7 @@ export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
|
|
|
87
87
|
export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
|
|
88
88
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
|
|
89
89
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
|
90
|
-
export { calendarEmits, calendarProps } from './calendar/src/
|
|
90
|
+
export { calendarEmits, calendarProps } from './calendar/src/calendar2.mjs';
|
|
91
91
|
export { cardProps } from './card/src/card.mjs';
|
|
92
92
|
export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
|
|
93
93
|
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
|
|
@@ -119,7 +119,7 @@ export { dividerProps } from './divider/src/divider.mjs';
|
|
|
119
119
|
export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
|
|
120
120
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
|
|
121
121
|
export { DROPDOWN_INJECTION_KEY } from './dropdown/src/tokens.mjs';
|
|
122
|
-
export { emptyProps } from './empty/src/
|
|
122
|
+
export { emptyProps } from './empty/src/empty.mjs';
|
|
123
123
|
export { formEmits, formProps } from './form/src/form.mjs';
|
|
124
124
|
export { formItemProps, formItemValidateStates } from './form/src/form-item.mjs';
|
|
125
125
|
export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
|
|
@@ -136,17 +136,17 @@ export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
|
|
|
136
136
|
export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
|
|
137
137
|
export { subMenuProps } from './menu/src/sub-menu.mjs';
|
|
138
138
|
export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
|
|
139
|
-
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-
|
|
139
|
+
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header.mjs';
|
|
140
140
|
export { paginationEmits, paginationProps } from './pagination/src/pagination.mjs';
|
|
141
141
|
export { elPaginationKey } from './pagination/src/constants.mjs';
|
|
142
142
|
export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
|
|
143
143
|
export { Effect, popperProps, roleTypes, usePopperProps } from './popper/src/popper.mjs';
|
|
144
|
-
export { popperTriggerProps, usePopperTriggerProps } from './popper/src/
|
|
144
|
+
export { popperTriggerProps, usePopperTriggerProps } from './popper/src/trigger.mjs';
|
|
145
145
|
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './popper/src/content.mjs';
|
|
146
146
|
export { popperArrowProps, usePopperArrowProps } from './popper/src/arrow.mjs';
|
|
147
147
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './popper/src/constants.mjs';
|
|
148
148
|
export { default as ElPopperArrow } from './popper/src/arrow2.mjs';
|
|
149
|
-
export { default as ElPopperTrigger } from './popper/src/
|
|
149
|
+
export { default as ElPopperTrigger } from './popper/src/trigger2.mjs';
|
|
150
150
|
export { default as ElPopperContent } from './popper/src/content2.mjs';
|
|
151
151
|
export { progressProps } from './progress/src/progress.mjs';
|
|
152
152
|
export { radioEmits, radioProps, radioPropsBase } from './radio/src/radio.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import PageHeader from './src/page-
|
|
3
|
-
export { pageHeaderEmits, pageHeaderProps } from './src/page-
|
|
2
|
+
import PageHeader from './src/page-header2.mjs';
|
|
3
|
+
export { pageHeaderEmits, pageHeaderProps } from './src/page-header.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElPageHeader = withInstall(PageHeader);
|
|
@@ -1,108 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '../../../
|
|
5
|
-
import { pageHeaderProps, pageHeaderEmits } from './page-header2.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { Back } from '@element-plus/icons-vue';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
9
5
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const slots = useSlots();
|
|
20
|
-
const { t } = useLocale();
|
|
21
|
-
const ns = useNamespace("page-header");
|
|
22
|
-
const kls = computed(() => {
|
|
23
|
-
return [
|
|
24
|
-
ns.b(),
|
|
25
|
-
{
|
|
26
|
-
[ns.m("has-breadcrumb")]: !!slots.breadcrumb,
|
|
27
|
-
[ns.m("has-extra")]: !!slots.extra,
|
|
28
|
-
[ns.is("contentful")]: !!slots.default
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
});
|
|
32
|
-
function handleClick() {
|
|
33
|
-
emit("back");
|
|
34
|
-
}
|
|
35
|
-
return (_ctx, _cache) => {
|
|
36
|
-
return openBlock(), createElementBlock("div", {
|
|
37
|
-
class: normalizeClass(unref(kls))
|
|
38
|
-
}, [
|
|
39
|
-
_ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
|
|
40
|
-
key: 0,
|
|
41
|
-
class: normalizeClass(unref(ns).e("breadcrumb"))
|
|
42
|
-
}, [
|
|
43
|
-
renderSlot(_ctx.$slots, "breadcrumb")
|
|
44
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
45
|
-
createElementVNode("div", {
|
|
46
|
-
class: normalizeClass(unref(ns).e("header"))
|
|
47
|
-
}, [
|
|
48
|
-
createElementVNode("div", {
|
|
49
|
-
class: normalizeClass(unref(ns).e("left"))
|
|
50
|
-
}, [
|
|
51
|
-
createElementVNode("div", {
|
|
52
|
-
class: normalizeClass(unref(ns).e("back")),
|
|
53
|
-
role: "button",
|
|
54
|
-
tabindex: "0",
|
|
55
|
-
onClick: handleClick
|
|
56
|
-
}, [
|
|
57
|
-
_ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
|
|
58
|
-
key: 0,
|
|
59
|
-
"aria-label": _ctx.title || unref(t)("el.pageHeader.title"),
|
|
60
|
-
class: normalizeClass(unref(ns).e("icon"))
|
|
61
|
-
}, [
|
|
62
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
63
|
-
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
})) : createCommentVNode("v-if", true)
|
|
69
|
-
])
|
|
70
|
-
], 10, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
71
|
-
createElementVNode("div", {
|
|
72
|
-
class: normalizeClass(unref(ns).e("title"))
|
|
73
|
-
}, [
|
|
74
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
75
|
-
createTextVNode(toDisplayString(_ctx.title || unref(t)("el.pageHeader.title")), 1)
|
|
76
|
-
])
|
|
77
|
-
], 2)
|
|
78
|
-
], 2),
|
|
79
|
-
createVNode(unref(ElDivider), { direction: "vertical" }),
|
|
80
|
-
createElementVNode("div", {
|
|
81
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
82
|
-
}, [
|
|
83
|
-
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
84
|
-
createTextVNode(toDisplayString(_ctx.content), 1)
|
|
85
|
-
])
|
|
86
|
-
], 2)
|
|
87
|
-
], 2),
|
|
88
|
-
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
89
|
-
key: 0,
|
|
90
|
-
class: normalizeClass(unref(ns).e("extra"))
|
|
91
|
-
}, [
|
|
92
|
-
renderSlot(_ctx.$slots, "extra")
|
|
93
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
94
|
-
], 2),
|
|
95
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
96
|
-
key: 1,
|
|
97
|
-
class: normalizeClass(unref(ns).e("main"))
|
|
98
|
-
}, [
|
|
99
|
-
renderSlot(_ctx.$slots, "default")
|
|
100
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
101
|
-
], 2);
|
|
102
|
-
};
|
|
6
|
+
const pageHeaderProps = buildProps({
|
|
7
|
+
icon: {
|
|
8
|
+
type: iconPropType,
|
|
9
|
+
default: () => Back
|
|
10
|
+
},
|
|
11
|
+
title: String,
|
|
12
|
+
content: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
103
15
|
}
|
|
104
16
|
});
|
|
105
|
-
|
|
17
|
+
const pageHeaderEmits = {
|
|
18
|
+
back: () => true
|
|
19
|
+
};
|
|
106
20
|
|
|
107
|
-
export {
|
|
21
|
+
export { pageHeaderEmits, pageHeaderProps };
|
|
108
22
|
//# sourceMappingURL=page-header.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.mjs","sources":["../../../../../../packages/components/page-header/src/page-header.
|
|
1
|
+
{"version":3,"file":"page-header.mjs","sources":["../../../../../../packages/components/page-header/src/page-header.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport { Back } from '@element-plus/icons-vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type PageHeader from './page-header.vue'\n\nexport const pageHeaderProps = buildProps({\n /**\n * @description icon component of page header\n */\n icon: {\n type: iconPropType,\n default: () => Back,\n },\n /**\n * @description main title of page header\n */\n title: String,\n /**\n * @description content of page header\n */\n content: {\n type: String,\n default: '',\n },\n} as const)\nexport type PageHeaderProps = ExtractPropTypes<typeof pageHeaderProps>\n\nexport const pageHeaderEmits = {\n back: () => true,\n}\nexport type PageHeaderEmits = typeof pageHeaderEmits\n\nexport type PageHeaderInstance = InstanceType<typeof PageHeader>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,MAAM,IAAI;AACvB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB;;;;"}
|