partten.js 706 B

123456789101112131415161718192021222324252627
  1. // Color 常量
  2. const color = [
  3. { key: "green", value: "#05BB4C" },
  4. { key: "yellow", value: "#F8DE5B" },
  5. { key: "gray", value: "#606769" },
  6. { key: "grayl", value: "#B3BDC0" },
  7. { key: "purple", value: "#4B55AE" },
  8. { key: "orange", value: "#e17e23" },
  9. { key: "blue", value: "#1a93cf" },
  10. { key: "red", value: "#BA3237" },
  11. { key: "pink", value: "#c531c7" },
  12. { key: "cyan", value: "#1cbbb4" },
  13. { key: "brown", value: "#a5673f" },
  14. { key: "mauve", value: "#9c26b0" },
  15. { key: "white", value: "#fff" },
  16. ];
  17. function getColor(key) {
  18. if (!key)
  19. key = "green"
  20. return color.find((t) => { return t.key == key }).value;
  21. }
  22. export default {
  23. color,
  24. getColor
  25. }