1 line
5.7 KiB
Plaintext
1 line
5.7 KiB
Plaintext
|
|
{"version":3,"file":"tour.mjs","names":[],"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'\n\nimport type { TourContentProps } from './content'\nimport type { CSSProperties, ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport interface TourProps {\n /**\n * @description open tour\n */\n modelValue?: boolean\n /**\n * @description what is the current step\n */\n current?: number\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description custom close icon\n */\n closeIcon?: IconPropType\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?: CSSProperties\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask?: TourMask\n /**\n * @description transparent gap between mask and target\n */\n gap?: TourGap\n /**\n * @description tour's zIndex\n */\n zIndex?: number\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions?: boolean | ScrollIntoViewOptions\n /**\n * @description type, affects the background color and text color\n */\n type?: 'default' | 'primary'\n /**\n * @description which element the TourContent appends to\n */\n appendTo?: string | HTMLElement\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape?: boolean\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\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 default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElemen
|