horizontal-button.vue 817 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view :class="[layout, clazz]">
  3. <uv-icon :name="icon" color="var(--primary-color)" :size="iconSize" @click="$emit('click')"/>
  4. <text class="text-2xs text-primary" @click="$emit('click')">{{ text }}</text>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. name: "horizontal-button",
  10. emits: ['click'],
  11. props: {
  12. layout: {
  13. type: String,
  14. default: 'fx-col fx-cen-cen'
  15. },
  16. clazz: {
  17. type: String,
  18. default: 'p-20'
  19. },
  20. icon: {
  21. type: String,
  22. default: ''
  23. },
  24. iconSize: {
  25. type: [String, Number],
  26. default: 24
  27. },
  28. text: {
  29. type: String,
  30. default: ''
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped>
  36. </style>