feat: update
This commit is contained in:
@@ -166,11 +166,11 @@ const cancelCreate = () => {
|
||||
// File type badge severity mapping
|
||||
const getBadgeSeverity = (fileType) => {
|
||||
const map = {
|
||||
'Image': 'info',
|
||||
'PDF': 'danger',
|
||||
'Video': 'warning',
|
||||
'Document': 'primary',
|
||||
'Audio': 'success'
|
||||
'image': 'info',
|
||||
'pdf': 'danger',
|
||||
'video': 'warning',
|
||||
'document': 'primary',
|
||||
'audio': 'success'
|
||||
};
|
||||
return map[fileType] || 'info';
|
||||
};
|
||||
@@ -178,11 +178,11 @@ const getBadgeSeverity = (fileType) => {
|
||||
// File type icon mapping
|
||||
const getFileIcon = (file) => {
|
||||
const map = {
|
||||
'Image': 'pi-image',
|
||||
'PDF': 'pi-file-pdf',
|
||||
'Video': 'pi-video',
|
||||
'Document': 'pi-file',
|
||||
'Audio': 'pi-volume-up'
|
||||
'image': 'pi-image',
|
||||
'pdf': 'pi-file-pdf',
|
||||
'video': 'pi-video',
|
||||
'document': 'pi-file',
|
||||
'audio': 'pi-volume-up'
|
||||
};
|
||||
return `pi ${map[file.fileType] || 'pi-file'}`;
|
||||
};
|
||||
@@ -222,6 +222,13 @@ const formatFileSize = (bytes) => {
|
||||
<small v-if="errors.title" class="p-error">{{ errors.title }}</small>
|
||||
</div>
|
||||
|
||||
<!-- Price -->
|
||||
<div class="col-span-2">
|
||||
<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" :minFractionDigits="2"
|
||||
class="w-full" />
|
||||
</div>
|
||||
|
||||
<!-- Status -->
|
||||
<div class="col-span-2">
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">状态</label>
|
||||
@@ -234,12 +241,6 @@ const formatFileSize = (bytes) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Price -->
|
||||
<div class="col-span-2">
|
||||
<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" :minFractionDigits="2"
|
||||
class="w-full" />
|
||||
</div>
|
||||
|
||||
<!-- Introduction -->
|
||||
<div class="col-span-2">
|
||||
@@ -255,7 +256,7 @@ const formatFileSize = (bytes) => {
|
||||
<div class="p-4 border border-gray-200 rounded-md">
|
||||
<div v-if="post.selectedMedia.length === 0"
|
||||
class="flex justify-center items-center flex-col space-y-3 py-6">
|
||||
<i class="pi pi-image text-gray-400 text-3xl"></i>
|
||||
<i class="pi pi-image text-gray-400 text-5xl!"></i>
|
||||
<p class="text-gray-500">尚未选择任何媒体文件</p>
|
||||
<Button label="选择媒体" icon="pi pi-plus" @click="openMediaDialog" outlined />
|
||||
<small v-if="errors.selectedMedia" class="p-error">{{ errors.selectedMedia }}</small>
|
||||
|
||||
Reference in New Issue
Block a user