vant icon indicating copy to clipboard operation
vant copied to clipboard

[Feature Request] 如何暴露新开发的组件?

Open xiaofengqqcom123 opened this issue 6 months ago • 1 comments

What problem does this feature solve?

目前组件库,打包后的产物,只暴露了 DemoButton 组件,未暴露新增的组件。

Image

新增的组件,使用 vue 3 组合式写法,却并未暴露。

Image

尝试将其改成非组合式写法,就可以暴露出来!!!!

问:能不能支持手动暴露呀?

What does the proposed API look like?

类似于: import { withInstall } from "../../utils" import _Button from "./index.vue"

export const Button = withInstall(_Button) export default Button

declare module "vue" { export interface GlobalComponents { UIButton: typeof Button } }

xiaofengqqcom123 avatar Aug 27 '25 02:08 xiaofengqqcom123

@xiaofengqqcom123 是不是遗漏了这行代码

astfn avatar Aug 28 '25 02:08 astfn