mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 12:48:04 +08:00
ad3d998752
* feat: button add link type * fix: code lint * feat: button add link api * docs: edit word Co-authored-by: xiaochenchen <xiaochen.chen@igg.com>
37 lines
829 B
Vue
37 lines
829 B
Vue
<template>
|
|
<p>Basic link button</p>
|
|
<div class="flex justify-space-between mb-4">
|
|
<el-button
|
|
v-for="button in buttons"
|
|
:key="button.text"
|
|
:type="button.type"
|
|
link
|
|
>{{ button.text }}</el-button
|
|
>
|
|
</div>
|
|
|
|
<p>Disabled link button</p>
|
|
<div class="flex justify-space-between">
|
|
<el-button
|
|
v-for="button in buttons"
|
|
:key="button.text"
|
|
:type="button.type"
|
|
link
|
|
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>
|