@element-plus/nightly 0.0.20231229 → 0.0.20231230
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.full.js +8 -3
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -3
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +8 -3
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/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/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -11
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +176 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -176
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/index.mjs +3 -3
- package/es/components/link/index.d.ts +4 -0
- package/es/components/link/src/link.d.ts +3 -2
- package/es/components/link/src/link.mjs +4 -0
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link.vue.d.ts +4 -0
- package/es/components/link/src/link2.mjs +2 -1
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +38 -19
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +19 -38
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +69 -23
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +23 -69
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +7 -75
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +75 -7
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/index.mjs +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -11
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +176 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -176
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/index.js +3 -3
- package/lib/components/link/index.d.ts +4 -0
- package/lib/components/link/src/link.d.ts +3 -2
- package/lib/components/link/src/link.js +4 -0
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link.vue.d.ts +4 -0
- package/lib/components/link/src/link2.js +2 -1
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +38 -19
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +19 -38
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +69 -23
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +23 -69
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +7 -75
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +75 -7
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/index.js +3 -3
- 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/web-types.json +1 -1
|
@@ -1,81 +1,13 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, inject, ref, watch, nextTick, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle } from 'vue';
|
|
2
|
-
import { useResizeObserver } from '@vueuse/core';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import '../../../
|
|
5
|
-
import {
|
|
6
|
-
import { tabBarProps } from './tab-bar2.mjs';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { throwError } from '../../../utils/error.mjs';
|
|
9
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
-
import { capitalize } from '../../../utils/strings.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { mutable } from '../../../utils/typescript.mjs';
|
|
11
4
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
-
...__default__,
|
|
18
|
-
props: tabBarProps,
|
|
19
|
-
setup(__props, { expose }) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const instance = getCurrentInstance();
|
|
22
|
-
const rootTabs = inject(tabsRootContextKey);
|
|
23
|
-
if (!rootTabs)
|
|
24
|
-
throwError(COMPONENT_NAME, "<el-tabs><el-tab-bar /></el-tabs>");
|
|
25
|
-
const ns = useNamespace("tabs");
|
|
26
|
-
const barRef = ref();
|
|
27
|
-
const barStyle = ref();
|
|
28
|
-
const getBarStyle = () => {
|
|
29
|
-
let offset = 0;
|
|
30
|
-
let tabSize = 0;
|
|
31
|
-
const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
|
|
32
|
-
const sizeDir = sizeName === "width" ? "x" : "y";
|
|
33
|
-
const position = sizeDir === "x" ? "left" : "top";
|
|
34
|
-
props.tabs.every((tab) => {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
const $el = (_b = (_a = instance.parent) == null ? void 0 : _a.refs) == null ? void 0 : _b[`tab-${tab.uid}`];
|
|
37
|
-
if (!$el)
|
|
38
|
-
return false;
|
|
39
|
-
if (!tab.active) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
offset = $el[`offset${capitalize(position)}`];
|
|
43
|
-
tabSize = $el[`client${capitalize(sizeName)}`];
|
|
44
|
-
const tabStyles = window.getComputedStyle($el);
|
|
45
|
-
if (sizeName === "width") {
|
|
46
|
-
if (props.tabs.length > 1) {
|
|
47
|
-
tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
|
|
48
|
-
}
|
|
49
|
-
offset += Number.parseFloat(tabStyles.paddingLeft);
|
|
50
|
-
}
|
|
51
|
-
return false;
|
|
52
|
-
});
|
|
53
|
-
return {
|
|
54
|
-
[sizeName]: `${tabSize}px`,
|
|
55
|
-
transform: `translate${capitalize(sizeDir)}(${offset}px)`
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
const update = () => barStyle.value = getBarStyle();
|
|
59
|
-
watch(() => props.tabs, async () => {
|
|
60
|
-
await nextTick();
|
|
61
|
-
update();
|
|
62
|
-
}, { immediate: true });
|
|
63
|
-
useResizeObserver(barRef, () => update());
|
|
64
|
-
expose({
|
|
65
|
-
ref: barRef,
|
|
66
|
-
update
|
|
67
|
-
});
|
|
68
|
-
return (_ctx, _cache) => {
|
|
69
|
-
return openBlock(), createElementBlock("div", {
|
|
70
|
-
ref_key: "barRef",
|
|
71
|
-
ref: barRef,
|
|
72
|
-
class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]),
|
|
73
|
-
style: normalizeStyle(barStyle.value)
|
|
74
|
-
}, null, 6);
|
|
75
|
-
};
|
|
5
|
+
const tabBarProps = buildProps({
|
|
6
|
+
tabs: {
|
|
7
|
+
type: definePropType(Array),
|
|
8
|
+
default: () => mutable([])
|
|
76
9
|
}
|
|
77
10
|
});
|
|
78
|
-
var TabBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tab-bar.vue"]]);
|
|
79
11
|
|
|
80
|
-
export {
|
|
12
|
+
export { tabBarProps };
|
|
81
13
|
//# sourceMappingURL=tab-bar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar.mjs","sources":["../../../../../../packages/components/tabs/src/tab-bar.
|
|
1
|
+
{"version":3,"file":"tab-bar.mjs","sources":["../../../../../../packages/components/tabs/src/tab-bar.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { TabsPaneContext } from './constants'\nimport type TabBar from './tab-bar.vue'\n\nexport const tabBarProps = buildProps({\n tabs: {\n type: definePropType<TabsPaneContext[]>(Array),\n default: () => mutable([] as const),\n },\n} as const)\n\nexport type TabBarProps = ExtractPropTypes<typeof tabBarProps>\nexport type TabBarInstance = InstanceType<typeof TabBar>\n"],"names":[],"mappings":";;;;AACY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,13 +1,81 @@
|
|
|
1
|
+
import { defineComponent, getCurrentInstance, inject, ref, watch, nextTick, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle } from 'vue';
|
|
2
|
+
import { useResizeObserver } from '@vueuse/core';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { tabsRootContextKey } from './constants.mjs';
|
|
6
|
+
import { tabBarProps } from './tab-bar.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
9
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
+
import { capitalize } from '../../../utils/strings.mjs';
|
|
4
11
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
const COMPONENT_NAME = "ElTabBar";
|
|
13
|
+
const __default__ = defineComponent({
|
|
14
|
+
name: COMPONENT_NAME
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: tabBarProps,
|
|
19
|
+
setup(__props, { expose }) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const instance = getCurrentInstance();
|
|
22
|
+
const rootTabs = inject(tabsRootContextKey);
|
|
23
|
+
if (!rootTabs)
|
|
24
|
+
throwError(COMPONENT_NAME, "<el-tabs><el-tab-bar /></el-tabs>");
|
|
25
|
+
const ns = useNamespace("tabs");
|
|
26
|
+
const barRef = ref();
|
|
27
|
+
const barStyle = ref();
|
|
28
|
+
const getBarStyle = () => {
|
|
29
|
+
let offset = 0;
|
|
30
|
+
let tabSize = 0;
|
|
31
|
+
const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
|
|
32
|
+
const sizeDir = sizeName === "width" ? "x" : "y";
|
|
33
|
+
const position = sizeDir === "x" ? "left" : "top";
|
|
34
|
+
props.tabs.every((tab) => {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
const $el = (_b = (_a = instance.parent) == null ? void 0 : _a.refs) == null ? void 0 : _b[`tab-${tab.uid}`];
|
|
37
|
+
if (!$el)
|
|
38
|
+
return false;
|
|
39
|
+
if (!tab.active) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
offset = $el[`offset${capitalize(position)}`];
|
|
43
|
+
tabSize = $el[`client${capitalize(sizeName)}`];
|
|
44
|
+
const tabStyles = window.getComputedStyle($el);
|
|
45
|
+
if (sizeName === "width") {
|
|
46
|
+
if (props.tabs.length > 1) {
|
|
47
|
+
tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
|
|
48
|
+
}
|
|
49
|
+
offset += Number.parseFloat(tabStyles.paddingLeft);
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
[sizeName]: `${tabSize}px`,
|
|
55
|
+
transform: `translate${capitalize(sizeDir)}(${offset}px)`
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
const update = () => barStyle.value = getBarStyle();
|
|
59
|
+
watch(() => props.tabs, async () => {
|
|
60
|
+
await nextTick();
|
|
61
|
+
update();
|
|
62
|
+
}, { immediate: true });
|
|
63
|
+
useResizeObserver(barRef, () => update());
|
|
64
|
+
expose({
|
|
65
|
+
ref: barRef,
|
|
66
|
+
update
|
|
67
|
+
});
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createElementBlock("div", {
|
|
70
|
+
ref_key: "barRef",
|
|
71
|
+
ref: barRef,
|
|
72
|
+
class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]),
|
|
73
|
+
style: normalizeStyle(barStyle.value)
|
|
74
|
+
}, null, 6);
|
|
75
|
+
};
|
|
9
76
|
}
|
|
10
77
|
});
|
|
78
|
+
var TabBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tab-bar.vue"]]);
|
|
11
79
|
|
|
12
|
-
export {
|
|
80
|
+
export { TabBar as default };
|
|
13
81
|
//# sourceMappingURL=tab-bar2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-bar.
|
|
1
|
+
{"version":3,"file":"tab-bar2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-bar.vue"],"sourcesContent":["<template>\n <div\n ref=\"barRef\"\n :class=\"[ns.e('active-bar'), ns.is(rootTabs.props.tabPosition)]\"\n :style=\"barStyle\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, nextTick, ref, watch } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { capitalize, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport { tabBarProps } from './tab-bar'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElTabBar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(tabBarProps)\n\nconst instance = getCurrentInstance()!\nconst rootTabs = inject(tabsRootContextKey)\nif (!rootTabs) throwError(COMPONENT_NAME, '<el-tabs><el-tab-bar /></el-tabs>')\n\nconst ns = useNamespace('tabs')\n\nconst barRef = ref<HTMLDivElement>()\nconst barStyle = ref<CSSProperties>()\n\nconst getBarStyle = (): CSSProperties => {\n let offset = 0\n let tabSize = 0\n\n const sizeName = ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ? 'width'\n : 'height'\n const sizeDir = sizeName === 'width' ? 'x' : 'y'\n const position = sizeDir === 'x' ? 'left' : 'top'\n\n props.tabs.every((tab) => {\n const $el = instance.parent?.refs?.[`tab-${tab.uid}`] as HTMLElement\n if (!$el) return false\n\n if (!tab.active) {\n return true\n }\n\n offset = $el[`offset${capitalize(position)}`]\n tabSize = $el[`client${capitalize(sizeName)}`]\n\n const tabStyles = window.getComputedStyle($el)\n\n if (sizeName === 'width') {\n if (props.tabs.length > 1) {\n tabSize -=\n Number.parseFloat(tabStyles.paddingLeft) +\n Number.parseFloat(tabStyles.paddingRight)\n }\n offset += Number.parseFloat(tabStyles.paddingLeft)\n }\n return false\n })\n\n return {\n [sizeName]: `${tabSize}px`,\n transform: `translate${capitalize(sizeDir)}(${offset}px)`,\n }\n}\n\nconst update = () => (barStyle.value = getBarStyle())\n\nwatch(\n () => props.tabs,\n async () => {\n await nextTick()\n update()\n },\n { immediate: true }\n)\nuseResizeObserver(barRef, () => update())\n\ndefineExpose({\n /** @description tab root html element */\n ref: barRef,\n /** @description method to manually update tab bar style */\n update,\n})\n</script>\n"],"names":[],"mappings":"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"}
|
|
@@ -5,7 +5,7 @@ import '../../../constants/index.mjs';
|
|
|
5
5
|
import { ElIcon } from '../../icon/index.mjs';
|
|
6
6
|
import { ArrowLeft, ArrowRight, Close } from '@element-plus/icons-vue';
|
|
7
7
|
import '../../../hooks/index.mjs';
|
|
8
|
-
import TabBar from './tab-
|
|
8
|
+
import TabBar from './tab-bar2.mjs';
|
|
9
9
|
import { tabsRootContextKey } from './constants.mjs';
|
|
10
10
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
11
11
|
import { mutable } from '../../../utils/typescript.mjs';
|
package/es/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ export { ElBacktop } from './components/backtop/index.mjs';
|
|
|
19
19
|
export { badgeProps } from './components/badge/src/badge.mjs';
|
|
20
20
|
export { ElBadge } from './components/badge/index.mjs';
|
|
21
21
|
export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb.mjs';
|
|
22
|
-
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-
|
|
22
|
+
export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item2.mjs';
|
|
23
23
|
export { breadcrumbKey } from './components/breadcrumb/src/constants.mjs';
|
|
24
24
|
export { ElBreadcrumb, ElBreadcrumbItem } from './components/breadcrumb/index.mjs';
|
|
25
25
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './components/button/src/button.mjs';
|
|
@@ -72,7 +72,7 @@ export { dialogInjectionKey } from './components/dialog/src/constants.mjs';
|
|
|
72
72
|
export { ElDialog } from './components/dialog/index.mjs';
|
|
73
73
|
export { dividerProps } from './components/divider/src/divider.mjs';
|
|
74
74
|
export { ElDivider } from './components/divider/index.mjs';
|
|
75
|
-
export { drawerEmits, drawerProps } from './components/drawer/src/
|
|
75
|
+
export { drawerEmits, drawerProps } from './components/drawer/src/drawer2.mjs';
|
|
76
76
|
export { ElDrawer } from './components/drawer/index.mjs';
|
|
77
77
|
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './components/dropdown/src/dropdown.mjs';
|
|
78
78
|
export { DROPDOWN_INJECTION_KEY } from './components/dropdown/src/tokens.mjs';
|
|
@@ -168,7 +168,7 @@ export { tableV2Props } from './components/table-v2/src/table.mjs';
|
|
|
168
168
|
export { tableV2RowProps } from './components/table-v2/src/row.mjs';
|
|
169
169
|
export { ElAutoResizer, ElTableV2 } from './components/table-v2/index.mjs';
|
|
170
170
|
export { tabsEmits, tabsProps } from './components/tabs/src/tabs.mjs';
|
|
171
|
-
export { tabBarProps } from './components/tabs/src/tab-
|
|
171
|
+
export { tabBarProps } from './components/tabs/src/tab-bar.mjs';
|
|
172
172
|
export { tabNavEmits, tabNavProps } from './components/tabs/src/tab-nav.mjs';
|
|
173
173
|
export { tabPaneProps } from './components/tabs/src/tab-pane.mjs';
|
|
174
174
|
export { tabsRootContextKey } from './components/tabs/src/constants.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20231230";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20231230'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var breadcrumb$1 = require('./src/breadcrumb2.js');
|
|
7
|
-
var breadcrumbItem$1 = require('./src/breadcrumb-
|
|
7
|
+
var breadcrumbItem$1 = require('./src/breadcrumb-item.js');
|
|
8
8
|
var breadcrumb = require('./src/breadcrumb.js');
|
|
9
|
-
var breadcrumbItem = require('./src/breadcrumb-
|
|
9
|
+
var breadcrumbItem = require('./src/breadcrumb-item2.js');
|
|
10
10
|
var constants = require('./src/constants.js');
|
|
11
11
|
var install = require('../../utils/vue/install.js');
|
|
12
12
|
|
|
@@ -2,19 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
require('../../../hooks/index.js');
|
|
8
|
+
var constants = require('./constants.js');
|
|
9
|
+
var breadcrumbItem = require('./breadcrumb-item2.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
12
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const __default__ = vue.defineComponent({
|
|
14
|
+
name: "ElBreadcrumbItem"
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: breadcrumbItem.breadcrumbItemProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const instance = vue.getCurrentInstance();
|
|
22
|
+
const breadcrumbContext = vue.inject(constants.breadcrumbKey, void 0);
|
|
23
|
+
const ns = index.useNamespace("breadcrumb");
|
|
24
|
+
const router = instance.appContext.config.globalProperties.$router;
|
|
25
|
+
const link = vue.ref();
|
|
26
|
+
const onClick = () => {
|
|
27
|
+
if (!props.to || !router)
|
|
28
|
+
return;
|
|
29
|
+
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
30
|
+
};
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
34
|
+
class: vue.normalizeClass(vue.unref(ns).e("item"))
|
|
35
|
+
}, [
|
|
36
|
+
vue.createElementVNode("span", {
|
|
37
|
+
ref_key: "link",
|
|
38
|
+
ref: link,
|
|
39
|
+
class: vue.normalizeClass([vue.unref(ns).e("inner"), vue.unref(ns).is("link", !!_ctx.to)]),
|
|
40
|
+
role: "link",
|
|
41
|
+
onClick
|
|
42
|
+
}, [
|
|
43
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
44
|
+
], 2),
|
|
45
|
+
((_a = vue.unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: vue.normalizeClass(vue.unref(ns).e("separator"))
|
|
48
|
+
}, {
|
|
49
|
+
default: vue.withCtx(() => [
|
|
50
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(breadcrumbContext).separatorIcon)))
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
}, 8, ["class"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: vue.normalizeClass(vue.unref(ns).e("separator")),
|
|
56
|
+
role: "presentation"
|
|
57
|
+
}, vue.toDisplayString((_b = vue.unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
|
|
58
|
+
], 2);
|
|
59
|
+
};
|
|
16
60
|
}
|
|
17
61
|
});
|
|
62
|
+
var BreadcrumbItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "breadcrumb-item.vue"]]);
|
|
18
63
|
|
|
19
|
-
exports
|
|
64
|
+
exports["default"] = BreadcrumbItem;
|
|
20
65
|
//# sourceMappingURL=breadcrumb-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n @click=\"onClick\"\n >\n <slot />\n </span>\n <el-icon v-if=\"breadcrumbContext?.separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"breadcrumbContext.separatorIcon\" />\n </el-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ breadcrumbContext?.separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, ref } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { breadcrumbKey } from './constants'\nimport { breadcrumbItemProps } from './breadcrumb-item'\n\nimport type { Router } from 'vue-router'\n\ndefineOptions({\n name: 'ElBreadcrumbItem',\n})\n\nconst props = defineProps(breadcrumbItemProps)\n\nconst instance = getCurrentInstance()!\nconst breadcrumbContext = inject(breadcrumbKey, undefined)\nconst ns = useNamespace('breadcrumb')\n\nconst router = instance.appContext.config.globalProperties.$router as Router\n\nconst link = ref<HTMLSpanElement>()\n\nconst onClick = () => {\n if (!props.to || !router) return\n props.replace ? router.replace(props.to) : router.push(props.to)\n}\n</script>\n"],"names":["getCurrentInstance","inject","breadcrumbKey","useNamespace","ref"],"mappings":";;;;;;;;;;;;uCA4Bc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAWA,sBAAmB,EAAA,CAAA;AACpC,IAAM,MAAA,iBAAA,GAAoBC,UAAO,CAAAC,uBAAA,EAAe,KAAS,CAAA,CAAA,CAAA;AACzD,IAAM,MAAA,EAAA,GAAKC,mBAAa,YAAY,CAAA,CAAA;AAEpC,IAAA,MAAM,MAAS,GAAA,QAAA,CAAS,UAAW,CAAA,MAAA,CAAO,gBAAiB,CAAA,OAAA,CAAA;AAE3D,IAAA,MAAM,OAAOC,OAAqB,EAAA,CAAA;AAElC,IAAA,MAAM,UAAU,MAAM;AACpB,MAAI,IAAA,CAAC,KAAM,CAAA,EAAA,IAAM,CAAC,MAAA;AAAQ,QAAA,OAAA;AAC1B,MAAM,KAAA,CAAA,OAAA,GAAU,OAAO,OAAQ,CAAA,KAAA,CAAM,EAAE,CAAI,GAAA,MAAA,CAAO,IAAK,CAAA,KAAA,CAAM,EAAE,CAAA,CAAA;AAAA,KACjE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,64 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
require('../../../hooks/index.js');
|
|
8
|
-
var constants = require('./constants.js');
|
|
9
|
-
var breadcrumbItem = require('./breadcrumb-item.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
12
7
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const instance = vue.getCurrentInstance();
|
|
22
|
-
const breadcrumbContext = vue.inject(constants.breadcrumbKey, void 0);
|
|
23
|
-
const ns = index.useNamespace("breadcrumb");
|
|
24
|
-
const router = instance.appContext.config.globalProperties.$router;
|
|
25
|
-
const link = vue.ref();
|
|
26
|
-
const onClick = () => {
|
|
27
|
-
if (!props.to || !router)
|
|
28
|
-
return;
|
|
29
|
-
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
30
|
-
};
|
|
31
|
-
return (_ctx, _cache) => {
|
|
32
|
-
var _a, _b;
|
|
33
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
34
|
-
class: vue.normalizeClass(vue.unref(ns).e("item"))
|
|
35
|
-
}, [
|
|
36
|
-
vue.createElementVNode("span", {
|
|
37
|
-
ref_key: "link",
|
|
38
|
-
ref: link,
|
|
39
|
-
class: vue.normalizeClass([vue.unref(ns).e("inner"), vue.unref(ns).is("link", !!_ctx.to)]),
|
|
40
|
-
role: "link",
|
|
41
|
-
onClick
|
|
42
|
-
}, [
|
|
43
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
44
|
-
], 2),
|
|
45
|
-
((_a = vue.unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: vue.normalizeClass(vue.unref(ns).e("separator"))
|
|
48
|
-
}, {
|
|
49
|
-
default: vue.withCtx(() => [
|
|
50
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(breadcrumbContext).separatorIcon)))
|
|
51
|
-
]),
|
|
52
|
-
_: 1
|
|
53
|
-
}, 8, ["class"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
54
|
-
key: 1,
|
|
55
|
-
class: vue.normalizeClass(vue.unref(ns).e("separator")),
|
|
56
|
-
role: "presentation"
|
|
57
|
-
}, vue.toDisplayString((_b = vue.unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
|
|
58
|
-
], 2);
|
|
59
|
-
};
|
|
8
|
+
const breadcrumbItemProps = runtime.buildProps({
|
|
9
|
+
to: {
|
|
10
|
+
type: runtime.definePropType([String, Object]),
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
replace: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
60
16
|
}
|
|
61
17
|
});
|
|
62
|
-
var BreadcrumbItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "breadcrumb-item.vue"]]);
|
|
63
18
|
|
|
64
|
-
exports
|
|
19
|
+
exports.breadcrumbItemProps = breadcrumbItemProps;
|
|
65
20
|
//# sourceMappingURL=breadcrumb-item2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item2.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item2.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nexport const breadcrumbItemProps = buildProps({\n /**\n * @description target route of the link, same as `to` of `vue-router`\n */\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n /**\n * @description if `true`, the navigation will not leave a history record\n */\n replace: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,mBAAmB,GAAGA,kBAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var drawer$1 = require('./src/
|
|
7
|
-
var drawer = require('./src/
|
|
6
|
+
var drawer$1 = require('./src/drawer.js');
|
|
7
|
+
var drawer = require('./src/drawer2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElDrawer = install.withInstall(drawer$1["default"]);
|