/** * Vue 相关的工具函数 * @description 获取组件名、添加安装方法等 */ import type { Component, Plugin, Directive } from 'vue'; import type { SFCWithInstall } from './types'; /** * 为组件添加 install 方法,使其可以作为 Vue 插件使用 */ export declare const withInstall: >(main: T, extra?: E) => SFCWithInstall & E; /** * 空安装方法,用于不需要独立安装的子组件 */ export declare const withNoopInstall: (component: T) => SFCWithInstall; /** * 为函数式组件或工具添加 install 方法 */ export declare const withInstallFunction: (fn: T, name: string) => SFCWithInstall; /** * 为指令添加 install 方法 */ export declare const withInstallDirective: (directive: T, name: string) => SFCWithInstall; /** * 批量注册组件和指令 */ export declare const withInstallAll: (components: Component[], directives?: Record) => Plugin; /** * 用于 defineOptions 的类型辅助 */ export interface ComponentOptions { name: string; inheritAttrs?: boolean; }