Files
element-plus/docs/examples/config-provider/button.vue
Kylin f154ce27c6 feat(components): [button] add dashed prop (#22738)
* feat(components): [input] add the dashed attribute

* docs: update tag

* refactor: update the documentation of config-provider

* refactor: update config-provider test

* refactor: update button test

* refactor: update test

* test: update

* refactor: update css

* refactor: reset

* refactor: update css

* refactor: delete blank lines

* docs: update version

* docs: update button type

* docs: update button type

---------

Co-authored-by: rzzf <cszhjh@gmail.com>
2026-02-03 10:39:54 +08:00

41 lines
1.1 KiB
Vue

<template>
<div>
<div>
<el-checkbox v-model="config.autoInsertSpace">
autoInsertSpace
</el-checkbox>
<el-checkbox v-model="config.plain"> plain </el-checkbox>
<el-checkbox v-model="config.round"> round </el-checkbox>
<el-checkbox v-model="config.dashed"> dashed </el-checkbox>
<el-checkbox v-model="config.text"> text </el-checkbox>
<el-select v-model="config.type" class="ml-5" style="max-width: 150px">
<el-option
v-for="type in buttonTypes.filter(Boolean)"
:key="type"
:value="type"
/>
</el-select>
</div>
<el-divider />
<el-config-provider :button="config">
<el-button>中文</el-button>
</el-config-provider>
</div>
</template>
<script lang="ts" setup>
import { reactive } from 'vue'
import { buttonTypes } from 'element-plus'
import type { ButtonConfigContext } from 'element-plus'
const config = reactive<ButtonConfigContext>({
autoInsertSpace: true,
type: 'default',
plain: true,
round: true,
text: false,
dashed: false,
})
</script>