From af0e0a110e7187bf008655f7510199a0c0b25ec4 Mon Sep 17 00:00:00 2001 From: Nymph2333 <498092988@qq.com> Date: 星期一, 10 四月 2023 14:27:40 +0800 Subject: [PATCH] newInstance() 已弃用,使用clazz.getDeclaredConstructor().newInstance() This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException. The call clazz.newInstance() can be replaced by clazz.getDeclaredConstructor().newInstance() The latter sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses of ReflectiveOperationException. --- ruoyi-ui/src/views/system/menu/index.vue | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index d65773a..2ee25af 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -1,17 +1,16 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form-item label="菜单名称" prop="menuName"> <el-input v-model="queryParams.menuName" placeholder="请输入菜单名称" clearable - size="small" @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="状态" prop="status"> - <el-select v-model="queryParams.status" placeholder="菜单状态" clearable size="small"> + <el-select v-model="queryParams.status" placeholder="菜单状态" clearable> <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" @@ -78,7 +77,7 @@ </el-table-column> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> - <el-button + <el-button size="mini" type="text" icon="el-icon-edit" @@ -108,7 +107,7 @@ <el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-row> <el-col :span="24"> - <el-form-item label="上级菜单"> + <el-form-item label="上级菜单" prop="parentId"> <treeselect v-model="form.parentId" :options="menuOptions" @@ -128,7 +127,7 @@ </el-form-item> </el-col> <el-col :span="24" v-if="form.menuType != 'F'"> - <el-form-item label="菜单图标"> + <el-form-item label="菜单图标" prop="icon"> <el-popover placement="bottom-start" width="460" @@ -141,8 +140,7 @@ v-if="form.icon" slot="prefix" :icon-class="form.icon" - class="el-input__icon" - style="height: 32px;width: 16px;" + style="width: 25px;" /> <i v-else slot="prefix" class="el-icon-search el-input__icon" /> </el-input> @@ -160,7 +158,7 @@ </el-form-item> </el-col> <el-col :span="12" v-if="form.menuType != 'F'"> - <el-form-item> + <el-form-item prop="isFrame"> <span slot="label"> <el-tooltip content="选择是外链则路由地址需要以`http(s)://`开头" placement="top"> <i class="el-icon-question"></i> @@ -196,7 +194,7 @@ </el-form-item> </el-col> <el-col :span="12" v-if="form.menuType != 'M'"> - <el-form-item> + <el-form-item prop="perms"> <el-input v-model="form.perms" placeholder="请输入权限标识" maxlength="100" /> <span slot="label"> <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)" placement="top"> @@ -207,7 +205,7 @@ </el-form-item> </el-col> <el-col :span="12" v-if="form.menuType == 'C'"> - <el-form-item> + <el-form-item prop="query"> <el-input v-model="form.query" placeholder="请输入路由参数" maxlength="255" /> <span slot="label"> <el-tooltip content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`' placement="top"> @@ -218,7 +216,7 @@ </el-form-item> </el-col> <el-col :span="12" v-if="form.menuType == 'C'"> - <el-form-item> + <el-form-item prop="isCache"> <span slot="label"> <el-tooltip content="选择是则会被`keep-alive`缓存,需要匹配组件的`name`和地址保持一致" placement="top"> <i class="el-icon-question"></i> @@ -232,7 +230,7 @@ </el-form-item> </el-col> <el-col :span="12" v-if="form.menuType != 'F'"> - <el-form-item> + <el-form-item prop="visible"> <span slot="label"> <el-tooltip content="选择隐藏则路由将不会出现在侧边栏,但仍然可以访问" placement="top"> <i class="el-icon-question"></i> @@ -249,7 +247,7 @@ </el-form-item> </el-col> <el-col :span="12" v-if="form.menuType != 'F'"> - <el-form-item> + <el-form-item prop="status"> <span slot="label"> <el-tooltip content="选择停用则路由将不会出现在侧边栏,也不能被访问" placement="top"> <i class="el-icon-question"></i> -- Gitblit v1.9.2