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.

1 lines
3.9 KiB

{"ast":null,"code":"import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { isString } from '@vue/shared';\nimport { isUndefined } from '../../../utils/types.mjs';\nconst anchorProps = buildProps({\n container: {\n type: definePropType([String, Object])\n },\n offset: {\n type: Number,\n default: 0\n },\n bound: {\n type: Number,\n default: 15\n },\n duration: {\n type: Number,\n default: 300\n },\n marker: {\n type: Boolean,\n default: true\n },\n type: {\n type: definePropType(String),\n default: \"default\"\n },\n direction: {\n type: definePropType(String),\n default: \"vertical\"\n },\n selectScrollTop: {\n type: Boolean,\n default: false\n }\n});\nconst anchorEmits = {\n change: href => isString(href),\n click: (e, href) => e instanceof MouseEvent && (isString(href) || isUndefined(href))\n};\nexport { anchorEmits, anchorProps };","map":{"version":3,"names":["anchorProps","buildProps","container","type","definePropType","String","Object","offset","Number","default","bound","duration","marker","Boolean","direction","selectScrollTop","anchorEmits","change","href","isString","click","e","MouseEvent","isUndefined"],"sources":["../../../../../../packages/components/anchor/src/anchor.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isString,\n isUndefined,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Anchor from './anchor.vue'\n\nexport const anchorProps = buildProps({\n /**\n * @description scroll container\n */\n container: {\n type: definePropType<string | HTMLElement | Window | null>([\n String,\n Object,\n ]),\n },\n /**\n * @description Set the offset of the anchor scroll\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description The offset of the element starting to trigger the anchor\n */\n bound: {\n type: Number,\n default: 15,\n },\n /**\n * @description Set the scroll duration of the container when the anchor is clicked, in milliseconds\n */\n duration: {\n type: Number,\n default: 300,\n },\n /**\n * @description Whether to show the marker\n */\n marker: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Set Anchor type\n */\n type: {\n type: definePropType<'default' | 'underline'>(String),\n default: 'default',\n },\n /**\n * @description Set Anchor direction\n */\n direction: {\n type: definePropType<'vertical' | 'horizontal'>(String),\n default: 'vertical',\n },\n /**\n * @description Scroll whether link is selected at the top\n */\n selectScrollTop: {\n type: Boolean,\n default: false,\n },\n})\n\nexport type AnchorProps = ExtractPropTypes<typeof anchorProps>\nexport type AnchorInstance = InstanceType<typeof Anchor>\n\nexport const anchorEmits = {\n change: (href: string) => isString(href),\n click: (e: MouseEvent, href?: string) =>\n e instanceof MouseEvent && (isString(href) || isUndefined(href)),\n}\nexport type AnchorEmits = typeof anchorEmits\n"],"mappings":";;;AAMY,MAACA,WAAW,GAAGC,UAAU,CAAC;EACpCC,SAAS,EAAE;IACTC,IAAI,EAAEC,cAAc,CAAC,CACnBC,MAAM,EACNC,MAAM,CACP;EACL,CAAG;EACDC,MAAM,EAAE;IACNJ,IAAI,EAAEK,MAAM;IACZC,OAAO,EAAE;EACb,CAAG;EACDC,KAAK,EAAE;IACLP,IAAI,EAAEK,MAAM;IACZC,OAAO,EAAE;EACb,CAAG;EACDE,QAAQ,EAAE;IACRR,IAAI,EAAEK,MAAM;IACZC,OAAO,EAAE;EACb,CAAG;EACDG,MAAM,EAAE;IACNT,IAAI,EAAEU,OAAO;IACbJ,OAAO,EAAE;EACb,CAAG;EACDN,IAAI,EAAE;IACJA,IAAI,EAAEC,cAAc,CAACC,MAAM,CAAC;IAC5BI,OAAO,EAAE;EACb,CAAG;EACDK,SAAS,EAAE;IACTX,IAAI,EAAEC,cAAc,CAACC,MAAM,CAAC;IAC5BI,OAAO,EAAE;EACb,CAAG;EACDM,eAAe,EAAE;IACfZ,IAAI,EAAEU,OAAO;IACbJ,OAAO,EAAE;EACb;AACA,CAAC;AACW,MAACO,WAAW,GAAG;EACzBC,MAAM,EAAGC,IAAI,IAAKC,QAAQ,CAACD,IAAI,CAAC;EAChCE,KAAK,EAAEA,CAACC,CAAC,EAAEH,IAAI,KAAKG,CAAC,YAAYC,UAAU,KAAKH,QAAQ,CAACD,IAAI,CAAC,IAAIK,WAAW,CAACL,IAAI,CAAC;AACrF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}