From c49125735965d9beb0d2054047951d9b96de74db Mon Sep 17 00:00:00 2001 From: sam <sam2008ext@gmail.com> Date: 星期六, 12 二月 2022 08:46:12 +0800 Subject: [PATCH] 修复自定义组件`file-upload`无法显示第一个文件,列表显示的文件比实际文件少一个的问题 --- ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java index 612ae30..e66a514 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java @@ -112,10 +112,15 @@ { column.setHtmlType(GenConstants.HTML_SELECT); } - // 鏂囦欢瀛楁璁剧疆涓婁紶鎺т欢 + // 鍥剧墖瀛楁璁剧疆鍥剧墖涓婁紶鎺т欢 else if (StringUtils.endsWithIgnoreCase(columnName, "image")) { - column.setHtmlType(GenConstants.HTML_UPLOAD_IMAGE); + column.setHtmlType(GenConstants.HTML_IMAGE_UPLOAD); + } + // 鏂囦欢瀛楁璁剧疆鏂囦欢涓婁紶鎺т欢 + else if (StringUtils.endsWithIgnoreCase(columnName, "file")) + { + column.setHtmlType(GenConstants.HTML_FILE_UPLOAD); } // 鍐呭瀛楁璁剧疆瀵屾枃鏈帶浠� else if (StringUtils.endsWithIgnoreCase(columnName, "content")) -- Gitblit v1.9.3