text.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <p>Basic text button</p>
  3. <div class="flex justify-space-between mb-4 flex-wrap gap-4">
  4. <el-button
  5. v-for="button in buttons"
  6. :key="button.text"
  7. :type="button.type"
  8. text
  9. >{{ button.text }}</el-button
  10. >
  11. </div>
  12. <p>Background color always on</p>
  13. <div class="flex justify-space-between mb-4 flex-wrap gap-4">
  14. <el-button
  15. v-for="button in buttons"
  16. :key="button.text"
  17. :type="button.type"
  18. text
  19. bg
  20. >{{ button.text }}</el-button
  21. >
  22. </div>
  23. <p>Disabled text button</p>
  24. <div class="flex justify-space-between flex-wrap gap-4">
  25. <el-button
  26. v-for="button in buttons"
  27. :key="button.text"
  28. :type="button.type"
  29. text
  30. disabled
  31. >{{ button.text }}</el-button
  32. >
  33. </div>
  34. </template>
  35. <script setup lang="ts">
  36. const buttons = [
  37. { type: '', text: 'plain' },
  38. { type: 'primary', text: 'primary' },
  39. { type: 'success', text: 'success' },
  40. { type: 'info', text: 'info' },
  41. { type: 'warning', text: 'warning' },
  42. { type: 'danger', text: 'danger' },
  43. ] as const
  44. </script>