qymljy hai 6 meses
pai
achega
3f4e512fe9
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      src/utils/tool.js

+ 4 - 4
src/utils/tool.js

@@ -266,16 +266,16 @@ export default {
     return year + '-' + month +'-' + date
     return year + '-' + month +'-' + date
   },
   },
   /*查重格式化*/
   /*查重格式化*/
-  getFontHighlight(data){
+  getFontHighlight(data,type){
     data.map(item => {
     data.map(item => {
       item.chars = item.chars.reduce((acc,ite) => ({
       item.chars = item.chars.reduce((acc,ite) => ({
         ...acc,
         ...acc,
         ...ite
         ...ite
       }),{})
       }),{})
 
 
-      item.projectname = item.projectname.split('').map(text => {
-        let projectname = item.chars.projectname.join("") || ''
-        return projectname.includes(text) ? {
+      item[type] = item[type].split('').map(text => {
+        type = item.chars[type].join("") || ''
+        return type.includes(text) ? {
           text,
           text,
           color: 'red'
           color: 'red'
         } : {
         } : {