You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

WorkArrow.tsx 1.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import styles from './index.less';
  2. type WorkArrowProps = {
  3. width?: number;
  4. height?: number;
  5. x: number;
  6. y: number;
  7. arrowLeft: number;
  8. arrorwTop: number;
  9. borderLeft?: number;
  10. borderTop?: number;
  11. borderRight?: number;
  12. borderBottom?: number;
  13. arrrowAngle?: number;
  14. };
  15. function WorkArrow({
  16. width = 1,
  17. height = 1,
  18. x,
  19. y,
  20. arrowLeft,
  21. arrorwTop,
  22. borderLeft = 0,
  23. borderTop = 0,
  24. borderRight = 0,
  25. borderBottom = 0,
  26. arrrowAngle = 0,
  27. }: WorkArrowProps) {
  28. return (
  29. <div
  30. className={styles['work-arrow']}
  31. style={{
  32. left: `${x}px`,
  33. top: `${y}px`,
  34. width: `${width}px`,
  35. height: `${height}px`,
  36. borderLeftWidth: `${borderLeft}px`,
  37. borderTopWidth: `${borderTop}px`,
  38. borderRightWidth: `${borderRight}px`,
  39. borderBottomWidth: `${borderBottom}px`,
  40. }}
  41. >
  42. <img
  43. className={styles['work-arrow__img']}
  44. src={require('@/assets/img/blue-triangle.png')}
  45. alt=""
  46. width={10}
  47. height={9}
  48. style={{
  49. left: `${arrowLeft}px`,
  50. top: `${arrorwTop}px`,
  51. transform: `rotate(${arrrowAngle}deg)`,
  52. }}
  53. />
  54. </div>
  55. );
  56. }
  57. export default WorkArrow;