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
2.9 KiB

{"ast":null,"code":"import { CHANGE_EVENT } from '../../../constants/event.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { isNumber, isBoolean } from '../../../utils/types.mjs';\nconst affixProps = buildProps({\n zIndex: {\n type: definePropType([Number, String]),\n default: 100\n },\n target: {\n type: String,\n default: \"\"\n },\n offset: {\n type: Number,\n default: 0\n },\n position: {\n type: String,\n values: [\"top\", \"bottom\"],\n default: \"top\"\n }\n});\nconst affixEmits = {\n scroll: ({\n scrollTop,\n fixed\n }) => isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: fixed => isBoolean(fixed)\n};\nexport { affixEmits, affixProps };","map":{"version":3,"names":["affixProps","buildProps","zIndex","type","definePropType","Number","String","default","target","offset","position","values","affixEmits","scroll","scrollTop","fixed","isNumber","isBoolean","CHANGE_EVENT"],"sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"mappings":";;;AAOY,MAACA,UAAU,GAAGC,UAAU,CAAC;EACnCC,MAAM,EAAE;IACNC,IAAI,EAAEC,cAAc,CAAC,CAACC,MAAM,EAAEC,MAAM,CAAC,CAAC;IACtCC,OAAO,EAAE;EACb,CAAG;EACDC,MAAM,EAAE;IACNL,IAAI,EAAEG,MAAM;IACZC,OAAO,EAAE;EACb,CAAG;EACDE,MAAM,EAAE;IACNN,IAAI,EAAEE,MAAM;IACZE,OAAO,EAAE;EACb,CAAG;EACDG,QAAQ,EAAE;IACRP,IAAI,EAAEG,MAAM;IACZK,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzBJ,OAAO,EAAE;EACb;AACA,CAAC;AACW,MAACK,UAAU,GAAG;EACxBC,MAAM,EAAEA,CAAC;IAAEC,SAAS;IAAEC;EAAK,CAAE,KAAKC,QAAQ,CAACF,SAAS,CAAC,IAAIG,SAAS,CAACF,KAAK,CAAC;EACzE,CAACG,YAAY,GAAIH,KAAK,IAAKE,SAAS,CAACF,KAAK;AAC5C","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}