<template>
  <button @click="test()">123213</button>
</template>

<script lang="ts" setup>
  const weekDay = function(time: string)  {
  let datelist = ['周日','周一','周二','周三','周四','周五','周六',]
  return datelist[new Date(time).getDay()];
}
const test =()=>{
  console.log(weekDay('2025-1-8'));
}
</script>