From a907f8485c9d8bea82c71be7364c4c511e5e429a Mon Sep 17 00:00:00 2001
From: wzy1024 <395778325@qq.com>
Date: 星期二, 04 四月 2023 11:58:26 +0800
Subject: [PATCH] 导出Excel,@Excel注解使用dictType属性时,如果有大量的字典数据,就会有大量的查询redis(打开、关闭),导致特别慢。于是使用map存储字典数据,相同的key就不需要再次去查询redis,大大提高了导出效率。

---
 ruoyi-ui/src/components/ImagePreview/index.vue |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ruoyi-ui/src/components/ImagePreview/index.vue b/ruoyi-ui/src/components/ImagePreview/index.vue
index 743d8d5..3c770c7 100644
--- a/ruoyi-ui/src/components/ImagePreview/index.vue
+++ b/ruoyi-ui/src/components/ImagePreview/index.vue
@@ -19,7 +19,7 @@
   props: {
     src: {
       type: String,
-      required: true
+      default: ""
     },
     width: {
       type: [Number, String],
@@ -32,6 +32,9 @@
   },
   computed: {
     realSrc() {
+      if (!this.src) {
+        return;
+      }
       let real_src = this.src.split(",")[0];
       if (isExternal(real_src)) {
         return real_src;
@@ -39,6 +42,9 @@
       return process.env.VUE_APP_BASE_API + real_src;
     },
     realSrcList() {
+      if (!this.src) {
+        return;
+      }
       let real_src_list = this.src.split(",");
       let srcList = [];
       real_src_list.forEach(item => {

--
Gitblit v1.9.2