提交 7d773734 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

refactor: 优化 app.use 示例

上级 beb63304
......@@ -267,13 +267,13 @@ export function createApp() {
app.use(plugin2)
app.use(plugin3)
app.use(plugin4)
app.use(function (app: VueApp, componentName: string, componentInstance: CreateVueComponent) {
app.component(componentName, componentInstance)
}, 'CompForPlugin1', CompForPlugin)
app.use(function (app: VueApp, componentName: string) {
app.component(componentName, CompForPlugin)
}, 'CompForPlugin1')
app.use({
install(app: VueApp, a: string | null, b: string | null) {
app.component('CompForPlugin2', CompForPlugin as CreateVueComponent)
app.component('CompForPlugin2', CompForPlugin)
}
}, null, null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册