@element-plus/nightly 0.0.20240430 → 0.0.20240501
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-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/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +32 -67
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +67 -32
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +77 -57
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +57 -77
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -36
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +36 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/index.mjs +5 -5
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +14 -97
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +97 -14
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +69 -152
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +152 -69
- package/es/components/tour/src/tour2.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/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +33 -67
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +67 -33
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +77 -60
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +60 -77
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -36
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +36 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +15 -97
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +97 -15
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +69 -151
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +151 -69
- package/lib/components/tour/src/tour2.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.
|
|
1
|
+
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType<string | Component>([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,WAAW,GAAG;AAC3B,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,EAAE;AACJ,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,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mjs';
|
|
2
|
-
import Icon from './src/
|
|
3
|
-
export { iconProps } from './src/
|
|
2
|
+
import Icon from './src/icon2.mjs';
|
|
3
|
+
export { iconProps } from './src/icon.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElIcon = withInstall(Icon);
|
|
@@ -1,42 +1,14 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, mergeProps, unref, renderSlot } from 'vue';
|
|
2
1
|
import '../../../utils/index.mjs';
|
|
3
|
-
import '../../../
|
|
4
|
-
import { iconProps } from './icon2.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
-
import { isUndefined } from '../../../utils/types.mjs';
|
|
8
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
9
3
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
props: iconProps,
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const ns = useNamespace("icon");
|
|
20
|
-
const style = computed(() => {
|
|
21
|
-
const { size, color } = props;
|
|
22
|
-
if (!size && !color)
|
|
23
|
-
return {};
|
|
24
|
-
return {
|
|
25
|
-
fontSize: isUndefined(size) ? void 0 : addUnit(size),
|
|
26
|
-
"--color": color
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
return (_ctx, _cache) => {
|
|
30
|
-
return openBlock(), createElementBlock("i", mergeProps({
|
|
31
|
-
class: unref(ns).b(),
|
|
32
|
-
style: unref(style)
|
|
33
|
-
}, _ctx.$attrs), [
|
|
34
|
-
renderSlot(_ctx.$slots, "default")
|
|
35
|
-
], 16);
|
|
36
|
-
};
|
|
4
|
+
const iconProps = buildProps({
|
|
5
|
+
size: {
|
|
6
|
+
type: definePropType([Number, String])
|
|
7
|
+
},
|
|
8
|
+
color: {
|
|
9
|
+
type: String
|
|
37
10
|
}
|
|
38
11
|
});
|
|
39
|
-
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "icon.vue"]]);
|
|
40
12
|
|
|
41
|
-
export {
|
|
13
|
+
export { iconProps };
|
|
42
14
|
//# sourceMappingURL=icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.mjs","sources":["../../../../../../packages/components/icon/src/icon.
|
|
1
|
+
{"version":3,"file":"icon.mjs","sources":["../../../../../../packages/components/icon/src/icon.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Icon from './icon.vue'\n\nexport const iconProps = buildProps({\n /**\n * @description SVG icon size, size x size\n */\n size: {\n type: definePropType<number | string>([Number, String]),\n },\n /**\n * @description SVG tag's fill attribute\n */\n color: {\n type: String,\n },\n} as const)\nexport type IconProps = ExtractPropTypes<typeof iconProps>\nexport type IconInstance = InstanceType<typeof Icon>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,14 +1,42 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, mergeProps, unref, renderSlot } from 'vue';
|
|
1
2
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { iconProps } from './icon.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
+
import { isUndefined } from '../../../utils/types.mjs';
|
|
8
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
3
9
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const __default__ = defineComponent({
|
|
11
|
+
name: "ElIcon",
|
|
12
|
+
inheritAttrs: false
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: iconProps,
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const ns = useNamespace("icon");
|
|
20
|
+
const style = computed(() => {
|
|
21
|
+
const { size, color } = props;
|
|
22
|
+
if (!size && !color)
|
|
23
|
+
return {};
|
|
24
|
+
return {
|
|
25
|
+
fontSize: isUndefined(size) ? void 0 : addUnit(size),
|
|
26
|
+
"--color": color
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("i", mergeProps({
|
|
31
|
+
class: unref(ns).b(),
|
|
32
|
+
style: unref(style)
|
|
33
|
+
}, _ctx.$attrs), [
|
|
34
|
+
renderSlot(_ctx.$slots, "default")
|
|
35
|
+
], 16);
|
|
36
|
+
};
|
|
10
37
|
}
|
|
11
38
|
});
|
|
39
|
+
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "icon.vue"]]);
|
|
12
40
|
|
|
13
|
-
export {
|
|
41
|
+
export { Icon as default };
|
|
14
42
|
//# sourceMappingURL=icon2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon2.mjs","sources":["../../../../../../packages/components/icon/src/icon.
|
|
1
|
+
{"version":3,"file":"icon2.mjs","sources":["../../../../../../packages/components/icon/src/icon.vue"],"sourcesContent":["<template>\n <i :class=\"ns.b()\" :style=\"style\" v-bind=\"$attrs\">\n <slot />\n </i>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { addUnit, isUndefined } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { iconProps } from './icon'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElIcon',\n inheritAttrs: false,\n})\nconst props = defineProps(iconProps)\nconst ns = useNamespace('icon')\n\nconst style = computed<CSSProperties>(() => {\n const { size, color } = props\n if (!size && !color) return {}\n\n return {\n fontSize: isUndefined(size) ? undefined : addUnit(size),\n '--color': color,\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCAac,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAEA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,KAAA,GAAQ,SAAwB,MAAM;AAC1C,MAAM,MAAA,EAAE,MAAM,KAAU,EAAA,GAAA,KAAA,CAAA;AACxB,MAAI,IAAA,CAAC,QAAQ,CAAC,KAAA;AAAO,QAAA,OAAO,EAAC,CAAA;AAE7B,MAAO,OAAA;AAAA,QACL,UAAU,WAAY,CAAA,IAAI,CAAI,GAAA,KAAA,CAAA,GAAY,QAAQ,IAAI,CAAA;AAAA,QACtD,SAAW,EAAA,KAAA;AAAA,OACb,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -82,13 +82,13 @@ export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
|
|
|
82
82
|
export { affixEmits, affixProps } from './affix/src/affix.mjs';
|
|
83
83
|
export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
|
|
84
84
|
export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
|
|
85
|
-
export { avatarEmits, avatarProps } from './avatar/src/
|
|
85
|
+
export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
|
|
86
86
|
export { backtopEmits, backtopProps } from './backtop/src/backtop.mjs';
|
|
87
87
|
export { badgeProps } from './badge/src/badge.mjs';
|
|
88
88
|
export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
|
|
89
89
|
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
|
|
90
90
|
export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
|
|
91
|
-
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/
|
|
91
|
+
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button2.mjs';
|
|
92
92
|
export { buttonGroupContextKey } from './button/src/constants.mjs';
|
|
93
93
|
export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
|
|
94
94
|
export { cardProps } from './card/src/card.mjs';
|
|
@@ -129,14 +129,14 @@ export { formItemProps, formItemValidateStates } from './form/src/form-item.mjs'
|
|
|
129
129
|
export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
|
|
130
130
|
export { useDisabled, useFormDisabled, useFormSize, useSize } from './form/src/hooks/use-form-common-props.mjs';
|
|
131
131
|
export { useFormItem, useFormItemInputId } from './form/src/hooks/use-form-item.mjs';
|
|
132
|
-
export { iconProps } from './icon/src/
|
|
132
|
+
export { iconProps } from './icon/src/icon.mjs';
|
|
133
133
|
export { imageEmits, imageProps } from './image/src/image.mjs';
|
|
134
134
|
export { imageViewerEmits, imageViewerProps } from './image-viewer/src/image-viewer.mjs';
|
|
135
135
|
export { inputEmits, inputProps } from './input/src/input.mjs';
|
|
136
136
|
export { inputNumberEmits, inputNumberProps } from './input-number/src/input-number.mjs';
|
|
137
137
|
export { linkEmits, linkProps } from './link/src/link.mjs';
|
|
138
138
|
export { menuEmits, menuProps } from './menu/src/menu.mjs';
|
|
139
|
-
export { menuItemEmits, menuItemProps } from './menu/src/menu-
|
|
139
|
+
export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
|
|
140
140
|
export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
|
|
141
141
|
export { subMenuProps } from './menu/src/sub-menu.mjs';
|
|
142
142
|
export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
|
|
@@ -213,7 +213,7 @@ export { default as FixedSizeGrid } from './virtual-list/src/components/fixed-si
|
|
|
213
213
|
export { default as DynamicSizeGrid } from './virtual-list/src/components/dynamic-size-grid.mjs';
|
|
214
214
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
|
|
215
215
|
export { watermarkProps } from './watermark/src/watermark.mjs';
|
|
216
|
-
export { tourEmits, tourProps } from './tour/src/
|
|
216
|
+
export { tourEmits, tourProps } from './tour/src/tour.mjs';
|
|
217
217
|
export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
|
|
218
218
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
|
|
219
219
|
export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Menu from './src/menu.mjs';
|
|
3
3
|
export { menuEmits, menuProps } from './src/menu.mjs';
|
|
4
|
-
import MenuItem from './src/menu-
|
|
4
|
+
import MenuItem from './src/menu-item2.mjs';
|
|
5
5
|
import MenuItemGroup from './src/menu-item-group2.mjs';
|
|
6
6
|
import SubMenu from './src/sub-menu.mjs';
|
|
7
7
|
export { subMenuProps } from './src/sub-menu.mjs';
|
|
8
|
-
export { menuItemEmits, menuItemProps } from './src/menu-
|
|
8
|
+
export { menuItemEmits, menuItemProps } from './src/menu-item.mjs';
|
|
9
9
|
export { menuItemGroupProps } from './src/menu-item-group.mjs';
|
|
10
10
|
import './src/types.mjs';
|
|
11
11
|
import './src/instance.mjs';
|
|
@@ -1,103 +1,20 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, inject, toRef, computed, reactive, onMounted, onBeforeUnmount, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createElementVNode, Fragment } from 'vue';
|
|
2
|
-
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import '../../../
|
|
5
|
-
import
|
|
6
|
-
import { menuItemProps, menuItemEmits } from './menu-item2.mjs';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { throwError } from '../../../utils/error.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { isString } from '@vue/shared';
|
|
10
4
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
ElTooltip
|
|
5
|
+
const menuItemProps = buildProps({
|
|
6
|
+
index: {
|
|
7
|
+
type: definePropType([String, null]),
|
|
8
|
+
default: null
|
|
16
9
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const rootMenu = inject("rootMenu");
|
|
22
|
-
const nsMenu = useNamespace("menu");
|
|
23
|
-
const nsMenuItem = useNamespace("menu-item");
|
|
24
|
-
if (!rootMenu)
|
|
25
|
-
throwError(COMPONENT_NAME, "can not inject root menu");
|
|
26
|
-
const { parentMenu, indexPath } = useMenu(instance, toRef(props, "index"));
|
|
27
|
-
const subMenu = inject(`subMenu:${parentMenu.value.uid}`);
|
|
28
|
-
if (!subMenu)
|
|
29
|
-
throwError(COMPONENT_NAME, "can not inject sub menu");
|
|
30
|
-
const active = computed(() => props.index === rootMenu.activeIndex);
|
|
31
|
-
const item = reactive({
|
|
32
|
-
index: props.index,
|
|
33
|
-
indexPath,
|
|
34
|
-
active
|
|
35
|
-
});
|
|
36
|
-
const handleClick = () => {
|
|
37
|
-
if (!props.disabled) {
|
|
38
|
-
rootMenu.handleMenuItemClick({
|
|
39
|
-
index: props.index,
|
|
40
|
-
indexPath: indexPath.value,
|
|
41
|
-
route: props.route
|
|
42
|
-
});
|
|
43
|
-
emit("click", item);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
onMounted(() => {
|
|
47
|
-
subMenu.addSubMenu(item);
|
|
48
|
-
rootMenu.addMenuItem(item);
|
|
49
|
-
});
|
|
50
|
-
onBeforeUnmount(() => {
|
|
51
|
-
subMenu.removeSubMenu(item);
|
|
52
|
-
rootMenu.removeMenuItem(item);
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
parentMenu,
|
|
56
|
-
rootMenu,
|
|
57
|
-
active,
|
|
58
|
-
nsMenu,
|
|
59
|
-
nsMenuItem,
|
|
60
|
-
handleClick
|
|
61
|
-
};
|
|
62
|
-
}
|
|
10
|
+
route: {
|
|
11
|
+
type: definePropType([String, Object])
|
|
12
|
+
},
|
|
13
|
+
disabled: Boolean
|
|
63
14
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class: normalizeClass([
|
|
68
|
-
_ctx.nsMenuItem.b(),
|
|
69
|
-
_ctx.nsMenuItem.is("active", _ctx.active),
|
|
70
|
-
_ctx.nsMenuItem.is("disabled", _ctx.disabled)
|
|
71
|
-
]),
|
|
72
|
-
role: "menuitem",
|
|
73
|
-
tabindex: "-1",
|
|
74
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
75
|
-
}, [
|
|
76
|
-
_ctx.parentMenu.type.name === "ElMenu" && _ctx.rootMenu.props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
77
|
-
key: 0,
|
|
78
|
-
effect: _ctx.rootMenu.props.popperEffect,
|
|
79
|
-
placement: "right",
|
|
80
|
-
"fallback-placements": ["left"],
|
|
81
|
-
persistent: ""
|
|
82
|
-
}, {
|
|
83
|
-
content: withCtx(() => [
|
|
84
|
-
renderSlot(_ctx.$slots, "title")
|
|
85
|
-
]),
|
|
86
|
-
default: withCtx(() => [
|
|
87
|
-
createElementVNode("div", {
|
|
88
|
-
class: normalizeClass(_ctx.nsMenu.be("tooltip", "trigger"))
|
|
89
|
-
}, [
|
|
90
|
-
renderSlot(_ctx.$slots, "default")
|
|
91
|
-
], 2)
|
|
92
|
-
]),
|
|
93
|
-
_: 3
|
|
94
|
-
}, 8, ["effect"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
95
|
-
renderSlot(_ctx.$slots, "default"),
|
|
96
|
-
renderSlot(_ctx.$slots, "title")
|
|
97
|
-
], 64))
|
|
98
|
-
], 2);
|
|
99
|
-
}
|
|
100
|
-
var MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "menu-item.vue"]]);
|
|
15
|
+
const menuItemEmits = {
|
|
16
|
+
click: (item) => isString(item.index) && Array.isArray(item.indexPath)
|
|
17
|
+
};
|
|
101
18
|
|
|
102
|
-
export {
|
|
19
|
+
export { menuItemEmits, menuItemProps };
|
|
103
20
|
//# sourceMappingURL=menu-item.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item.mjs","sources":["../../../../../../packages/components/menu/src/menu-item.
|
|
1
|
+
{"version":3,"file":"menu-item.mjs","sources":["../../../../../../packages/components/menu/src/menu-item.ts"],"sourcesContent":["import { buildProps, definePropType, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type { MenuItemRegistered } from './types'\n\nexport const menuItemProps = buildProps({\n index: {\n type: definePropType<string | null>([String, null]),\n default: null,\n },\n route: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n },\n disabled: Boolean,\n} as const)\nexport type MenuItemProps = ExtractPropTypes<typeof menuItemProps>\n\nexport const menuItemEmits = {\n click: (item: MenuItemRegistered) =>\n isString(item.index) && Array.isArray(item.indexPath),\n}\nexport type MenuItemEmits = typeof menuItemEmits\n"],"names":[],"mappings":";;;;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACxC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,KAAK,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC;AACxE;;;;"}
|
|
@@ -1,20 +1,103 @@
|
|
|
1
|
+
import { defineComponent, getCurrentInstance, inject, toRef, computed, reactive, onMounted, onBeforeUnmount, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createElementVNode, Fragment } from 'vue';
|
|
2
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import useMenu from './use-menu.mjs';
|
|
6
|
+
import { menuItemProps, menuItemEmits } from './menu-item.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
4
10
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
const COMPONENT_NAME = "ElMenuItem";
|
|
12
|
+
const _sfc_main = defineComponent({
|
|
13
|
+
name: COMPONENT_NAME,
|
|
14
|
+
components: {
|
|
15
|
+
ElTooltip
|
|
9
16
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
17
|
+
props: menuItemProps,
|
|
18
|
+
emits: menuItemEmits,
|
|
19
|
+
setup(props, { emit }) {
|
|
20
|
+
const instance = getCurrentInstance();
|
|
21
|
+
const rootMenu = inject("rootMenu");
|
|
22
|
+
const nsMenu = useNamespace("menu");
|
|
23
|
+
const nsMenuItem = useNamespace("menu-item");
|
|
24
|
+
if (!rootMenu)
|
|
25
|
+
throwError(COMPONENT_NAME, "can not inject root menu");
|
|
26
|
+
const { parentMenu, indexPath } = useMenu(instance, toRef(props, "index"));
|
|
27
|
+
const subMenu = inject(`subMenu:${parentMenu.value.uid}`);
|
|
28
|
+
if (!subMenu)
|
|
29
|
+
throwError(COMPONENT_NAME, "can not inject sub menu");
|
|
30
|
+
const active = computed(() => props.index === rootMenu.activeIndex);
|
|
31
|
+
const item = reactive({
|
|
32
|
+
index: props.index,
|
|
33
|
+
indexPath,
|
|
34
|
+
active
|
|
35
|
+
});
|
|
36
|
+
const handleClick = () => {
|
|
37
|
+
if (!props.disabled) {
|
|
38
|
+
rootMenu.handleMenuItemClick({
|
|
39
|
+
index: props.index,
|
|
40
|
+
indexPath: indexPath.value,
|
|
41
|
+
route: props.route
|
|
42
|
+
});
|
|
43
|
+
emit("click", item);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
subMenu.addSubMenu(item);
|
|
48
|
+
rootMenu.addMenuItem(item);
|
|
49
|
+
});
|
|
50
|
+
onBeforeUnmount(() => {
|
|
51
|
+
subMenu.removeSubMenu(item);
|
|
52
|
+
rootMenu.removeMenuItem(item);
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
parentMenu,
|
|
56
|
+
rootMenu,
|
|
57
|
+
active,
|
|
58
|
+
nsMenu,
|
|
59
|
+
nsMenuItem,
|
|
60
|
+
handleClick
|
|
61
|
+
};
|
|
62
|
+
}
|
|
14
63
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
64
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
65
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
66
|
+
return openBlock(), createElementBlock("li", {
|
|
67
|
+
class: normalizeClass([
|
|
68
|
+
_ctx.nsMenuItem.b(),
|
|
69
|
+
_ctx.nsMenuItem.is("active", _ctx.active),
|
|
70
|
+
_ctx.nsMenuItem.is("disabled", _ctx.disabled)
|
|
71
|
+
]),
|
|
72
|
+
role: "menuitem",
|
|
73
|
+
tabindex: "-1",
|
|
74
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
75
|
+
}, [
|
|
76
|
+
_ctx.parentMenu.type.name === "ElMenu" && _ctx.rootMenu.props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
77
|
+
key: 0,
|
|
78
|
+
effect: _ctx.rootMenu.props.popperEffect,
|
|
79
|
+
placement: "right",
|
|
80
|
+
"fallback-placements": ["left"],
|
|
81
|
+
persistent: ""
|
|
82
|
+
}, {
|
|
83
|
+
content: withCtx(() => [
|
|
84
|
+
renderSlot(_ctx.$slots, "title")
|
|
85
|
+
]),
|
|
86
|
+
default: withCtx(() => [
|
|
87
|
+
createElementVNode("div", {
|
|
88
|
+
class: normalizeClass(_ctx.nsMenu.be("tooltip", "trigger"))
|
|
89
|
+
}, [
|
|
90
|
+
renderSlot(_ctx.$slots, "default")
|
|
91
|
+
], 2)
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 8, ["effect"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
95
|
+
renderSlot(_ctx.$slots, "default"),
|
|
96
|
+
renderSlot(_ctx.$slots, "title")
|
|
97
|
+
], 64))
|
|
98
|
+
], 2);
|
|
99
|
+
}
|
|
100
|
+
var MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "menu-item.vue"]]);
|
|
18
101
|
|
|
19
|
-
export {
|
|
102
|
+
export { MenuItem as default };
|
|
20
103
|
//# sourceMappingURL=menu-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item2.mjs","sources":["../../../../../../packages/components/menu/src/menu-item.
|
|
1
|
+
{"version":3,"file":"menu-item2.mjs","sources":["../../../../../../packages/components/menu/src/menu-item.vue"],"sourcesContent":["<template>\n <li\n :class=\"[\n nsMenuItem.b(),\n nsMenuItem.is('active', active),\n nsMenuItem.is('disabled', disabled),\n ]\"\n role=\"menuitem\"\n tabindex=\"-1\"\n @click=\"handleClick\"\n >\n <el-tooltip\n v-if=\"\n parentMenu.type.name === 'ElMenu' &&\n rootMenu.props.collapse &&\n $slots.title\n \"\n :effect=\"rootMenu.props.popperEffect\"\n placement=\"right\"\n :fallback-placements=\"['left']\"\n persistent\n >\n <template #content>\n <slot name=\"title\" />\n </template>\n <div :class=\"nsMenu.be('tooltip', 'trigger')\">\n <slot />\n </div>\n </el-tooltip>\n <template v-else>\n <slot />\n <slot name=\"title\" />\n </template>\n </li>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n toRef,\n} from 'vue'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport useMenu from './use-menu'\nimport { menuItemEmits, menuItemProps } from './menu-item'\n\nimport type { MenuItemRegistered, MenuProvider, SubMenuProvider } from './types'\n\nconst COMPONENT_NAME = 'ElMenuItem'\nexport default defineComponent({\n name: COMPONENT_NAME,\n components: {\n ElTooltip,\n },\n\n props: menuItemProps,\n emits: menuItemEmits,\n\n setup(props, { emit }) {\n const instance = getCurrentInstance()!\n const rootMenu = inject<MenuProvider>('rootMenu')\n const nsMenu = useNamespace('menu')\n const nsMenuItem = useNamespace('menu-item')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const { parentMenu, indexPath } = useMenu(instance, toRef(props, 'index'))\n\n const subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const active = computed(() => props.index === rootMenu.activeIndex)\n const item: MenuItemRegistered = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const handleClick = () => {\n if (!props.disabled) {\n rootMenu.handleMenuItemClick({\n index: props.index,\n indexPath: indexPath.value,\n route: props.route,\n })\n emit('click', item)\n }\n }\n\n onMounted(() => {\n subMenu.addSubMenu(item)\n rootMenu.addMenuItem(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeMenuItem(item)\n })\n\n return {\n parentMenu,\n rootMenu,\n active,\n nsMenu,\n nsMenuItem,\n handleClick,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_createBlock","_withCtx","_renderSlot","_createElementVNode","_Fragment"],"mappings":";;;;;;;;;;AAwDA,MAAM,cAAiB,GAAA,YAAA,CAAA;AACvB,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,cAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,SAAA;AAAA,GACF;AAAA,EAEA,KAAO,EAAA,aAAA;AAAA,EACP,KAAO,EAAA,aAAA;AAAA,EAEP,KAAA,CAAM,KAAO,EAAA,EAAE,IAAQ,EAAA,EAAA;AACrB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAM,MAAA,QAAA,GAAW,OAAqB,UAAU,CAAA,CAAA;AAChD,IAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAClC,IAAM,MAAA,UAAA,GAAa,aAAa,WAAW,CAAA,CAAA;AAC3C,IAAA,IAAI,CAAC,QAAA;AAAU,MAAA,UAAA,C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,CAAA,IAAA,CAAA,MAAA,CAAO,EAAE,CAAA,SAAA,EAAA,SAAA,CAAA,CAAA;AAAA,SAAA,EAAA;UACpBG,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,SAAA,EAAA,CAAA,CAAA;;;uCAGZJ,kBAGW,CAAAM,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;AAAA,MAFTF,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,MACRA,UAAqB,CAAA,IAAA,CAAA,MAAA,EAAA,OAAA,CAAA;AAAA,KAAA,EAAA,EAAA,CAAA,CAAA;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ import { QuestionFilled } from '@element-plus/icons-vue';
|
|
|
3
3
|
import '../../../utils/index.mjs';
|
|
4
4
|
import '../../tooltip/index.mjs';
|
|
5
5
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
6
|
-
import { buttonTypes } from '../../button/src/
|
|
6
|
+
import { buttonTypes } from '../../button/src/button2.mjs';
|
|
7
7
|
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
8
8
|
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Tour from './src/
|
|
2
|
+
import Tour from './src/tour2.mjs';
|
|
3
3
|
import TourStep from './src/step2.mjs';
|
|
4
|
-
export { tourEmits, tourProps } from './src/
|
|
4
|
+
export { tourEmits, tourProps } from './src/tour.mjs';
|
|
5
5
|
export { tourStepEmits, tourStepProps } from './src/step.mjs';
|
|
6
6
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/content.mjs';
|
|
7
7
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|