index.d.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. export declare const ElAnchor: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
  2. container: {
  3. readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Window | HTMLElement | null) & {}) | (() => string | Window | HTMLElement | null) | ((new (...args: any[]) => (string | Window | HTMLElement | null) & {}) | (() => string | Window | HTMLElement | null))[], unknown, unknown>>;
  4. readonly required: false;
  5. readonly validator: ((val: unknown) => boolean) | undefined;
  6. __epPropKey: true;
  7. };
  8. offset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  9. bound: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  10. duration: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  11. marker: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
  12. type: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline") | ((new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline"))[], unknown, unknown, string, boolean>;
  13. direction: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal") | ((new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal"))[], unknown, unknown, string, boolean>;
  14. }, {
  15. props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
  16. container: {
  17. readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Window | HTMLElement | null) & {}) | (() => string | Window | HTMLElement | null) | ((new (...args: any[]) => (string | Window | HTMLElement | null) & {}) | (() => string | Window | HTMLElement | null))[], unknown, unknown>>;
  18. readonly required: false;
  19. readonly validator: ((val: unknown) => boolean) | undefined;
  20. __epPropKey: true;
  21. };
  22. offset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  23. bound: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  24. duration: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  25. marker: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
  26. type: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline") | ((new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline"))[], unknown, unknown, string, boolean>;
  27. direction: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal") | ((new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal"))[], unknown, unknown, string, boolean>;
  28. }>> & {
  29. onChange?: ((href: string) => any) | undefined;
  30. onClick?: ((e: MouseEvent, href?: string | undefined) => any) | undefined;
  31. }>>;
  32. emit: ((event: "change", href: string) => void) & ((event: "click", e: MouseEvent, href?: string | undefined) => void);
  33. currentAnchor: import("vue").Ref<string>;
  34. anchorRef: import("vue").Ref<HTMLElement | null>;
  35. markerRef: import("vue").Ref<HTMLElement | null>;
  36. containerEl: import("vue").Ref<Window | HTMLElement | undefined>;
  37. links: Record<string, HTMLElement>;
  38. isScrolling: boolean;
  39. currentScrollTop: number;
  40. ns: {
  41. namespace: import("vue").ComputedRef<string>;
  42. b: (blockSuffix?: string) => string;
  43. e: (element?: string | undefined) => string;
  44. m: (modifier?: string | undefined) => string;
  45. be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
  46. em: (element?: string | undefined, modifier?: string | undefined) => string;
  47. bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
  48. bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
  49. is: {
  50. (name: string, state: boolean | undefined): string;
  51. (name: string): string;
  52. };
  53. cssVar: (object: Record<string, string>) => Record<string, string>;
  54. cssVarName: (name: string) => string;
  55. cssVarBlock: (object: Record<string, string>) => Record<string, string>;
  56. cssVarBlockName: (name: string) => string;
  57. };
  58. cls: import("vue").ComputedRef<string[]>;
  59. addLink: (state: import("./src/constants").AnchorLinkState) => void;
  60. removeLink: (href: string) => void;
  61. setCurrentAnchor: (href: string) => void;
  62. clearAnimate: null;
  63. scrollToAnchor: (href: string) => void;
  64. scrollTo: (href?: string | undefined) => void;
  65. handleClick: (e: MouseEvent, href?: string | undefined) => void;
  66. handleScroll: {
  67. (...args: any[]): void;
  68. cancel(): void;
  69. };
  70. getCurrentHref: () => string | undefined;
  71. getContainer: () => void;
  72. markerStyle: import("vue").ComputedRef<{
  73. left?: undefined;
  74. width?: undefined;
  75. opacity?: undefined;
  76. top?: undefined;
  77. } | {
  78. left: string;
  79. width: string;
  80. opacity: number;
  81. top?: undefined;
  82. } | {
  83. top: string;
  84. opacity: number;
  85. left?: undefined;
  86. width?: undefined;
  87. }>;
  88. }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
  89. change: (href: string) => boolean;
  90. click: (e: MouseEvent, href?: string | undefined) => boolean;
  91. }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
  92. container: {
  93. readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Window | HTMLElement | null) & {}) | (() => string | Window | HTMLElement | null) | ((new (...args: any[]) => (string | Window | HTMLElement | null) & {}) | (() => string | Window | HTMLElement | null))[], unknown, unknown>>;
  94. readonly required: false;
  95. readonly validator: ((val: unknown) => boolean) | undefined;
  96. __epPropKey: true;
  97. };
  98. offset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  99. bound: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  100. duration: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
  101. marker: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
  102. type: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline") | ((new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline"))[], unknown, unknown, string, boolean>;
  103. direction: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal") | ((new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal"))[], unknown, unknown, string, boolean>;
  104. }>> & {
  105. onChange?: ((href: string) => any) | undefined;
  106. onClick?: ((e: MouseEvent, href?: string | undefined) => any) | undefined;
  107. }, {
  108. type: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline") | ((new (...args: any[]) => ("default" | "underline") & {}) | (() => "default" | "underline"))[], unknown, unknown>;
  109. offset: number;
  110. bound: number;
  111. duration: number;
  112. marker: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
  113. direction: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal") | ((new (...args: any[]) => ("vertical" | "horizontal") & {}) | (() => "vertical" | "horizontal"))[], unknown, unknown>;
  114. }>> & {
  115. AnchorLink: import("vue").DefineComponent<{
  116. title: StringConstructor;
  117. href: StringConstructor;
  118. }, {
  119. props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
  120. title: StringConstructor;
  121. href: StringConstructor;
  122. }>> & {
  123. [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
  124. }>>;
  125. linkRef: import("vue").Ref<HTMLElement | null>;
  126. ns: {
  127. namespace: import("vue").ComputedRef<string>;
  128. b: (blockSuffix?: string) => string;
  129. e: (element?: string | undefined) => string;
  130. m: (modifier?: string | undefined) => string;
  131. be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
  132. em: (element?: string | undefined, modifier?: string | undefined) => string;
  133. bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
  134. bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
  135. is: {
  136. (name: string, state: boolean | undefined): string;
  137. (name: string): string;
  138. };
  139. cssVar: (object: Record<string, string>) => Record<string, string>;
  140. cssVarName: (name: string) => string;
  141. cssVarBlock: (object: Record<string, string>) => Record<string, string>;
  142. cssVarBlockName: (name: string) => string;
  143. };
  144. direction: string;
  145. currentAnchor: import("vue").Ref<string>;
  146. addLink: (state: import("./src/constants").AnchorLinkState) => void;
  147. removeLink: (href: string) => void;
  148. contextHandleClick: (e: MouseEvent, href?: string | undefined) => void;
  149. cls: import("vue").ComputedRef<string[]>;
  150. handleClick: (e: MouseEvent) => void;
  151. }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
  152. title: StringConstructor;
  153. href: StringConstructor;
  154. }>>, {}>;
  155. };
  156. export declare const ElAnchorLink: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
  157. title: StringConstructor;
  158. href: StringConstructor;
  159. }, {
  160. props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
  161. title: StringConstructor;
  162. href: StringConstructor;
  163. }>> & {
  164. [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
  165. }>>;
  166. linkRef: import("vue").Ref<HTMLElement | null>;
  167. ns: {
  168. namespace: import("vue").ComputedRef<string>;
  169. b: (blockSuffix?: string) => string;
  170. e: (element?: string | undefined) => string;
  171. m: (modifier?: string | undefined) => string;
  172. be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
  173. em: (element?: string | undefined, modifier?: string | undefined) => string;
  174. bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
  175. bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
  176. is: {
  177. (name: string, state: boolean | undefined): string;
  178. (name: string): string;
  179. };
  180. cssVar: (object: Record<string, string>) => Record<string, string>;
  181. cssVarName: (name: string) => string;
  182. cssVarBlock: (object: Record<string, string>) => Record<string, string>;
  183. cssVarBlockName: (name: string) => string;
  184. };
  185. direction: string;
  186. currentAnchor: import("vue").Ref<string>;
  187. addLink: (state: import("./src/constants").AnchorLinkState) => void;
  188. removeLink: (href: string) => void;
  189. contextHandleClick: (e: MouseEvent, href?: string | undefined) => void;
  190. cls: import("vue").ComputedRef<string[]>;
  191. handleClick: (e: MouseEvent) => void;
  192. }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
  193. title: StringConstructor;
  194. href: StringConstructor;
  195. }>>, {}>>;
  196. export default ElAnchor;
  197. export * from './src/anchor';