Эх сурвалжийг харах

图标大小限制,文案提示修改

cxmo 1 жил өмнө
parent
commit
289050d152

+ 4 - 0
src/views/system_manage/etaMenu_manage/components/ChoosedIconDialog.vue

@@ -73,6 +73,10 @@ export default {
                 this.$message.warning('仅支持png、jpg格式的图片')
                 return
             }
+            if(e.file.size>50*1024){
+                this.$message.warning('图标文件大小不能超过50kb')
+                return 
+            }
             let form = new FormData()
             form.append("file", e.file)
             const res = await bannerupload(form)

+ 20 - 2
src/views/system_manage/etaMenu_manage/components/ModifyMenuDialog.vue

@@ -27,7 +27,7 @@
                         >
                         </el-cascader>
                     </el-form-item>
-                    <el-form-item label="菜单标题" prop="Name">
+                    <el-form-item :label="nameLabel" prop="Name">
                         <el-input v-model="form.Name"></el-input>
                     </el-form-item>
                     <template v-if="form.MenuType===0">
@@ -39,9 +39,19 @@
                         </el-form-item>
                         <el-form-item label="路由地址" prop="Path">
                             <el-input v-model="form.Path"></el-input>
+                            <el-tooltip effect="dark" content="页面跳转路径" placement="right">
+                                <span class="hint-text">
+                                    <i class="el-icon-warning-outline"></i>
+                                </span>
+                            </el-tooltip>
                         </el-form-item>
                         <el-form-item label="组件地址" prop="Component">
                             <el-input v-model="form.Component"></el-input>
+                            <el-tooltip effect="dark" content="代码中页面地址" placement="right">
+                                <span class="hint-text">
+                                    <i class="el-icon-warning-outline"></i>
+                                </span>
+                            </el-tooltip>
                         </el-form-item>
                     </template>
                     <el-form-item label="按钮ID" prop="ButtonCode" v-if="form.MenuType!==0">
@@ -156,7 +166,15 @@ export default {
         //菜单类型-按钮、字段 是否禁用
         isbtnDisabled() {
             return this.form.treeLevel === 1 && this.openType !== 'add';
-        }
+        },
+        nameLabel(){
+            const nameMap = {
+                0:'菜单标题',
+                1:'按钮名称',
+                2:'字段名称'
+            }
+            return nameMap[this.form.MenuType]||'菜单标题'
+        },
     },
     methods: {
         initForm() {

+ 6 - 1
src/views/system_manage/etaMenu_manage/etaMenuConfig.vue

@@ -120,7 +120,12 @@ export default {
             this.isShowMenuDialog = true;
         },
         deleteMenu(data){
-            this.$confirm(`删除后不可恢复,确认删除该${data.MenuType===0?'菜单及子菜单吗':'按钮吗'}?`,'提示',{
+            const hintTextMap = {
+                0:'菜单及子项',
+                1:'按钮',
+                2:'字段'
+            }
+            this.$confirm(`删除后不可恢复,确认删除该${hintTextMap[data.MenuType]}吗?`,'提示',{
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
                 type: 'warning'