<template>
  <div class="w-time-root">
    {{
      d.format("yyyy年MM月dd日 星期"+ws[d.getDay()]+" HH:mm:ss")
      }}
  </div>
</template>
<script setup>
import { onMounted, ref } from 'vue';

const ws= ref("日一二三四五六");
const d = ref(new Date());

onMounted(()=>{
  window.setInterval(()=>{
    d.value = new Date(new Date().getTime());
  },1000);
});
</script>
<style scoped>
.w-time-root {
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 2;
  text-shadow: 0 0 .2em var(--w-text);
  color: var(--w-bg-light);
  font-family: '黑体';
  letter-spacing: .1em;
  font-size: 1.3em;
  line-height: 1;
}
</style>