Bladeren bron

fix:图片放大优化

Signed-off-by: mingsoft <killfen@126.com>
msgroup 1 jaar geleden
bovenliggende
commit
498782a098

+ 5 - 0
src/main/webapp/WEB-INF/manager/cms/category/form.ftl

@@ -300,6 +300,7 @@
                                     :data="{uploadPath:'/cms/category','isRename':true,'appId':true}"
                                     :on-success="categoryImgSuccess"
                                     :on-error="categoryImgError"
+                                    :on-preview="categoryImgHandLePreview"
                                     accept="image/*"
                                     list-type="picture-card">
                                 <i class="el-icon-plus"></i>
@@ -534,6 +535,7 @@
         },
         computed: {},
         methods: {
+
             //正则校验regu 正则表达式,str被校验的字段,符合返回true否则false
             regularCheck: function(regu, str) {
                 var re = new RegExp(regu);
@@ -784,6 +786,9 @@
                     this.form.categoryImg.splice(index, 1);
                 }
             },
+            categoryImgHandLePreview:function (file) {
+                window.open(file.url)
+            },
             //categoryIco文件上传完成回调
             categoryIcoSuccess: function (response, file, fileList) {
                 if (response.result) {

+ 4 - 0
src/main/webapp/WEB-INF/manager/cms/content/form.ftl

@@ -213,6 +213,7 @@
                                             :data="{uploadPath:'/cms/content','isRename':true ,'appId':true}"
                                             :on-success="contentImgSuccess"
                                             :on-error="contentImgError"
+                                            :on-preview="contentImgHandLePreview"
                                             accept="image/*"
                                             list-type="picture-card">
                                         <i class="el-icon-plus"></i>
@@ -773,6 +774,9 @@
                     type: 'warning'
                 });
             },
+            contentImgHandLePreview:function (file) {
+                window.open(file.url)
+            },
             //只有在渲染完栏目数据之后才会初始化
             init: function () {
                 var that = this;