UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 1.4 kB
{"version":3,"file":"affix.mjs","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils/props'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\n\nexport const affixProps = buildProps({\n zIndex: {\n type: definePropType<ZIndexProperty>([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} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n typeof scrollTop === 'number' && typeof fixed === 'boolean',\n change: (fixed: boolean) => typeof fixed === 'boolean',\n}\nexport type AffixEmits = typeof affixEmits\n"],"names":[],"mappings":";;MAKa,aAAa,WAAW;AAAA,EACnC,QAAQ;AAAA,IACN,MAAM,eAA+B,CAAC,QAAQ;AAAA,IAC9C,SAAS;AAAA;AAAA,EAEX,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,UAAU;AAAA,IACR,MAAM;AAAA,IACN,QAAQ,CAAC,OAAO;AAAA,IAChB,SAAS;AAAA;AAAA;MAKA,aAAa;AAAA,EACxB,QAAQ,CAAC,EAAE,WAAW,YACpB,OAAO,cAAc,YAAY,OAAO,UAAU;AAAA,EACpD,QAAQ,CAAC,UAAmB,OAAO,UAAU;AAAA;;;;"}