新增角色模板优化店铺装修

This commit is contained in:
gyq
2025-12-09 17:34:06 +08:00
parent 9f4cec00ee
commit cb13753928
9 changed files with 520 additions and 94 deletions

View File

@@ -15,11 +15,11 @@
<el-icon><zoom-in /></el-icon>
</span>
<!-- 删除 -->
<!-- <span @click="handleRemove(file.url!)">
<span @click="handleRemove(file.url!)">
<el-icon>
<Delete />
</el-icon>
</span> -->
</span>
</span>
</div>
</template>
@@ -87,14 +87,20 @@ const fileList = ref<UploadUserFile[]>([]);
* 删除图片
*/
function handleRemove(imageUrl: string) {
FileAPI.delete(imageUrl).then(() => {
const index = modelValue.value.indexOf(imageUrl);
if (index !== -1) {
// 直接修改数组避免触发整体更新
modelValue.value.splice(index, 1);
fileList.value.splice(index, 1); // 同步更新 fileList
}
});
// FileAPI.delete(imageUrl).then(() => {
// const index = modelValue.value.indexOf(imageUrl);
// if (index !== -1) {
// // 直接修改数组避免触发整体更新
// modelValue.value.splice(index, 1);
// fileList.value.splice(index, 1); // 同步更新 fileList
// }
// });
const index = modelValue.value.indexOf(imageUrl);
if (index !== -1) {
// 直接修改数组避免触发整体更新
modelValue.value.splice(index, 1);
fileList.value.splice(index, 1); // 同步更新 fileList
}
}
function handleProgress(event: any, file: any, fileList: any) {
// console.log("handleProgress", evt, file, fileList);