@element-plus/nightly 0.0.20230721 → 0.0.20230723
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 +25 -15
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +25 -15
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/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/autocomplete/src/autocomplete2.mjs +1 -0
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/breadcrumb/index.d.ts +2 -6
- package/es/components/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -3
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +5 -5
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +2 -0
- package/es/components/cascader/src/cascader.vue.d.ts +1 -0
- package/es/components/cascader/src/cascader2.mjs +8 -1
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/focus-trap/src/focus-trap.mjs +1 -1
- package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form.mjs +148 -54
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +54 -148
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/menu/src/sub-menu.mjs +2 -0
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +149 -67
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +67 -149
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/row/index.d.ts +18 -4
- package/es/components/row/src/row.d.ts +6 -1
- package/es/components/row/src/row.mjs +1 -2
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/row/src/row.vue.d.ts +18 -4
- package/es/components/row/src/row2.mjs +1 -1
- package/es/components/row/src/row2.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +2 -2
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/table/src/table-column/watcher-helper.mjs +1 -0
- package/es/components/table/src/table-column/watcher-helper.mjs.map +1 -1
- package/es/components/upload/src/upload.d.ts +1 -1
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/hooks/use-namespace/index.mjs +2 -2
- package/es/hooks/use-namespace/index.mjs.map +1 -1
- package/es/hooks/use-z-index/index.mjs +2 -2
- package/es/hooks/use-z-index/index.mjs.map +1 -1
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +1 -0
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/breadcrumb/index.d.ts +2 -6
- package/lib/components/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -3
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +4 -4
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/cascader/index.d.ts +2 -0
- package/lib/components/cascader/src/cascader.vue.d.ts +1 -0
- package/lib/components/cascader/src/cascader2.js +8 -1
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/focus-trap/src/focus-trap.js +1 -1
- package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form.js +147 -54
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +54 -147
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/menu/src/sub-menu.js +2 -0
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +148 -68
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +68 -148
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/row/index.d.ts +18 -4
- package/lib/components/row/src/row.d.ts +6 -1
- package/lib/components/row/src/row.js +1 -2
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/row/src/row.vue.d.ts +18 -4
- package/lib/components/row/src/row2.js +1 -1
- package/lib/components/row/src/row2.js.map +1 -1
- package/lib/components/select/src/useSelect.js +2 -2
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/table/src/table-column/watcher-helper.js +1 -0
- package/lib/components/table/src/table-column/watcher-helper.js.map +1 -1
- package/lib/components/upload/src/upload.d.ts +1 -1
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/hooks/use-namespace/index.js +1 -1
- package/lib/hooks/use-namespace/index.js.map +1 -1
- package/lib/hooks/use-z-index/index.js +1 -1
- package/lib/hooks/use-z-index/index.js.map +1 -1
- package/lib/index.js +2 -2
- 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/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-row.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/menu.scss +4 -6
- package/theme-chalk/src/row.scss +3 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-menu.js","sources":["../../../../../../packages/components/menu/src/sub-menu.ts"],"sourcesContent":["import {\n Fragment,\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n vShow,\n watch,\n withDirectives,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n buildProps,\n iconPropType,\n isString,\n throwError,\n} from '@element-plus/utils'\nimport { useDeprecated, useNamespace } from '@element-plus/hooks'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { CSSProperties, ExtractPropTypes, VNodeArrayChildren } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n index: {\n type: String,\n required: true,\n },\n showTimeout: {\n type: Number,\n default: 300,\n },\n hideTimeout: {\n type: Number,\n default: 300,\n },\n popperClass: String,\n disabled: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: undefined,\n },\n teleported: {\n type: Boolean,\n default: undefined,\n },\n popperOffset: {\n type: Number,\n default: 6,\n },\n expandCloseIcon: {\n type: iconPropType,\n },\n expandOpenIcon: {\n type: iconPropType,\n },\n collapseCloseIcon: {\n type: iconPropType,\n },\n collapseOpenIcon: {\n type: iconPropType,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes<typeof subMenuProps>\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n useDeprecated(\n {\n from: 'popper-append-to-body',\n replacement: 'teleported',\n scope: COMPONENT_NAME,\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/menu.html#submenu-attributes',\n },\n computed(() => props.popperAppendToBody !== undefined)\n )\n\n const instance = getCurrentInstance()!\n const { indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // inject\n const rootMenu = inject<MenuProvider>('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n let timeout: (() => void) | undefined\n const mouseInChild = ref(false)\n const verticalTitleRef = ref<HTMLDivElement>()\n const vPopper = ref<InstanceType<typeof ElTooltip> | null>(null)\n\n // computed\n const currentPlacement = computed<Placement>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n )\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? props.expandCloseIcon && props.expandOpenIcon\n ? opened.value\n ? props.expandOpenIcon\n : props.expandCloseIcon\n : ArrowDown\n : props.collapseCloseIcon && props.collapseOpenIcon\n ? opened.value\n ? props.collapseOpenIcon\n : props.collapseCloseIcon\n : ArrowRight\n })\n const isFirstLevel = computed(() => {\n return subMenu.level === 0\n })\n const appendToBody = computed(() => {\n const value = props.teleported ?? props.popperAppendToBody\n return value === undefined ? isFirstLevel.value : value\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse\n ? `${nsMenu.namespace.value}-zoom-in-left`\n : `${nsMenu.namespace.value}-zoom-in-top`\n )\n const fallbackPlacements = computed<Placement[]>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() => {\n let isActive = false\n\n Object.values(items.value).forEach((item) => {\n if (item.active) {\n isActive = true\n }\n })\n\n Object.values(subMenus.value).forEach((subItem) => {\n if (subItem.active) {\n isActive = true\n }\n })\n\n return isActive\n })\n\n const backgroundColor = computed(() => rootMenu.props.backgroundColor || '')\n const activeTextColor = computed(() => rootMenu.props.activeTextColor || '')\n const textColor = computed(() => rootMenu.props.textColor || '')\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)\n const titleStyle = computed<CSSProperties>(() => {\n if (mode.value !== 'horizontal') {\n return {\n color: textColor.value,\n }\n }\n return {\n borderBottomColor: active.value\n ? rootMenu.props.activeTextColor\n ? activeTextColor.value\n : ''\n : 'transparent',\n color: active.value ? activeTextColor.value : textColor.value,\n }\n })\n\n // methods\n const doDestroy = () =>\n vPopper.value?.popperRef?.popperInstanceRef?.destroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (!value) {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = props.showTimeout\n ) => {\n if (event.type === 'focus') {\n return\n }\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n return\n }\n subMenu.mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(() => {\n rootMenu.openMenu(props.index, indexPath.value)\n }, showTimeout))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n return\n }\n timeout?.()\n subMenu.mouseInChild.value = false\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n props.hideTimeout\n ))\n\n if (appendToBody.value && deepDispatch) {\n if (instance.parent?.type.name === 'ElSubMenu') {\n subMenu.handleMouseleave?.(true)\n }\n }\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide<SubMenuProvider>(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n mouseInChild,\n level: subMenu.level + 1,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-arrow'),\n style: {\n transform: opened.value\n ? (props.expandCloseIcon && props.expandOpenIcon) ||\n (props.collapseCloseIcon &&\n props.collapseOpenIcon &&\n rootMenu.props.collapse)\n ? 'none'\n : 'rotateZ(180deg)'\n : 'none',\n },\n },\n {\n default: () =>\n isString(subMenuTitleIcon.value)\n ? h(instance.appContext.components[subMenuTitleIcon.value])\n : h(subMenuTitleIcon.value),\n }\n ),\n ]\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n // temporarily mark ElPopper as any due to type inconsistency.\n const child = rootMenu.isMenuPopup\n ? h(\n // TODO: correct popper's type.\n ElTooltip as any,\n {\n ref: vPopper,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: props.popperOffset,\n showArrow: false,\n persistent: true,\n popperClass: props.popperClass,\n placement: currentPlacement.value,\n teleported: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n content: () =>\n h(\n 'div',\n {\n class: [\n nsMenu.m(mode.value),\n nsMenu.m('popup-container'),\n props.popperClass,\n ],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n nsMenu.b(),\n nsMenu.m('popup'),\n nsMenu.m(`popup-${currentPlacement.value}`),\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n default: () =>\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n style: [\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n style: [\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: [nsMenu.b(), nsMenu.m('inline')],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n nsSubMenu.b(),\n nsSubMenu.is('active', active.value),\n nsSubMenu.is('opened', opened.value),\n nsSubMenu.is('disabled', props.disabled),\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(true),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n"],"names":["buildProps","iconPropType","defineComponent","useDeprecated","computed","getCurrentInstance","useMenu","useNamespace","inject","throwError","ref","ArrowDown","ArrowRight","reactive","useMenuCssVar","useTimeoutFn","watch","provide","onMounted","onBeforeUnmount","h","ElIcon","isString","ElTooltip","Fragment","ElCollapseTransition","withDirectives","vShow"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAA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,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrG,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAC,CAAC;AACT,MAAM,OAAOP,KAAC,CAAC,IAAI,EAAE;AACrB,QAAQ,KAAK,EAAE;AACf,UAAU,SAAS,CAAC,CAAC,EAAE;AACvB,UAAU,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC;AAC9C,UAAU,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC;AAC9C,UAAU,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;AAClD,SAAS;AACT,QAAQ,IAAI,EAAE,UAAU;AACxB,QAAQ,YAAY,EAAE,IAAI;AAC1B,QAAQ,YAAY,EAAE,MAAM,CAAC,KAAK;AAClC,QAAQ,YAAY,EAAE,gBAAgB;AACtC,QAAQ,YAAY,EAAE,MAAM,gBAAgB,CAAC,IAAI,CAAC;AAClD,QAAQ,OAAO,EAAE,gBAAgB;AACjC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAClB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;;"}
|
|
1
|
+
{"version":3,"file":"sub-menu.js","sources":["../../../../../../packages/components/menu/src/sub-menu.ts"],"sourcesContent":["import {\n Fragment,\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n vShow,\n watch,\n withDirectives,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n buildProps,\n iconPropType,\n isString,\n throwError,\n} from '@element-plus/utils'\nimport { useDeprecated, useNamespace } from '@element-plus/hooks'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { CSSProperties, ExtractPropTypes, VNodeArrayChildren } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n index: {\n type: String,\n required: true,\n },\n showTimeout: {\n type: Number,\n default: 300,\n },\n hideTimeout: {\n type: Number,\n default: 300,\n },\n popperClass: String,\n disabled: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: undefined,\n },\n teleported: {\n type: Boolean,\n default: undefined,\n },\n popperOffset: {\n type: Number,\n default: 6,\n },\n expandCloseIcon: {\n type: iconPropType,\n },\n expandOpenIcon: {\n type: iconPropType,\n },\n collapseCloseIcon: {\n type: iconPropType,\n },\n collapseOpenIcon: {\n type: iconPropType,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes<typeof subMenuProps>\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n useDeprecated(\n {\n from: 'popper-append-to-body',\n replacement: 'teleported',\n scope: COMPONENT_NAME,\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/menu.html#submenu-attributes',\n },\n computed(() => props.popperAppendToBody !== undefined)\n )\n\n const instance = getCurrentInstance()!\n const { indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // inject\n const rootMenu = inject<MenuProvider>('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n let timeout: (() => void) | undefined\n const mouseInChild = ref(false)\n const verticalTitleRef = ref<HTMLDivElement>()\n const vPopper = ref<InstanceType<typeof ElTooltip> | null>(null)\n\n // computed\n const currentPlacement = computed<Placement>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n )\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? props.expandCloseIcon && props.expandOpenIcon\n ? opened.value\n ? props.expandOpenIcon\n : props.expandCloseIcon\n : ArrowDown\n : props.collapseCloseIcon && props.collapseOpenIcon\n ? opened.value\n ? props.collapseOpenIcon\n : props.collapseCloseIcon\n : ArrowRight\n })\n const isFirstLevel = computed(() => {\n return subMenu.level === 0\n })\n const appendToBody = computed(() => {\n const value = props.teleported ?? props.popperAppendToBody\n return value === undefined ? isFirstLevel.value : value\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse\n ? `${nsMenu.namespace.value}-zoom-in-left`\n : `${nsMenu.namespace.value}-zoom-in-top`\n )\n const fallbackPlacements = computed<Placement[]>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'right',\n 'right-end',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() => {\n let isActive = false\n\n Object.values(items.value).forEach((item) => {\n if (item.active) {\n isActive = true\n }\n })\n\n Object.values(subMenus.value).forEach((subItem) => {\n if (subItem.active) {\n isActive = true\n }\n })\n\n return isActive\n })\n\n const backgroundColor = computed(() => rootMenu.props.backgroundColor || '')\n const activeTextColor = computed(() => rootMenu.props.activeTextColor || '')\n const textColor = computed(() => rootMenu.props.textColor || '')\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)\n const titleStyle = computed<CSSProperties>(() => {\n if (mode.value !== 'horizontal') {\n return {\n color: textColor.value,\n }\n }\n return {\n borderBottomColor: active.value\n ? rootMenu.props.activeTextColor\n ? activeTextColor.value\n : ''\n : 'transparent',\n color: active.value ? activeTextColor.value : textColor.value,\n }\n })\n\n // methods\n const doDestroy = () =>\n vPopper.value?.popperRef?.popperInstanceRef?.destroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (!value) {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = props.showTimeout\n ) => {\n if (event.type === 'focus') {\n return\n }\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n return\n }\n subMenu.mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(() => {\n rootMenu.openMenu(props.index, indexPath.value)\n }, showTimeout))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n return\n }\n timeout?.()\n subMenu.mouseInChild.value = false\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n props.hideTimeout\n ))\n\n if (appendToBody.value && deepDispatch) {\n if (instance.parent?.type.name === 'ElSubMenu') {\n subMenu.handleMouseleave?.(true)\n }\n }\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide<SubMenuProvider>(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n mouseInChild,\n level: subMenu.level + 1,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-arrow'),\n style: {\n transform: opened.value\n ? (props.expandCloseIcon && props.expandOpenIcon) ||\n (props.collapseCloseIcon &&\n props.collapseOpenIcon &&\n rootMenu.props.collapse)\n ? 'none'\n : 'rotateZ(180deg)'\n : 'none',\n },\n },\n {\n default: () =>\n isString(subMenuTitleIcon.value)\n ? h(instance.appContext.components[subMenuTitleIcon.value])\n : h(subMenuTitleIcon.value),\n }\n ),\n ]\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n // temporarily mark ElPopper as any due to type inconsistency.\n const child = rootMenu.isMenuPopup\n ? h(\n // TODO: correct popper's type.\n ElTooltip as any,\n {\n ref: vPopper,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: props.popperOffset,\n showArrow: false,\n persistent: true,\n popperClass: props.popperClass,\n placement: currentPlacement.value,\n teleported: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n content: () =>\n h(\n 'div',\n {\n class: [\n nsMenu.m(mode.value),\n nsMenu.m('popup-container'),\n props.popperClass,\n ],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n nsMenu.b(),\n nsMenu.m('popup'),\n nsMenu.m(`popup-${currentPlacement.value}`),\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n default: () =>\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n style: [\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n style: [\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: [nsMenu.b(), nsMenu.m('inline')],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n nsSubMenu.b(),\n nsSubMenu.is('active', active.value),\n nsSubMenu.is('opened', opened.value),\n nsSubMenu.is('disabled', props.disabled),\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(true),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n"],"names":["buildProps","iconPropType","defineComponent","useDeprecated","computed","getCurrentInstance","useMenu","useNamespace","inject","throwError","ref","ArrowDown","ArrowRight","reactive","useMenuCssVar","useTimeoutFn","watch","provide","onMounted","onBeforeUnmount","h","ElIcon","isString","ElTooltip","Fragment","ElCollapseTransition","withDirectives","vShow"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BY,MAAC,YAAY,GAAGA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KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACrD,cAAc,KAAK,EAAE,OAAO,CAAC,KAAK;AAClC,aAAa,EAAE,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAACO,SAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrG,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAC,CAAC;AACT,MAAM,OAAOP,KAAC,CAAC,IAAI,EAAE;AACrB,QAAQ,KAAK,EAAE;AACf,UAAU,SAAS,CAAC,CAAC,EAAE;AACvB,UAAU,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC;AAC9C,UAAU,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC;AAC9C,UAAU,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;AAClD,SAAS;AACT,QAAQ,IAAI,EAAE,UAAU;AACxB,QAAQ,YAAY,EAAE,IAAI;AAC1B,QAAQ,YAAY,EAAE,MAAM,CAAC,KAAK;AAClC,QAAQ,YAAY,EAAE,gBAAgB;AACtC,QAAQ,YAAY,EAAE,MAAM,gBAAgB,CAAC,IAAI,CAAC;AAClD,QAAQ,OAAO,EAAE,gBAAgB;AACjC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAClB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var notify = require('./src/notify.js');
|
|
7
|
-
var notification = require('./src/
|
|
7
|
+
var notification = require('./src/notification2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElNotification = install.withInstallFunction(notify["default"], "$notify");
|
|
@@ -2,77 +2,157 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var core = require('@vueuse/core');
|
|
5
7
|
require('../../../utils/index.js');
|
|
6
|
-
|
|
8
|
+
require('../../../constants/index.js');
|
|
9
|
+
var index = require('../../icon/index.js');
|
|
10
|
+
require('../../config-provider/index.js');
|
|
11
|
+
var notification = require('./notification2.js');
|
|
12
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
+
var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
|
|
7
14
|
var icon = require('../../../utils/vue/icon.js');
|
|
15
|
+
var aria = require('../../../constants/aria.js');
|
|
8
16
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const notificationProps = runtime.buildProps({
|
|
16
|
-
customClass: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: ""
|
|
19
|
-
},
|
|
20
|
-
dangerouslyUseHTMLString: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false
|
|
23
|
-
},
|
|
24
|
-
duration: {
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 4500
|
|
27
|
-
},
|
|
28
|
-
icon: {
|
|
29
|
-
type: icon.iconPropType
|
|
30
|
-
},
|
|
31
|
-
id: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: ""
|
|
34
|
-
},
|
|
35
|
-
message: {
|
|
36
|
-
type: runtime.definePropType([String, Object]),
|
|
37
|
-
default: ""
|
|
38
|
-
},
|
|
39
|
-
offset: {
|
|
40
|
-
type: Number,
|
|
41
|
-
default: 0
|
|
42
|
-
},
|
|
43
|
-
onClick: {
|
|
44
|
-
type: runtime.definePropType(Function),
|
|
45
|
-
default: () => void 0
|
|
46
|
-
},
|
|
47
|
-
onClose: {
|
|
48
|
-
type: runtime.definePropType(Function),
|
|
49
|
-
required: true
|
|
50
|
-
},
|
|
51
|
-
position: {
|
|
52
|
-
type: String,
|
|
53
|
-
values: ["top-right", "top-left", "bottom-right", "bottom-left"],
|
|
54
|
-
default: "top-right"
|
|
55
|
-
},
|
|
56
|
-
showClose: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: true
|
|
59
|
-
},
|
|
60
|
-
title: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: ""
|
|
63
|
-
},
|
|
64
|
-
type: {
|
|
65
|
-
type: String,
|
|
66
|
-
values: [...notificationTypes, ""],
|
|
67
|
-
default: ""
|
|
68
|
-
},
|
|
69
|
-
zIndex: Number
|
|
17
|
+
const _hoisted_1 = ["id"];
|
|
18
|
+
const _hoisted_2 = ["textContent"];
|
|
19
|
+
const _hoisted_3 = { key: 0 };
|
|
20
|
+
const _hoisted_4 = ["innerHTML"];
|
|
21
|
+
const __default__ = vue.defineComponent({
|
|
22
|
+
name: "ElNotification"
|
|
70
23
|
});
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
24
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
25
|
+
...__default__,
|
|
26
|
+
props: notification.notificationProps,
|
|
27
|
+
emits: notification.notificationEmits,
|
|
28
|
+
setup(__props, { expose }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("notification");
|
|
31
|
+
const { nextZIndex, currentZIndex } = zIndex;
|
|
32
|
+
const { Close } = icon.CloseComponents;
|
|
33
|
+
const visible = vue.ref(false);
|
|
34
|
+
let timer = void 0;
|
|
35
|
+
const typeClass = vue.computed(() => {
|
|
36
|
+
const type = props.type;
|
|
37
|
+
return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
|
|
38
|
+
});
|
|
39
|
+
const iconComponent = vue.computed(() => {
|
|
40
|
+
if (!props.type)
|
|
41
|
+
return props.icon;
|
|
42
|
+
return icon.TypeComponentsMap[props.type] || props.icon;
|
|
43
|
+
});
|
|
44
|
+
const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
|
|
45
|
+
const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
|
|
46
|
+
const positionStyle = vue.computed(() => {
|
|
47
|
+
var _a;
|
|
48
|
+
return {
|
|
49
|
+
[verticalProperty.value]: `${props.offset}px`,
|
|
50
|
+
zIndex: (_a = props.zIndex) != null ? _a : currentZIndex.value
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
function startTimer() {
|
|
54
|
+
if (props.duration > 0) {
|
|
55
|
+
;
|
|
56
|
+
({ stop: timer } = core.useTimeoutFn(() => {
|
|
57
|
+
if (visible.value)
|
|
58
|
+
close();
|
|
59
|
+
}, props.duration));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function clearTimer() {
|
|
63
|
+
timer == null ? void 0 : timer();
|
|
64
|
+
}
|
|
65
|
+
function close() {
|
|
66
|
+
visible.value = false;
|
|
67
|
+
}
|
|
68
|
+
function onKeydown({ code }) {
|
|
69
|
+
if (code === aria.EVENT_CODE.delete || code === aria.EVENT_CODE.backspace) {
|
|
70
|
+
clearTimer();
|
|
71
|
+
} else if (code === aria.EVENT_CODE.esc) {
|
|
72
|
+
if (visible.value) {
|
|
73
|
+
close();
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
startTimer();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
vue.onMounted(() => {
|
|
80
|
+
startTimer();
|
|
81
|
+
nextZIndex();
|
|
82
|
+
visible.value = true;
|
|
83
|
+
});
|
|
84
|
+
core.useEventListener(document, "keydown", onKeydown);
|
|
85
|
+
expose({
|
|
86
|
+
visible,
|
|
87
|
+
close
|
|
88
|
+
});
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
91
|
+
name: vue.unref(ns).b("fade"),
|
|
92
|
+
onBeforeLeave: _ctx.onClose,
|
|
93
|
+
onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
|
|
94
|
+
persisted: ""
|
|
95
|
+
}, {
|
|
96
|
+
default: vue.withCtx(() => [
|
|
97
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
98
|
+
id: _ctx.id,
|
|
99
|
+
class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
|
|
100
|
+
style: vue.normalizeStyle(vue.unref(positionStyle)),
|
|
101
|
+
role: "alert",
|
|
102
|
+
onMouseenter: clearTimer,
|
|
103
|
+
onMouseleave: startTimer,
|
|
104
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
105
|
+
}, [
|
|
106
|
+
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
107
|
+
key: 0,
|
|
108
|
+
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
|
|
109
|
+
}, {
|
|
110
|
+
default: vue.withCtx(() => [
|
|
111
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
115
|
+
vue.createElementVNode("div", {
|
|
116
|
+
class: vue.normalizeClass(vue.unref(ns).e("group"))
|
|
117
|
+
}, [
|
|
118
|
+
vue.createElementVNode("h2", {
|
|
119
|
+
class: vue.normalizeClass(vue.unref(ns).e("title")),
|
|
120
|
+
textContent: vue.toDisplayString(_ctx.title)
|
|
121
|
+
}, null, 10, _hoisted_2),
|
|
122
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
123
|
+
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
124
|
+
style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
125
|
+
}, [
|
|
126
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
127
|
+
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
128
|
+
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
129
|
+
vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
130
|
+
], 2112))
|
|
131
|
+
])
|
|
132
|
+
], 6), [
|
|
133
|
+
[vue.vShow, _ctx.message]
|
|
134
|
+
]),
|
|
135
|
+
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
136
|
+
key: 0,
|
|
137
|
+
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
|
|
138
|
+
onClick: vue.withModifiers(close, ["stop"])
|
|
139
|
+
}, {
|
|
140
|
+
default: vue.withCtx(() => [
|
|
141
|
+
vue.createVNode(vue.unref(Close))
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
145
|
+
], 2)
|
|
146
|
+
], 46, _hoisted_1), [
|
|
147
|
+
[vue.vShow, visible.value]
|
|
148
|
+
])
|
|
149
|
+
]),
|
|
150
|
+
_: 3
|
|
151
|
+
}, 8, ["name", "onBeforeLeave"]);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);
|
|
74
156
|
|
|
75
|
-
exports
|
|
76
|
-
exports.notificationProps = notificationProps;
|
|
77
|
-
exports.notificationTypes = notificationTypes;
|
|
157
|
+
exports["default"] = NotificationConstructor;
|
|
78
158
|
//# sourceMappingURL=notification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.
|
|
1
|
+
{"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n :class=\"[ns.b(), customClass, horizontalClass]\"\n :style=\"positionStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n @click=\"onClick\"\n >\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('group')\">\n <h2 :class=\"ns.e('title')\" v-text=\"title\" />\n <div\n v-show=\"message\"\n :class=\"ns.e('content')\"\n :style=\"!!title ? undefined : { margin: 0 }\"\n >\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else v-html=\"message\" />\n </slot>\n </div>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { CloseComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { notificationEmits, notificationProps } from './notification'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElNotification',\n})\n\nconst props = defineProps(notificationProps)\ndefineEmits(notificationEmits)\n\nconst { ns, zIndex } = useGlobalComponentSettings('notification')\nconst { nextZIndex, currentZIndex } = zIndex\n\nconst { Close } = CloseComponents\n\nconst visible = ref(false)\nlet timer: (() => void) | undefined = undefined\n\nconst typeClass = computed(() => {\n const type = props.type\n return type && TypeComponentsMap[props.type] ? ns.m(type) : ''\n})\n\nconst iconComponent = computed(() => {\n if (!props.type) return props.icon\n return TypeComponentsMap[props.type] || props.icon\n})\n\nconst horizontalClass = computed(() =>\n props.position.endsWith('right') ? 'right' : 'left'\n)\n\nconst verticalProperty = computed(() =>\n props.position.startsWith('top') ? 'top' : 'bottom'\n)\n\nconst positionStyle = computed<CSSProperties>(() => {\n return {\n [verticalProperty.value]: `${props.offset}px`,\n zIndex: props.zIndex ?? currentZIndex.value,\n }\n})\n\nfunction startTimer() {\n if (props.duration > 0) {\n ;({ stop: timer } = useTimeoutFn(() => {\n if (visible.value) close()\n }, props.duration))\n }\n}\n\nfunction clearTimer() {\n timer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction onKeydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {\n clearTimer() // press delete/backspace clear timer\n } else if (code === EVENT_CODE.esc) {\n // press esc to close the notification\n if (visible.value) {\n close()\n }\n } else {\n startTimer() // resume timer\n }\n}\n\n// lifecycle\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nuseEventListener(document, 'keydown', onKeydown)\n\ndefineExpose({\n visible,\n /** @description close notification */\n close,\n})\n</script>\n"],"names":["useGlobalComponentSettings","CloseComponents","ref","computed","TypeComponentsMap","useTimeoutFn","EVENT_CODE","onMounted","useEventListener"],"mappings":";;;;;;;;;;;;;;;;;;;;uCAkDc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,EAAE,EAAA,EAAI,MAAW,EAAA,GAAAA,0CAAA,CAA2B,cAAc,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A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,157 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
require('../../../
|
|
9
|
-
var index = require('../../icon/index.js');
|
|
10
|
-
require('../../config-provider/index.js');
|
|
11
|
-
var notification = require('./notification.js');
|
|
12
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
-
var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
14
7
|
var icon = require('../../../utils/vue/icon.js');
|
|
15
|
-
var aria = require('../../../constants/aria.js');
|
|
16
8
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
const notificationTypes = [
|
|
10
|
+
"success",
|
|
11
|
+
"info",
|
|
12
|
+
"warning",
|
|
13
|
+
"error"
|
|
14
|
+
];
|
|
15
|
+
const notificationProps = runtime.buildProps({
|
|
16
|
+
customClass: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
dangerouslyUseHTMLString: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
duration: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 4500
|
|
27
|
+
},
|
|
28
|
+
icon: {
|
|
29
|
+
type: icon.iconPropType
|
|
30
|
+
},
|
|
31
|
+
id: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
message: {
|
|
36
|
+
type: runtime.definePropType([String, Object]),
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
offset: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 0
|
|
42
|
+
},
|
|
43
|
+
onClick: {
|
|
44
|
+
type: runtime.definePropType(Function),
|
|
45
|
+
default: () => void 0
|
|
46
|
+
},
|
|
47
|
+
onClose: {
|
|
48
|
+
type: runtime.definePropType(Function),
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
position: {
|
|
52
|
+
type: String,
|
|
53
|
+
values: ["top-right", "top-left", "bottom-right", "bottom-left"],
|
|
54
|
+
default: "top-right"
|
|
55
|
+
},
|
|
56
|
+
showClose: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: true
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ""
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
type: String,
|
|
66
|
+
values: [...notificationTypes, ""],
|
|
67
|
+
default: ""
|
|
68
|
+
},
|
|
69
|
+
zIndex: Number
|
|
23
70
|
});
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
emits: notification.notificationEmits,
|
|
28
|
-
setup(__props, { expose }) {
|
|
29
|
-
const props = __props;
|
|
30
|
-
const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("notification");
|
|
31
|
-
const { nextZIndex, currentZIndex } = zIndex;
|
|
32
|
-
const { Close } = icon.CloseComponents;
|
|
33
|
-
const visible = vue.ref(false);
|
|
34
|
-
let timer = void 0;
|
|
35
|
-
const typeClass = vue.computed(() => {
|
|
36
|
-
const type = props.type;
|
|
37
|
-
return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
|
|
38
|
-
});
|
|
39
|
-
const iconComponent = vue.computed(() => {
|
|
40
|
-
if (!props.type)
|
|
41
|
-
return props.icon;
|
|
42
|
-
return icon.TypeComponentsMap[props.type] || props.icon;
|
|
43
|
-
});
|
|
44
|
-
const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
|
|
45
|
-
const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
|
|
46
|
-
const positionStyle = vue.computed(() => {
|
|
47
|
-
var _a;
|
|
48
|
-
return {
|
|
49
|
-
[verticalProperty.value]: `${props.offset}px`,
|
|
50
|
-
zIndex: (_a = props.zIndex) != null ? _a : currentZIndex.value
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
|
-
function startTimer() {
|
|
54
|
-
if (props.duration > 0) {
|
|
55
|
-
;
|
|
56
|
-
({ stop: timer } = core.useTimeoutFn(() => {
|
|
57
|
-
if (visible.value)
|
|
58
|
-
close();
|
|
59
|
-
}, props.duration));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function clearTimer() {
|
|
63
|
-
timer == null ? void 0 : timer();
|
|
64
|
-
}
|
|
65
|
-
function close() {
|
|
66
|
-
visible.value = false;
|
|
67
|
-
}
|
|
68
|
-
function onKeydown({ code }) {
|
|
69
|
-
if (code === aria.EVENT_CODE.delete || code === aria.EVENT_CODE.backspace) {
|
|
70
|
-
clearTimer();
|
|
71
|
-
} else if (code === aria.EVENT_CODE.esc) {
|
|
72
|
-
if (visible.value) {
|
|
73
|
-
close();
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
startTimer();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
vue.onMounted(() => {
|
|
80
|
-
startTimer();
|
|
81
|
-
nextZIndex();
|
|
82
|
-
visible.value = true;
|
|
83
|
-
});
|
|
84
|
-
core.useEventListener(document, "keydown", onKeydown);
|
|
85
|
-
expose({
|
|
86
|
-
visible,
|
|
87
|
-
close
|
|
88
|
-
});
|
|
89
|
-
return (_ctx, _cache) => {
|
|
90
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
91
|
-
name: vue.unref(ns).b("fade"),
|
|
92
|
-
onBeforeLeave: _ctx.onClose,
|
|
93
|
-
onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
|
|
94
|
-
persisted: ""
|
|
95
|
-
}, {
|
|
96
|
-
default: vue.withCtx(() => [
|
|
97
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
98
|
-
id: _ctx.id,
|
|
99
|
-
class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
|
|
100
|
-
style: vue.normalizeStyle(vue.unref(positionStyle)),
|
|
101
|
-
role: "alert",
|
|
102
|
-
onMouseenter: clearTimer,
|
|
103
|
-
onMouseleave: startTimer,
|
|
104
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
105
|
-
}, [
|
|
106
|
-
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
107
|
-
key: 0,
|
|
108
|
-
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
|
|
109
|
-
}, {
|
|
110
|
-
default: vue.withCtx(() => [
|
|
111
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
112
|
-
]),
|
|
113
|
-
_: 1
|
|
114
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
115
|
-
vue.createElementVNode("div", {
|
|
116
|
-
class: vue.normalizeClass(vue.unref(ns).e("group"))
|
|
117
|
-
}, [
|
|
118
|
-
vue.createElementVNode("h2", {
|
|
119
|
-
class: vue.normalizeClass(vue.unref(ns).e("title")),
|
|
120
|
-
textContent: vue.toDisplayString(_ctx.title)
|
|
121
|
-
}, null, 10, _hoisted_2),
|
|
122
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
123
|
-
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
124
|
-
style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
125
|
-
}, [
|
|
126
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
127
|
-
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
128
|
-
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
129
|
-
vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
130
|
-
], 2112))
|
|
131
|
-
])
|
|
132
|
-
], 6), [
|
|
133
|
-
[vue.vShow, _ctx.message]
|
|
134
|
-
]),
|
|
135
|
-
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
136
|
-
key: 0,
|
|
137
|
-
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
|
|
138
|
-
onClick: vue.withModifiers(close, ["stop"])
|
|
139
|
-
}, {
|
|
140
|
-
default: vue.withCtx(() => [
|
|
141
|
-
vue.createVNode(vue.unref(Close))
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
145
|
-
], 2)
|
|
146
|
-
], 46, _hoisted_1), [
|
|
147
|
-
[vue.vShow, visible.value]
|
|
148
|
-
])
|
|
149
|
-
]),
|
|
150
|
-
_: 3
|
|
151
|
-
}, 8, ["name", "onBeforeLeave"]);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);
|
|
71
|
+
const notificationEmits = {
|
|
72
|
+
destroy: () => true
|
|
73
|
+
};
|
|
156
74
|
|
|
157
|
-
exports
|
|
75
|
+
exports.notificationEmits = notificationEmits;
|
|
76
|
+
exports.notificationProps = notificationProps;
|
|
77
|
+
exports.notificationTypes = notificationTypes;
|
|
158
78
|
//# sourceMappingURL=notification2.js.map
|