无法直接调用 this
在 beforeCreate 生命周期 将 this ,赋值给 that,通过 that 调用 this
var vm = new Vue({el: '#app',data: {},beforeCreate: function () {that = this},methods:{fom(fmt){...}},....,filters: {dateformate: function (val) {return that.fom("yyyy-MM-dd")}}})
