const vue = new Vue({ el: '#VueDiv', data: { historyList: [] }, created() { this.getHistoryList(); }, methods: { getHistoryList() { var thisObj = this; main.post("/swaptrade2/GetOperationHistorys?enid=" + enid) .done(function (res) { thisObj.historyList = res.obj; }); }, dateFormat(v, f) { if (v == null || v == '') { return ''; } if (!f) { f = 'YYYY-MM-DD'; } var m = new moment(v); if (m.year() < 1910) { return ''; } return new moment(v).format(f); } } });