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

refactor: 优化 app.use 示例

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