[Vue warn]: Failed to resolve filter: parseTime

I want to format the returned timestamp type in the el-table of element-ui. Why did I report this error


your parseTime is a js function and cannot be directly used as filters. You need to declare it as filters before you can use it

...
filters: {
    parseTime: function () {
        ...
    }
}

try this line:

filters: {
    parseTime: parseTime
}

add this paragraph to the filters

filters: {
  parseTime(time, cFormat) {
    return parseTime(time, cFormat)
  }
}

author, have you solved it? How did you do that?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be9c56-31120.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be9c56-31120.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?