一、vue3为什么删除filter(过滤器)
其实原因就是vue3要精简代码,而filter功能重复,filter能实现的功能,用methods和computed方法基本上也可以实现,所以关于filter的vue源代码就被删除了,也更加方便维护。
二、vue2的时间格式化
过滤器写法:https://blog.csdn.net/weixin_54040952/article/details/124804787
三、vue3的时间格式化
js:
使用方法:
实现效果:
其实原因就是vue3要精简代码,而filter功能重复,filter能实现的功能,用methods和computed方法基本上也可以实现,所以关于filter的vue源代码就被删除了,也更加方便维护。
过滤器写法:https://blog.csdn.net/weixin_54040952/article/details/124804787
js:
使用方法:
实现效果: