How to get the return value of data dictionary in filters

added a method to get a data dictionary in main.js

window.getDirData = function (value, key ,cb) {

  axios.get("http://192.168.99.197:8080/supply02/mobile/index/dictut/" + key + "/" + value).then(function (data) {



    cb(data.data);
  })

};

call this method in the filters of the component, corresponding to the translated value of the display data dictionary

   filters :{

      dirFil(data) {


        getDirData(data, "creditCategory",function (res) {
          
          return res
        })

      }
    },
    
    

  
Mar.28,2021

return is in cb, filter does not have return

Menu