docs(guide): remove app.config.globalProperties.$ELEMENT (#5133)

This commit is contained in:
C.Y.Kun 2022-01-05 03:44:08 +08:00 committed by GitHub
parent 594df35726
commit 9128d631ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,16 +175,29 @@ app.use(ElementPlus, { size: 'small', zIndex: 3000 })
On-demand: On-demand:
```ts ```vue
import { createApp } from 'vue' <template>
import { ElButton } from 'element-plus' <el-config-provider :size="size" :zIndex="zIndex">
import App from './App.vue' <app />
</el-config-provider>
</template>
const app = createApp(App) <script>
app.config.globalProperties.$ELEMENT = { import { defineComponent } from 'vue'
// options import { ElConfigProvider } from 'element-plus'
}
app.use(ElButton) export default defineComponent({
components: {
ElConfigProvider,
},
setup() {
return {
size: 3000,
size: 'small',
}
},
})
</script>
``` ```
## Using Nuxt.js ## Using Nuxt.js