@element-plus/nightly 0.0.20231228 → 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.css +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/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +43 -66
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +66 -43
- package/es/components/col/src/col2.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 +4 -4
- 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/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +25 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -25
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/index.mjs +4 -4
- 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/col/index.js +2 -2
- package/lib/components/col/src/col.js +43 -66
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +66 -43
- package/lib/components/col/src/col2.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 +4 -4
- 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/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +28 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -28
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/index.js +4 -4
- 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-select-v2.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/select-v2.scss +6 -0
- package/web-types.json +1 -1
|
@@ -1,61 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
|
-
import { breadcrumbKey } from './constants.mjs';
|
|
5
|
-
import { breadcrumbItemProps } from './breadcrumb-item.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
8
3
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const instance = getCurrentInstance();
|
|
18
|
-
const breadcrumbContext = inject(breadcrumbKey, void 0);
|
|
19
|
-
const ns = useNamespace("breadcrumb");
|
|
20
|
-
const router = instance.appContext.config.globalProperties.$router;
|
|
21
|
-
const link = ref();
|
|
22
|
-
const onClick = () => {
|
|
23
|
-
if (!props.to || !router)
|
|
24
|
-
return;
|
|
25
|
-
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
26
|
-
};
|
|
27
|
-
return (_ctx, _cache) => {
|
|
28
|
-
var _a, _b;
|
|
29
|
-
return openBlock(), createElementBlock("span", {
|
|
30
|
-
class: normalizeClass(unref(ns).e("item"))
|
|
31
|
-
}, [
|
|
32
|
-
createElementVNode("span", {
|
|
33
|
-
ref_key: "link",
|
|
34
|
-
ref: link,
|
|
35
|
-
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
|
|
36
|
-
role: "link",
|
|
37
|
-
onClick
|
|
38
|
-
}, [
|
|
39
|
-
renderSlot(_ctx.$slots, "default")
|
|
40
|
-
], 2),
|
|
41
|
-
((_a = unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: normalizeClass(unref(ns).e("separator"))
|
|
44
|
-
}, {
|
|
45
|
-
default: withCtx(() => [
|
|
46
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
50
|
-
key: 1,
|
|
51
|
-
class: normalizeClass(unref(ns).e("separator")),
|
|
52
|
-
role: "presentation"
|
|
53
|
-
}, toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
|
|
54
|
-
], 2);
|
|
55
|
-
};
|
|
4
|
+
const breadcrumbItemProps = buildProps({
|
|
5
|
+
to: {
|
|
6
|
+
type: definePropType([String, Object]),
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
replace: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
56
12
|
}
|
|
57
13
|
});
|
|
58
|
-
var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "breadcrumb-item.vue"]]);
|
|
59
14
|
|
|
60
|
-
export {
|
|
15
|
+
export { breadcrumbItemProps };
|
|
61
16
|
//# sourceMappingURL=breadcrumb-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item2.mjs","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":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,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;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Col from './src/
|
|
3
|
-
export { colProps } from './src/
|
|
2
|
+
import Col from './src/col2.mjs';
|
|
3
|
+
export { colProps } from './src/col.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElCol = withInstall(Col);
|
|
@@ -1,72 +1,49 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
|
|
2
1
|
import '../../../utils/index.mjs';
|
|
3
|
-
import '../../../
|
|
4
|
-
import '
|
|
5
|
-
import { colProps } from './col2.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { rowContextKey } from '../../row/src/constants.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { isNumber } from '../../../utils/types.mjs';
|
|
10
|
-
import { isObject } from '@vue/shared';
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
classes.push(ns.is("guttered"));
|
|
53
|
-
}
|
|
54
|
-
return [ns.b(), classes];
|
|
55
|
-
});
|
|
56
|
-
return (_ctx, _cache) => {
|
|
57
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
58
|
-
class: normalizeClass(unref(colKls)),
|
|
59
|
-
style: normalizeStyle(unref(style))
|
|
60
|
-
}, {
|
|
61
|
-
default: withCtx(() => [
|
|
62
|
-
renderSlot(_ctx.$slots, "default")
|
|
63
|
-
]),
|
|
64
|
-
_: 3
|
|
65
|
-
}, 8, ["class", "style"]);
|
|
66
|
-
};
|
|
5
|
+
const colProps = buildProps({
|
|
6
|
+
tag: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "div"
|
|
9
|
+
},
|
|
10
|
+
span: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 24
|
|
13
|
+
},
|
|
14
|
+
offset: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
18
|
+
pull: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
push: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
xs: {
|
|
27
|
+
type: definePropType([Number, Object]),
|
|
28
|
+
default: () => mutable({})
|
|
29
|
+
},
|
|
30
|
+
sm: {
|
|
31
|
+
type: definePropType([Number, Object]),
|
|
32
|
+
default: () => mutable({})
|
|
33
|
+
},
|
|
34
|
+
md: {
|
|
35
|
+
type: definePropType([Number, Object]),
|
|
36
|
+
default: () => mutable({})
|
|
37
|
+
},
|
|
38
|
+
lg: {
|
|
39
|
+
type: definePropType([Number, Object]),
|
|
40
|
+
default: () => mutable({})
|
|
41
|
+
},
|
|
42
|
+
xl: {
|
|
43
|
+
type: definePropType([Number, Object]),
|
|
44
|
+
default: () => mutable({})
|
|
67
45
|
}
|
|
68
46
|
});
|
|
69
|
-
var Col = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "col.vue"]]);
|
|
70
47
|
|
|
71
|
-
export {
|
|
48
|
+
export { colProps };
|
|
72
49
|
//# sourceMappingURL=col.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"col.mjs","sources":["../../../../../../packages/components/col/src/col.
|
|
1
|
+
{"version":3,"file":"col.mjs","sources":["../../../../../../packages/components/col/src/col.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Col from './col.vue'\n\nexport type ColSizeObject = {\n span?: number\n offset?: number\n pull?: number\n push?: number\n}\nexport type ColSize = number | ColSizeObject\n\nexport const colProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description number of column the grid spans\n */\n span: {\n type: Number,\n default: 24,\n },\n /**\n * @description number of spacing on the left side of the grid\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the left\n */\n pull: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the right\n */\n push: {\n type: Number,\n default: 0,\n },\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type ColProps = ExtractPropTypes<typeof colProps>\nexport type ColInstance = InstanceType<typeof Col>\n"],"names":[],"mappings":";;;;AACY,MAAC,QAAQ,GAAG,UAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,49 +1,72 @@
|
|
|
1
|
+
import { defineComponent, inject, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
|
|
1
2
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import '../../row/index.mjs';
|
|
5
|
+
import { colProps } from './col.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { rowContextKey } from '../../row/src/constants.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
+
import { isNumber } from '../../../utils/types.mjs';
|
|
10
|
+
import { isObject } from '@vue/shared';
|
|
4
11
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
12
|
+
const __default__ = defineComponent({
|
|
13
|
+
name: "ElCol"
|
|
14
|
+
});
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
+
...__default__,
|
|
17
|
+
props: colProps,
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) });
|
|
21
|
+
const ns = useNamespace("col");
|
|
22
|
+
const style = computed(() => {
|
|
23
|
+
const styles = {};
|
|
24
|
+
if (gutter.value) {
|
|
25
|
+
styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
|
|
26
|
+
}
|
|
27
|
+
return styles;
|
|
28
|
+
});
|
|
29
|
+
const colKls = computed(() => {
|
|
30
|
+
const classes = [];
|
|
31
|
+
const pos = ["span", "offset", "pull", "push"];
|
|
32
|
+
pos.forEach((prop) => {
|
|
33
|
+
const size = props[prop];
|
|
34
|
+
if (isNumber(size)) {
|
|
35
|
+
if (prop === "span")
|
|
36
|
+
classes.push(ns.b(`${props[prop]}`));
|
|
37
|
+
else if (size > 0)
|
|
38
|
+
classes.push(ns.b(`${prop}-${props[prop]}`));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const sizes = ["xs", "sm", "md", "lg", "xl"];
|
|
42
|
+
sizes.forEach((size) => {
|
|
43
|
+
if (isNumber(props[size])) {
|
|
44
|
+
classes.push(ns.b(`${size}-${props[size]}`));
|
|
45
|
+
} else if (isObject(props[size])) {
|
|
46
|
+
Object.entries(props[size]).forEach(([prop, sizeProp]) => {
|
|
47
|
+
classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
if (gutter.value) {
|
|
52
|
+
classes.push(ns.is("guttered"));
|
|
53
|
+
}
|
|
54
|
+
return [ns.b(), classes];
|
|
55
|
+
});
|
|
56
|
+
return (_ctx, _cache) => {
|
|
57
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
58
|
+
class: normalizeClass(unref(colKls)),
|
|
59
|
+
style: normalizeStyle(unref(style))
|
|
60
|
+
}, {
|
|
61
|
+
default: withCtx(() => [
|
|
62
|
+
renderSlot(_ctx.$slots, "default")
|
|
63
|
+
]),
|
|
64
|
+
_: 3
|
|
65
|
+
}, 8, ["class", "style"]);
|
|
66
|
+
};
|
|
45
67
|
}
|
|
46
68
|
});
|
|
69
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "col.vue"]]);
|
|
47
70
|
|
|
48
|
-
export {
|
|
71
|
+
export { Col as default };
|
|
49
72
|
//# sourceMappingURL=col2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"col2.mjs","sources":["../../../../../../packages/components/col/src/col.
|
|
1
|
+
{"version":3,"file":"col2.mjs","sources":["../../../../../../packages/components/col/src/col.vue"],"sourcesContent":["<template>\n <component :is=\"tag\" :class=\"colKls\" :style=\"style\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { isNumber, isObject } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { rowContextKey } from '@element-plus/components/row'\nimport { colProps } from './col'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCol',\n})\n\nconst props = defineProps(colProps)\n\nconst { gutter } = inject(rowContextKey, { gutter: computed(() => 0) })\nconst ns = useNamespace('col')\n\nconst style = computed(() => {\n const styles: CSSProperties = {}\n if (gutter.value) {\n styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`\n }\n return styles\n})\n\nconst colKls = computed(() => {\n const classes: string[] = []\n const pos = ['span', 'offset', 'pull', 'push'] as const\n\n pos.forEach((prop) => {\n const size = props[prop]\n if (isNumber(size)) {\n if (prop === 'span') classes.push(ns.b(`${props[prop]}`))\n else if (size > 0) classes.push(ns.b(`${prop}-${props[prop]}`))\n }\n })\n\n const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as const\n sizes.forEach((size) => {\n if (isNumber(props[size])) {\n classes.push(ns.b(`${size}-${props[size]}`))\n } else if (isObject(props[size])) {\n Object.entries(props[size]).forEach(([prop, sizeProp]) => {\n classes.push(\n prop !== 'span'\n ? ns.b(`${size}-${prop}-${sizeProp}`)\n : ns.b(`${size}-${sizeProp}`)\n )\n })\n }\n })\n\n // this is for the fix\n if (gutter.value) {\n classes.push(ns.is('guttered'))\n }\n return [ns.b(), classes]\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;mCAcc,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,MAAW,EAAA,GAAA,MAAA,CAAO,aAAe,EAAA,EAAE,QAAQ,QAAS,CAAA,MAAM,CAAC,CAAA,EAAG,CAAA,CAAA;AACtE,IAAM,MAAA,EAAA,GAAK,aAAa,KAAK,CAAA,CAAA;AAE7B,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAA,MAAM,SAAwB,EAAC,CAAA;AAC/B,MAAA,IAAI,OAAO,KAAO,EAAA;AAChB,QAAA,MAAA,CAAO,WAAc,GAAA,MAAA,CAAO,YAAe,GAAA,CAAA,EAAG,OAAO,KAAQ,GAAA,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,OAC/D;AACA,MAAO,OAAA,MAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAA,MAAM,UAAoB,EAAC,CAAA;AAC3B,MAAA,MAAM,GAAM,GAAA,CAAC,MAAQ,EAAA,QAAA,EAAU,QAAQ,MAAM,CAAA,CAAA;AAE7C,MAAI,GAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AACpB,QAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA,CAAA;AACnB,QAAI,IAAA,QAAA,CAAS,IAAI,CAAG,EAAA;AAClB,UAAA,IAAI,IAAS,KAAA,MAAA;AAAQ,YAAA,OAAA,CAAQ,KAAK,EAAG,CAAA,CAAA,CAAE,CAAG,EAAA,KAAA,CAAM,OAAO,CAAC,CAAA,CAAA;AAAA,eAAA,IAC/C,IAAO,GAAA,CAAA;AAAG,YAAA,OAAA,CAAQ,KAAK,EAAG,CAAA,CAAA,CAAE,GAAG,IAAQ,CAAA,CAAA,EAAA,KAAA,CAAM,OAAO,CAAC,CAAA,CAAA;AAAA,SAChE;AAAA,OACD,CAAA,CAAA;AAED,MAAA,MAAM,QAAQ,CAAC,IAAA,EAAM,IAAM,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA,CAAA;AAC3C,MAAM,KAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AACtB,QAAI,IAAA,QAAA,CAAS,KAAM,CAAA,IAAA,CAAK,CAAG,EAAA;AACzB,UAAA,OAAA,CAAQ,KAAK,EAAG,CAAA,CAAA,CAAE,GAAG,IAAQ,CAAA,CAAA,EAAA,KAAA,CAAM,OAAO,CAAC,CAAA,CAAA;AAAA,SAClC,MAAA,IAAA,QAAA,CAAS,KAAM,CAAA,IAAA,CAAK,CAAG,EAAA;AAChC,UAAO,MAAA,CAAA,OAAA,CAAQ,MAAM,IAAK,CAAA,CAAA,CAAE,QAAQ,CAAC,CAAC,MAAM,QAAc,CAAA,KAAA;AACxD,YAAA,OAAA,CAAQ,IACN,CAAA,IAAA,KAAS,MACL,GAAA,EAAA,CAAG,EAAE,CAAG,EAAA,IAAA,CAAA,CAAA,EAAQ,IAAQ,CAAA,CAAA,EAAA,QAAA,CAAA,CAAU,IAClC,EAAG,CAAA,CAAA,CAAE,CAAG,EAAA,IAAA,CAAA,CAAA,EAAQ,UAAU,CAChC,CAAA,CAAA;AAAA,WACD,CAAA,CAAA;AAAA,SACH;AAAA,OACD,CAAA,CAAA;AAGD,MAAA,IAAI,OAAO,KAAO,EAAA;AAChB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,UAAU,CAAC,CAAA,CAAA;AAAA,OAChC;AACA,MAAA,OAAO,CAAC,EAAA,CAAG,CAAE,EAAA,EAAG,OAAO,CAAA,CAAA;AAAA,KACxB,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Drawer from './src/
|
|
3
|
-
export { drawerEmits, drawerProps } from './src/
|
|
2
|
+
import Drawer from './src/drawer.mjs';
|
|
3
|
+
export { drawerEmits, drawerProps } from './src/drawer2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElDrawer = withInstall(Drawer);
|
|
@@ -1,33 +1,183 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, createElementVNode, mergeProps, withModifiers, normalizeClass, createElementBlock, renderSlot, toDisplayString, createCommentVNode, vShow } from 'vue';
|
|
2
|
+
import { Close } from '@element-plus/icons-vue';
|
|
3
|
+
import { ElOverlay } from '../../overlay/index.mjs';
|
|
4
|
+
import '../../focus-trap/index.mjs';
|
|
2
5
|
import '../../dialog/index.mjs';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
6
|
+
import '../../../utils/index.mjs';
|
|
7
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
8
|
+
import '../../../hooks/index.mjs';
|
|
9
|
+
import { drawerProps, drawerEmits } from './drawer2.mjs';
|
|
10
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
11
|
+
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
|
12
|
+
import { useDeprecated } from '../../../hooks/use-deprecated/index.mjs';
|
|
13
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
14
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
15
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
16
|
+
import { useDialog } from '../../dialog/src/use-dialog.mjs';
|
|
5
17
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
size: {
|
|
14
|
-
type: [String, Number],
|
|
15
|
-
default: "30%"
|
|
16
|
-
},
|
|
17
|
-
withHeader: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: true
|
|
20
|
-
},
|
|
21
|
-
modalFade: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: true
|
|
18
|
+
const _sfc_main = defineComponent({
|
|
19
|
+
name: "ElDrawer",
|
|
20
|
+
components: {
|
|
21
|
+
ElOverlay,
|
|
22
|
+
ElFocusTrap,
|
|
23
|
+
ElIcon,
|
|
24
|
+
Close
|
|
24
25
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
inheritAttrs: false,
|
|
27
|
+
props: drawerProps,
|
|
28
|
+
emits: drawerEmits,
|
|
29
|
+
setup(props, { slots }) {
|
|
30
|
+
useDeprecated({
|
|
31
|
+
scope: "el-drawer",
|
|
32
|
+
from: "the title slot",
|
|
33
|
+
replacement: "the header slot",
|
|
34
|
+
version: "3.0.0",
|
|
35
|
+
ref: "https://element-plus.org/en-US/component/drawer.html#slots"
|
|
36
|
+
}, computed(() => !!slots.title));
|
|
37
|
+
useDeprecated({
|
|
38
|
+
scope: "el-drawer",
|
|
39
|
+
from: "custom-class",
|
|
40
|
+
replacement: "class",
|
|
41
|
+
version: "2.3.0",
|
|
42
|
+
ref: "https://element-plus.org/en-US/component/drawer.html#attributes",
|
|
43
|
+
type: "Attribute"
|
|
44
|
+
}, computed(() => !!props.customClass));
|
|
45
|
+
const drawerRef = ref();
|
|
46
|
+
const focusStartRef = ref();
|
|
47
|
+
const ns = useNamespace("drawer");
|
|
48
|
+
const { t } = useLocale();
|
|
49
|
+
const isHorizontal = computed(() => props.direction === "rtl" || props.direction === "ltr");
|
|
50
|
+
const drawerSize = computed(() => addUnit(props.size));
|
|
51
|
+
return {
|
|
52
|
+
...useDialog(props, drawerRef),
|
|
53
|
+
drawerRef,
|
|
54
|
+
focusStartRef,
|
|
55
|
+
isHorizontal,
|
|
56
|
+
drawerSize,
|
|
57
|
+
ns,
|
|
58
|
+
t
|
|
59
|
+
};
|
|
28
60
|
}
|
|
29
61
|
});
|
|
30
|
-
const
|
|
62
|
+
const _hoisted_1 = ["aria-label", "aria-labelledby", "aria-describedby"];
|
|
63
|
+
const _hoisted_2 = ["id", "aria-level"];
|
|
64
|
+
const _hoisted_3 = ["aria-label"];
|
|
65
|
+
const _hoisted_4 = ["id"];
|
|
66
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
67
|
+
const _component_close = resolveComponent("close");
|
|
68
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
69
|
+
const _component_el_focus_trap = resolveComponent("el-focus-trap");
|
|
70
|
+
const _component_el_overlay = resolveComponent("el-overlay");
|
|
71
|
+
return openBlock(), createBlock(Teleport, {
|
|
72
|
+
to: "body",
|
|
73
|
+
disabled: !_ctx.appendToBody
|
|
74
|
+
}, [
|
|
75
|
+
createVNode(Transition, {
|
|
76
|
+
name: _ctx.ns.b("fade"),
|
|
77
|
+
onAfterEnter: _ctx.afterEnter,
|
|
78
|
+
onAfterLeave: _ctx.afterLeave,
|
|
79
|
+
onBeforeLeave: _ctx.beforeLeave,
|
|
80
|
+
persisted: ""
|
|
81
|
+
}, {
|
|
82
|
+
default: withCtx(() => [
|
|
83
|
+
withDirectives(createVNode(_component_el_overlay, {
|
|
84
|
+
mask: _ctx.modal,
|
|
85
|
+
"overlay-class": _ctx.modalClass,
|
|
86
|
+
"z-index": _ctx.zIndex,
|
|
87
|
+
onClick: _ctx.onModalClick
|
|
88
|
+
}, {
|
|
89
|
+
default: withCtx(() => [
|
|
90
|
+
createVNode(_component_el_focus_trap, {
|
|
91
|
+
loop: "",
|
|
92
|
+
trapped: _ctx.visible,
|
|
93
|
+
"focus-trap-el": _ctx.drawerRef,
|
|
94
|
+
"focus-start-el": _ctx.focusStartRef,
|
|
95
|
+
onReleaseRequested: _ctx.onCloseRequested
|
|
96
|
+
}, {
|
|
97
|
+
default: withCtx(() => [
|
|
98
|
+
createElementVNode("div", mergeProps({
|
|
99
|
+
ref: "drawerRef",
|
|
100
|
+
"aria-modal": "true",
|
|
101
|
+
"aria-label": _ctx.title || void 0,
|
|
102
|
+
"aria-labelledby": !_ctx.title ? _ctx.titleId : void 0,
|
|
103
|
+
"aria-describedby": _ctx.bodyId
|
|
104
|
+
}, _ctx.$attrs, {
|
|
105
|
+
class: [_ctx.ns.b(), _ctx.direction, _ctx.visible && "open", _ctx.customClass],
|
|
106
|
+
style: _ctx.isHorizontal ? "width: " + _ctx.drawerSize : "height: " + _ctx.drawerSize,
|
|
107
|
+
role: "dialog",
|
|
108
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
109
|
+
}, ["stop"]))
|
|
110
|
+
}), [
|
|
111
|
+
createElementVNode("span", {
|
|
112
|
+
ref: "focusStartRef",
|
|
113
|
+
class: normalizeClass(_ctx.ns.e("sr-focus")),
|
|
114
|
+
tabindex: "-1"
|
|
115
|
+
}, null, 2),
|
|
116
|
+
_ctx.withHeader ? (openBlock(), createElementBlock("header", {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: normalizeClass(_ctx.ns.e("header"))
|
|
119
|
+
}, [
|
|
120
|
+
!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
|
|
121
|
+
key: 0,
|
|
122
|
+
close: _ctx.handleClose,
|
|
123
|
+
titleId: _ctx.titleId,
|
|
124
|
+
titleClass: _ctx.ns.e("title")
|
|
125
|
+
}, () => [
|
|
126
|
+
!_ctx.$slots.title ? (openBlock(), createElementBlock("span", {
|
|
127
|
+
key: 0,
|
|
128
|
+
id: _ctx.titleId,
|
|
129
|
+
role: "heading",
|
|
130
|
+
"aria-level": _ctx.headerAriaLevel,
|
|
131
|
+
class: normalizeClass(_ctx.ns.e("title"))
|
|
132
|
+
}, toDisplayString(_ctx.title), 11, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
133
|
+
]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
|
|
134
|
+
createCommentVNode(" DEPRECATED SLOT ")
|
|
135
|
+
]),
|
|
136
|
+
_ctx.showClose ? (openBlock(), createElementBlock("button", {
|
|
137
|
+
key: 2,
|
|
138
|
+
"aria-label": _ctx.t("el.drawer.close"),
|
|
139
|
+
class: normalizeClass(_ctx.ns.e("close-btn")),
|
|
140
|
+
type: "button",
|
|
141
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))
|
|
142
|
+
}, [
|
|
143
|
+
createVNode(_component_el_icon, {
|
|
144
|
+
class: normalizeClass(_ctx.ns.e("close"))
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createVNode(_component_close)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["class"])
|
|
151
|
+
], 10, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
152
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
153
|
+
_ctx.rendered ? (openBlock(), createElementBlock("div", {
|
|
154
|
+
key: 1,
|
|
155
|
+
id: _ctx.bodyId,
|
|
156
|
+
class: normalizeClass(_ctx.ns.e("body"))
|
|
157
|
+
}, [
|
|
158
|
+
renderSlot(_ctx.$slots, "default")
|
|
159
|
+
], 10, _hoisted_4)) : createCommentVNode("v-if", true),
|
|
160
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
161
|
+
key: 2,
|
|
162
|
+
class: normalizeClass(_ctx.ns.e("footer"))
|
|
163
|
+
}, [
|
|
164
|
+
renderSlot(_ctx.$slots, "footer")
|
|
165
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
166
|
+
], 16, _hoisted_1)
|
|
167
|
+
]),
|
|
168
|
+
_: 3
|
|
169
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
170
|
+
]),
|
|
171
|
+
_: 3
|
|
172
|
+
}, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
|
|
173
|
+
[vShow, _ctx.visible]
|
|
174
|
+
])
|
|
175
|
+
]),
|
|
176
|
+
_: 3
|
|
177
|
+
}, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
178
|
+
], 8, ["disabled"]);
|
|
179
|
+
}
|
|
180
|
+
var Drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "drawer.vue"]]);
|
|
31
181
|
|
|
32
|
-
export {
|
|
182
|
+
export { Drawer as default };
|
|
33
183
|
//# sourceMappingURL=drawer.mjs.map
|