zzw
2023-11-14 7139cfd6b984e8f96c2c1154dab89d24cc0b2fd8
web/src/main.js
@@ -93,6 +93,25 @@
    })
  }
})
Vue.filter('filterTime', function (data, format) {
  let year = '  '
  let months = '  '
  let days = '  '
  let hours = '  '
  let minutes = '  '
  let seconds = '  '
  if (data != null) {
    year = data.getFullYear()
    months = (data.getMonth() + 1).toString().padStart(2, '0')
    days = data.getDate()
    hours = (data.getHours() + 1).toString().padStart(2, '0')
    minutes = (data.getMinutes() + 1).toString().padStart(2, '0')
    seconds = (data.getSeconds() + 1).toString().padStart(2, '0')
  }
  return format.replace('YYYY', year).replace('MM', months).replace('DD', days).replace('hh', hours).replace('mm', minutes).replace('ss', seconds);
})
// 默认主题  浅版light 深版hight
store.state.theme = Cookies.get('systemTheme') || 'light'