trigonometry.vue 858 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view :class="'trigonometry ' + (direction === 'up' ? 'up' : '') + ' ' + (size === 'small' ? 'small' : '')" :style="'color:' + color + ';opacity: ' + opacity"></view>
  3. </template>
  4. <script>
  5. export default {
  6. data() {
  7. return {};
  8. },
  9. components: {},
  10. props: {
  11. color: {
  12. type: String,
  13. default: ''
  14. },
  15. direction: {
  16. type: String
  17. },
  18. size: {
  19. type: String
  20. },
  21. opacity: {
  22. type: String,
  23. default: '0.8'
  24. }
  25. },
  26. methods: {}
  27. };
  28. </script>
  29. <style>
  30. .trigonometry {
  31. border-color: transparent transparent currentcolor currentcolor;
  32. border-style: solid;
  33. border-width: 2px;
  34. -webkit-transform: rotate(-45deg);
  35. transform: rotate(-45deg);
  36. opacity: .8;
  37. margin: -2px 10rpx 0;
  38. }
  39. .up {
  40. margin-top: 3rpx;
  41. -webkit-transform: rotate(135deg);
  42. transform: rotate(135deg);
  43. }
  44. </style>