ltao 3 năm trước cách đây
mục cha
commit
509fc8df91
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      src/main.js

+ 10 - 0
src/main.js

@@ -110,7 +110,17 @@ Vue.filter('dataFormatys', originVal => {
   }
 
 })
+// originVal 后台返回的中国标准时间
+Vue.filter('dataFormatyss', originVal => {
+  const dt = new Date(originVal)
+  if (originVal) {
+    const y = dt.getFullYear()
+    const m = (dt.getMonth() + 1 + '').padStart(2, '0')
+    const d = (dt.getDate() + '').padStart(2, '0')
+    return `${y}.${m}`
+  }
 
+})
 import dataV from '@jiaminghi/data-view'
 
 Vue.use(dataV)