ltao 3 anos atrás
pai
commit
509fc8df91
1 arquivos alterados com 10 adições e 0 exclusões
  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)