Open gooqiao opened 6 years ago
The only way I know is to rewrite it to something like this:
import customDateFilter from './customDateFilter'
// ...
<div >
{ customDateFilter('2016-05-03', 'YYYY-MM-DD') }
</div>
or with moment.js
import moment from 'moment'
// ...
const date // maybe can be undefined?!
<div >
{ date ? moment(date).format('YYYY-MM-DD') : '' }
</div>
this.$options.filters.customDateFilter('2016-05-03)
customDateFilter
is a filter,When I do, he does not work.Is there any other way?