fix: issues
This commit is contained in:
@@ -6,7 +6,6 @@ import { useRouter } from 'vue-router';
|
|||||||
// PrimeVue components
|
// PrimeVue components
|
||||||
import Badge from 'primevue/badge';
|
import Badge from 'primevue/badge';
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import Card from 'primevue/card';
|
|
||||||
import Column from 'primevue/column';
|
import Column from 'primevue/column';
|
||||||
import DataTable from 'primevue/datatable';
|
import DataTable from 'primevue/datatable';
|
||||||
import Dialog from 'primevue/dialog';
|
import Dialog from 'primevue/dialog';
|
||||||
@@ -216,8 +215,7 @@ const getFileIcon = (file) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card class="mb-6">
|
<div>
|
||||||
<template #content>
|
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
@@ -229,8 +227,8 @@ const getFileIcon = (file) => {
|
|||||||
<!-- Price -->
|
<!-- Price -->
|
||||||
<div class="col-span-1">
|
<div class="col-span-1">
|
||||||
<label for="price" class="block text-sm font-medium text-gray-700 mb-1">价格 (¥)</label>
|
<label for="price" class="block text-sm font-medium text-gray-700 mb-1">价格 (¥)</label>
|
||||||
<InputNumber id="price" v-model="post.price" mode="currency" currency="CNY"
|
<InputNumber id="price" v-model="post.price" mode="currency" currency="CNY" :minFractionDigits="2"
|
||||||
:minFractionDigits="2" class="w-full" />
|
class="w-full" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Introduction -->
|
<!-- Introduction -->
|
||||||
@@ -281,8 +279,7 @@ const getFileIcon = (file) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
</Card>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Media Selection Dialog -->
|
<!-- Media Selection Dialog -->
|
||||||
@@ -342,22 +339,3 @@ const getFileIcon = (file) => {
|
|||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.p-card .p-card-content {
|
|
||||||
padding: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-inputtext-lg {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-inputnumber-input {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-button-sm {
|
|
||||||
padding: 0.4rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { useRoute, useRouter } from 'vue-router';
|
|||||||
// PrimeVue components
|
// PrimeVue components
|
||||||
import Badge from 'primevue/badge';
|
import Badge from 'primevue/badge';
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import Card from 'primevue/card';
|
|
||||||
import Column from 'primevue/column';
|
import Column from 'primevue/column';
|
||||||
import DataTable from 'primevue/datatable';
|
import DataTable from 'primevue/datatable';
|
||||||
import Dialog from 'primevue/dialog';
|
import Dialog from 'primevue/dialog';
|
||||||
@@ -315,9 +314,8 @@ onMounted(() => {
|
|||||||
<span class="mt-4">加载文章数据...</span>
|
<span class="mt-4">加载文章数据...</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card v-else class="mb-6">
|
<div v-else>
|
||||||
<template #content>
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 p-0!">
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">标题</label>
|
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">标题</label>
|
||||||
@@ -325,17 +323,12 @@ onMounted(() => {
|
|||||||
<small v-if="errors.title" class="p-error">{{ errors.title }}</small>
|
<small v-if="errors.title" class="p-error">{{ errors.title }}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Author -->
|
|
||||||
<div class="col-span-1">
|
|
||||||
<label for="author" class="block text-sm font-medium text-gray-700 mb-1">作者</label>
|
|
||||||
<InputText id="author" v-model="post.author" class="w-full" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Price -->
|
<!-- Price -->
|
||||||
<div class="col-span-1">
|
<div class="col-span-1">
|
||||||
<label for="price" class="block text-sm font-medium text-gray-700 mb-1">价格 (¥)</label>
|
<label for="price" class="block text-sm font-medium text-gray-700 mb-1">价格 (¥)</label>
|
||||||
<InputNumber id="price" v-model="post.price" mode="currency" currency="CNY"
|
<InputNumber id="price" v-model="post.price" mode="currency" currency="CNY" :minFractionDigits="2"
|
||||||
:minFractionDigits="2" class="w-full" />
|
class="w-full" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Status -->
|
<!-- Status -->
|
||||||
@@ -344,12 +337,6 @@ onMounted(() => {
|
|||||||
<Dropdown id="status" v-model="post.status" :options="statusOptions" class="w-full" />
|
<Dropdown id="status" v-model="post.status" :options="statusOptions" class="w-full" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ViewCount (readonly) -->
|
|
||||||
<div class="col-span-1">
|
|
||||||
<label for="viewCount" class="block text-sm font-medium text-gray-700 mb-1">观看次数</label>
|
|
||||||
<InputText id="viewCount" v-model="post.viewCount" class="w-full" readonly />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Introduction -->
|
<!-- Introduction -->
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
<label for="introduction" class="block text-sm font-medium text-gray-700 mb-1">文章介绍</label>
|
<label for="introduction" class="block text-sm font-medium text-gray-700 mb-1">文章介绍</label>
|
||||||
@@ -398,8 +385,7 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
</Card>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Media Selection Dialog -->
|
<!-- Media Selection Dialog -->
|
||||||
@@ -459,22 +445,3 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.p-card .p-card-content {
|
|
||||||
padding: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-inputtext-lg {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-inputnumber-input {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-button-sm {
|
|
||||||
padding: 0.4rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user