element-plus
Version:
A Component Library for Vue 3
1 lines • 2.09 kB
Source Map (JSON)
{"version":3,"file":"dialog-content2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div\n ref=\"dialogRef\"\n :class=\"[\n ns.b(),\n ns.is('fullscreen', fullscreen),\n ns.is('draggable', draggable),\n { [ns.m('center')]: center },\n customClass,\n ]\"\n aria-modal=\"true\"\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n :style=\"style\"\n @click.stop\n >\n <div ref=\"headerRef\" :class=\"ns.e('header')\">\n <slot name=\"title\">\n <span :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </div>\n <div :class=\"ns.e('body')\">\n <slot />\n </div>\n <div v-if=\"$slots.footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\" />\n </div>\n <button\n v-if=\"showClose\"\n aria-label=\"close\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n @click=\"$emit('close')\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </el-icon>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents } from '@element-plus/utils'\nimport { dialogInjectionKey } from '@element-plus/tokens'\nimport { dialogContentEmits, dialogContentProps } from './dialog-content'\n\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'ElDialogContent' })\ndefineProps(dialogContentProps)\ndefineEmits(dialogContentEmits)\n\nconst { dialogRef, headerRef, ns, style } = inject(dialogInjectionKey)!\n// const { focusTrapRef, onKeydown } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\n// const composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkDA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAA,eAAA,CAAA;AAMA,IAAA,MAAA,EAAA,SAAA,EAAA,SAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAA,OAAA,kBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}