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.6 KiB

1 month ago
  1. {"ast":null,"code":"import { tourContentProps } from './content.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { iconPropType } from '../../../utils/vue/icon.mjs';\nimport { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';\nimport { isBoolean, isNumber } from '../../../utils/types.mjs';\nconst tourProps = buildProps({\n modelValue: Boolean,\n current: {\n type: Number,\n default: 0\n },\n showArrow: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n closeIcon: {\n type: iconPropType\n },\n placement: tourContentProps.placement,\n contentStyle: {\n type: definePropType([Object])\n },\n mask: {\n type: definePropType([Boolean, Object]),\n default: true\n },\n gap: {\n type: definePropType(Object),\n default: () => ({\n offset: 6,\n radius: 2\n })\n },\n zIndex: {\n type: Number\n },\n scrollIntoViewOptions: {\n type: definePropType([Boolean, Object]),\n default: () => ({\n block: \"center\"\n })\n },\n type: {\n type: definePropType(String)\n },\n appendTo: {\n type: definePropType([String, Object]),\n default: \"body\"\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n targetAreaClickable: {\n type: Boolean,\n default: true\n }\n});\nconst tourEmits = {\n [UPDATE_MODEL_EVENT]: value => isBoolean(value),\n [\"update:current\"]: current => isNumber(current),\n close: current => isNumber(current),\n finish: () => true,\n change: current => isNumber(current)\n};\nexport { tourEmits, tourProps };","map":{"version":3,"names":["tourProps","buildProps","modelValue","Boolean","current","type","Number","default","showArrow","showClose","closeIcon","iconPropType","placement","tourContentProps","contentStyle","definePropType","Object","mask","gap","offset","radius","zIndex","scrollIntoViewOptions","block","String","appendTo","closeOnPressEscape","targetAreaClickable","tourEmits","UPDATE_MODEL_EVENT","value","isBoolean","isNumber","close","finish","change"],"sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n de