feat: 上传list-type

This commit is contained in:
dap
2025-03-30 18:23:37 +08:00
parent a302fdf119
commit 755a30583f
4 changed files with 96 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
import { ref } from 'vue';
export function useImageType() {
const imageListTypes = ['text', 'picture', 'picture-card'] as const;
const imageListOptions = imageListTypes.map((str) => ({
label: str,
value: str,
}));
const currentImageListType =
ref<(typeof imageListTypes)[number]>('picture-card');
return {
imageListOptions,
currentImageListType,
};
}
export function useFileType() {
const fileListTypes = ['text', 'picture'] as const;
const fileListOptions = fileListTypes.map((str) => ({
label: str,
value: str,
}));
const currentFileListType = ref<(typeof fileListTypes)[number]>('text');
return {
fileListOptions,
currentFileListType,
};
}