feat: update date format
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<script setup>
|
||||
import { orderService } from '@/api/orderService';
|
||||
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';
|
||||
@@ -36,9 +34,6 @@ const orders = ref({
|
||||
const first = ref(0);
|
||||
const rows = ref(10);
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(timezone);
|
||||
|
||||
const orderStatusMap = {
|
||||
0: { label: '待支付', severity: 'warning' },
|
||||
1: { label: '已支付', severity: 'success' },
|
||||
@@ -93,10 +88,6 @@ const onSearch = (event) => {
|
||||
}, 300);
|
||||
};
|
||||
|
||||
const formatDate = (date) => {
|
||||
return dayjs.tz(date, 'Asia/Shanghai').format('YYYY-MM-DD HH:mm:ss');
|
||||
};
|
||||
|
||||
const handleDelete = (order) => {
|
||||
confirm.require({
|
||||
message: `确定要删除订单 "${order.id}" 吗?`,
|
||||
@@ -179,7 +170,7 @@ onMounted(() => {
|
||||
<span class="text-orange-500">优惠: -¥{{ formatPrice(getDiscountAmount(data.price,
|
||||
data.discount)) }}</span>
|
||||
<span class="font-bold">实付: ¥{{ formatPrice(getFinalPrice(data.price, data.discount))
|
||||
}}</span>
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
Reference in New Issue
Block a user