提交角色界面修改

This commit is contained in:
zlwu committed 2025-08-02 18:59:28 +08:00
1 parent d45af45132
commit 2b5db607f6
8 files changed
+325 -31

No files matched your search

+5 -2
View File
@@ -100,6 +100,7 @@ watch(
if (Array.isArray(val)) {
list = val as OssVO[];
} else if (typeof val === 'string') {
console.log('val', val);
// 检查是否包含逗号分隔的URL
if (val.includes(',')) {
// 多个URL用逗号分隔
@@ -136,6 +137,7 @@ watch(
}
return itemData;
});
console.log('fileList', fileList.value);
} else {
fileList.value = [];
return [];
@@ -238,6 +240,7 @@ const handleUploadError = () => {
// 预览
const handlePictureCardPreview = (file: any) => {
console.log('file', file);
dialogImageUrl.value = file.url;
dialogVisible.value = true;
};
@@ -247,9 +250,9 @@ const listToString = (list: any[], separator?: string) => {
let strs = '';
separator = separator || ',';
for (const i in list) {
if (undefined !== list[i].url && list[i].url.indexOf('blob:') !== 0) {
if (undefined !== list[i].ossId && list[i].ossId.indexOf('blob:') !== 0) {
// 始终返回URL而不是ossId
strs += list[i].url + separator;
strs += list[i].ossId + separator;
}
}
return strs != '' ? strs.substring(0, strs.length - 1) : '';