mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 04:08:34 +08:00
docs(guide): remove app.config.globalProperties.$ELEMENT
(#5133)
This commit is contained in:
parent
594df35726
commit
9128d631ea
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user