feat: update date format

This commit is contained in:
yanghao05
2025-04-18 17:43:48 +08:00
parent 4165d440ed
commit 8e65d136d9
3 changed files with 6 additions and 37 deletions

View File

@@ -1,8 +1,6 @@
<script setup>
import { userService } from '@/api/userService';
import dayjs from 'dayjs';
import timezone from 'dayjs/plugin/timezone';
import utc from 'dayjs/plugin/utc';
import { formatDate } from '@/utils/date';
import Badge from 'primevue/badge';
import Button from 'primevue/button';
import Column from 'primevue/column';
@@ -38,10 +36,6 @@ const users = ref({
const first = ref(0);
const rows = ref(10);
// 配置 dayjs
dayjs.extend(utc);
dayjs.extend(timezone);
const fetchUsers = async () => {
loading.value = true;
try {
@@ -78,10 +72,6 @@ const onSearch = (event) => {
}, 300);
};
const formatDate = (date) => {
return dayjs.tz(date, 'Asia/Shanghai').format('YYYY-MM-DD HH:mm:ss');
};
const handleDelete = (user) => {
confirm.require({
message: `确定要删除用户 "${user.username}" 吗?`,