Files
element-plus/docs/examples/config-provider/button.vue
msidolphin 66043aa3b5 refactor(components): [el-config-provider] improve componomponent extendiability (#4175)
re #4146

added button configuration
added useGlobalConfig hook
2021-11-05 18:10:07 +08:00

29 lines
495 B
Vue

<template>
<div>
<el-config-provider :button="config">
<el-button>中文</el-button>
</el-config-provider>
<div>
<el-checkbox v-model="config.autoInsertSpace"
>autoInsertSpace</el-checkbox
>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, reactive } from 'vue'
export default defineComponent({
setup() {
const config = reactive({
autoInsertSpace: true,
})
return {
config,
}
},
})
</script>