From 4a1b43b31c2cfe4867d79cea2db72e16dd06a162 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期一, 21 十一月 2022 19:09:30 +0800
Subject: [PATCH] 消除Vue3控制台出现的警告信息
---
src/main/java/com/ruoyi/project/system/domain/SysRole.java | 9 ++--
src/main/resources/mybatis/system/SysPostMapper.xml | 6 +-
src/main/resources/vm/vue/v3/index-tree.vue.vm | 21 +---------
src/main/java/com/ruoyi/project/system/domain/SysPost.java | 9 ++--
src/main/resources/mybatis/system/SysRoleMapper.xml | 6 +-
src/main/resources/vm/vue/v3/index.vue.vm | 14 +------
6 files changed, 21 insertions(+), 44 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/system/domain/SysPost.java b/src/main/java/com/ruoyi/project/system/domain/SysPost.java
index ebafe7d..e9b7ecd 100644
--- a/src/main/java/com/ruoyi/project/system/domain/SysPost.java
+++ b/src/main/java/com/ruoyi/project/system/domain/SysPost.java
@@ -1,6 +1,7 @@
package com.ruoyi.project.system.domain;
import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -31,7 +32,7 @@
/** 宀椾綅鎺掑簭 */
@Excel(name = "宀椾綅鎺掑簭")
- private String postSort;
+ private Integer postSort;
/** 鐘舵�侊紙0姝e父 1鍋滅敤锛� */
@Excel(name = "鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤")
@@ -74,13 +75,13 @@
this.postName = postName;
}
- @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
- public String getPostSort()
+ @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
+ public Integer getPostSort()
{
return postSort;
}
- public void setPostSort(String postSort)
+ public void setPostSort(Integer postSort)
{
this.postSort = postSort;
}
diff --git a/src/main/java/com/ruoyi/project/system/domain/SysRole.java b/src/main/java/com/ruoyi/project/system/domain/SysRole.java
index 9326ac4..67941af 100644
--- a/src/main/java/com/ruoyi/project/system/domain/SysRole.java
+++ b/src/main/java/com/ruoyi/project/system/domain/SysRole.java
@@ -2,6 +2,7 @@
import java.util.Set;
import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -32,7 +33,7 @@
/** 瑙掕壊鎺掑簭 */
@Excel(name = "瑙掕壊鎺掑簭")
- private String roleSort;
+ private Integer roleSort;
/** 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛� */
@Excel(name = "鏁版嵁鑼冨洿", readConverterExp = "1=鎵�鏈夋暟鎹潈闄�,2=鑷畾涔夋暟鎹潈闄�,3=鏈儴闂ㄦ暟鎹潈闄�,4=鏈儴闂ㄥ強浠ヤ笅鏁版嵁鏉冮檺,5=浠呮湰浜烘暟鎹潈闄�")
@@ -117,13 +118,13 @@
this.roleKey = roleKey;
}
- @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
- public String getRoleSort()
+ @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
+ public Integer getRoleSort()
{
return roleSort;
}
- public void setRoleSort(String roleSort)
+ public void setRoleSort(Integer roleSort)
{
this.roleSort = roleSort;
}
diff --git a/src/main/resources/mybatis/system/SysPostMapper.xml b/src/main/resources/mybatis/system/SysPostMapper.xml
index 1405f6d..be65f9a 100644
--- a/src/main/resources/mybatis/system/SysPostMapper.xml
+++ b/src/main/resources/mybatis/system/SysPostMapper.xml
@@ -77,7 +77,7 @@
<set>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="postName != null and postName != ''">post_name = #{postName},</if>
- <if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
+ <if test="postSort != null">post_sort = #{postSort},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
@@ -91,7 +91,7 @@
<if test="postId != null and postId != 0">post_id,</if>
<if test="postCode != null and postCode != ''">post_code,</if>
<if test="postName != null and postName != ''">post_name,</if>
- <if test="postSort != null and postSort != ''">post_sort,</if>
+ <if test="postSort != null">post_sort,</if>
<if test="status != null and status != ''">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
@@ -100,7 +100,7 @@
<if test="postId != null and postId != 0">#{postId},</if>
<if test="postCode != null and postCode != ''">#{postCode},</if>
<if test="postName != null and postName != ''">#{postName},</if>
- <if test="postSort != null and postSort != ''">#{postSort},</if>
+ <if test="postSort != null">#{postSort},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
diff --git a/src/main/resources/mybatis/system/SysRoleMapper.xml b/src/main/resources/mybatis/system/SysRoleMapper.xml
index 20cf452..4c30aa0 100644
--- a/src/main/resources/mybatis/system/SysRoleMapper.xml
+++ b/src/main/resources/mybatis/system/SysRoleMapper.xml
@@ -98,7 +98,7 @@
<if test="roleId != null and roleId != 0">role_id,</if>
<if test="roleName != null and roleName != ''">role_name,</if>
<if test="roleKey != null and roleKey != ''">role_key,</if>
- <if test="roleSort != null and roleSort != ''">role_sort,</if>
+ <if test="roleSort != null">role_sort,</if>
<if test="dataScope != null and dataScope != ''">data_scope,</if>
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
<if test="deptCheckStrictly != null">dept_check_strictly,</if>
@@ -110,7 +110,7 @@
<if test="roleId != null and roleId != 0">#{roleId},</if>
<if test="roleName != null and roleName != ''">#{roleName},</if>
<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
- <if test="roleSort != null and roleSort != ''">#{roleSort},</if>
+ <if test="roleSort != null">#{roleSort},</if>
<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
@@ -126,7 +126,7 @@
<set>
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
- <if test="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if>
+ <if test="roleSort != null">role_sort = #{roleSort},</if>
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
diff --git a/src/main/resources/vm/vue/v3/index-tree.vue.vm b/src/main/resources/vm/vue/v3/index-tree.vue.vm
index 237d899..de507db 100644
--- a/src/main/resources/vm/vue/v3/index-tree.vue.vm
+++ b/src/main/resources/vm/vue/v3/index-tree.vue.vm
@@ -136,24 +136,9 @@
#end
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template #default="scope">
- <el-button
- type="text"
- icon="Edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:edit']"
- >淇敼</el-button>
- <el-button
- type="text"
- icon="Plus"
- @click="handleAdd(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:add']"
- >鏂板</el-button>
- <el-button
- type="text"
- icon="Delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:remove']"
- >鍒犻櫎</el-button>
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">淇敼</el-button>
+ <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">鏂板</el-button>
+ <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
diff --git a/src/main/resources/vm/vue/v3/index.vue.vm b/src/main/resources/vm/vue/v3/index.vue.vm
index f585c02..6c72763 100644
--- a/src/main/resources/vm/vue/v3/index.vue.vm
+++ b/src/main/resources/vm/vue/v3/index.vue.vm
@@ -148,18 +148,8 @@
#end
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template #default="scope">
- <el-button
- type="text"
- icon="Edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:edit']"
- >淇敼</el-button>
- <el-button
- type="text"
- icon="Delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['${moduleName}:${businessName}:remove']"
- >鍒犻櫎</el-button>
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">淇敼</el-button>
+ <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
--
Gitblit v1.9.3