element-plus/docs/examples/button/text.vue
Xc ad3d998752
feat(components): [button] add link api (#7652)
* feat: button add link type

* fix: code lint

* feat: button add link api

* docs: edit word

Co-authored-by: xiaochenchen <xiaochen.chen@igg.com>
2022-05-14 12:20:02 +08:00

49 lines
1.1 KiB
Vue

<template>
<p>Basic text button</p>
<div class="flex justify-space-between mb-4">
<el-button
v-for="button in buttons"
:key="button.text"
:type="button.type"
text
>{{ button.text }}</el-button
>
</div>
<p>Background color always on</p>
<div class="flex justify-space-between mb-4">
<el-button
v-for="button in buttons"
:key="button.text"
:type="button.type"
text
bg
>{{ button.text }}</el-button
>
</div>
<p>Disabled text button</p>
<div class="flex justify-space-between">
<el-button
v-for="button in buttons"
:key="button.text"
:type="button.type"
text
disabled
>{{ button.text }}</el-button
>
</div>
</template>
<script setup lang="ts">
const buttons = [
{ type: 'link', text: 'link' },
{ type: '', text: 'plain' },
{ type: 'primary', text: 'primary' },
{ type: 'success', text: 'success' },
{ type: 'info', text: 'info' },
{ type: 'warning', text: 'warning' },
{ type: 'danger', text: 'danger' },
] as const
</script>