king
2023-07-07 ac4e2892a68bb4ef5b35e8e2e12e76d3ec3ede35
src/menu/components/calendar/index.jsx
@@ -175,9 +175,9 @@
    res.resetContrl = card.wrap.resetContrl || 'init'
    if (res.colorField && res.signs) {
      res.signs = res.signs.map(item => {
      res.signs = res.signs.map((item, i) => {
        try {
          let colors = item.color.match(/\d+/g)
          let colors = item.background.match(/\d+/g)
          if ((colors[0] * 0.299 + colors[1] * 0.578 + colors[2] * 0.114) * colors[3] < 192) {
            item.fontColor = '#ffffff'
          } else {
@@ -187,6 +187,13 @@
          item.fontColor = ''
        }
        item.style = {background: item.background}
        if (item.fontColor) {
          item.style.color = item.fontColor
        }
        item.$index = i + 1
        return item
      })
    }