feat: update

This commit is contained in:
yanghao05
2025-04-18 22:41:51 +08:00
parent 8afed63142
commit 6ca359ec1e
3 changed files with 11 additions and 43 deletions

View File

@@ -62,6 +62,12 @@ onMounted(() => {
fetchUserDetail();
fetchUserArticles();
});
const formatPrice = (price) => {
return (price / 100).toFixed(2);
};
</script>
<template>
@@ -114,7 +120,11 @@ onMounted(() => {
:lazy="true" :totalRecords="totalArticles" :rows="lazyParams.limit" :loading="loading"
@page="onPage" paginator :rows-per-page-options="[10, 20, 50]">
<Column field="title" header="标题"></Column>
<Column field="price" header="价格"></Column>
<Column field="price" header="价格">
<template #body="{ data }">
&yen; {{ formatPrice(data.price) }}
</template>
</Column>
<Column field="bought_at" header="购买时间">
<template #body="{ data }">
{{ formatDate(data.bought_at) }}