You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
6.7 KiB

3 months ago
  1. {"ast":null,"code":"import { dialogContentProps } from './dialog-content.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';\nimport { isBoolean } from '../../../utils/types.mjs';\nconst dialogProps = buildProps({\n ...dialogContentProps,\n appendToBody: Boolean,\n appendTo: {\n type: definePropType([String, Object]),\n default: \"body\"\n },\n beforeClose: {\n type: definePropType(Function)\n },\n destroyOnClose: Boolean,\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n modal: {\n type: Boolean,\n default: true\n },\n openDelay: {\n type: Number,\n default: 0\n },\n closeDelay: {\n type: Number,\n default: 0\n },\n top: {\n type: String\n },\n modelValue: Boolean,\n modalClass: String,\n headerClass: String,\n bodyClass: String,\n footerClass: String,\n width: {\n type: [String, Number]\n },\n zIndex: {\n type: Number\n },\n trapFocus: Boolean,\n headerAriaLevel: {\n type: String,\n default: \"2\"\n }\n});\nconst dialogEmits = {\n open: () => true,\n opened: () => true,\n close: () => true,\n closed: () => true,\n [UPDATE_MODEL_EVENT]: value => isBoolean(value),\n openAutoFocus: () => true,\n closeAutoFocus: () => true\n};\nexport { dialogEmits, dialogProps };","map":{"version":3,"names":["dialogProps","buildProps","dialogContentProps","appendToBody","Boolean","appendTo","type","definePropType","String","Object","default","beforeClose","Function","destroyOnClose","closeOnClickModal","closeOnPressEscape","lockScroll","modal","openDelay","Number","closeDelay","top","modelValue","modalClass","headerClass","bodyClass","footerClass","width","zIndex","trapFocus","headerAriaLevel","dialogEmits","open","opened","close","closed","UPDATE_MODEL_EVENT","value","isBoolean","openAutoFocus","closeAutoFocus"],"sources":["../../../../../../packages/components/dialog/src/dialog.ts"],"sourcesContent":["import { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { dialogContentProps } from './dialog-content'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Dialog from './dialog.vue'\n\ntype DoneFn = (cancel?: boolean) => void\nexport type DialogBeforeCloseFn = (done: DoneFn) => void\n\nexport const dialogProps = buildProps({\n ...dialogContentProps,\n /**\n * @description whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`\n */\n appendToBody: Boolean,\n /**\n * @description which element the Dialog appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description callback before Dialog closes, and it will prevent Dialog from closing, use done to close the dialog\n */\n beforeClose: {\n type: definePropType<DialogBeforeCloseFn>(Function),\n },\n /**\n * @description destroy elements in Dialog when closed\n */\n destroyOnClose: Boolean,\n /**\n * @description whether the Dialog can be closed by clicking the mask\n */\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the Dialog can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether scroll of body is disabled while Dialog is displayed\n */\n lockScroll: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether a mask is displayed\n */\n modal: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the Time(milliseconds) before open\n */\n openDelay: {\n type: Number,\n default: 0,\n },\n /**\n * @description the Time(milliseconds) before close\n */\n closeDelay: {\n type: Number,\n default: 0,\n },\