Browse Source

拼写纠正

tongshangming 6 months ago
parent
commit
f7d7c1f368
2 changed files with 4 additions and 6 deletions
  1. 0 2
      src/utils/validator.ts
  2. 4 4
      src/views/system/Role.vue

+ 0 - 2
src/utils/validator.ts

@@ -1,5 +1,3 @@
-import type { IdCard } from '@icon-park/vue-next'
-
 const validator = {
   mobile(rule: any, value: any, callback: any) {
     if (!/^1\d{10}$/.test(value)) {

+ 4 - 4
src/views/system/Role.vue

@@ -64,7 +64,7 @@ const UserCRUD: ICRUD = {
   },
   getList(data: any) {
     return getRoleUserList({ id: curRole.value.id, ...data }).then((res: any) => {
-      slectedUser.value = res.rows.map((item: any) => item.id)
+      selectedUser.value = res.rows.map((item: any) => item.id)
       return res
     })
   },
@@ -78,7 +78,7 @@ const userFormConfig = reactive<BasicForm>({
 })
 
 const dialogVisible = ref(false)
-const slectedUser = ref<any>([])
+const selectedUser = ref<any>([])
 const userList = ref<any>([])
 const userRef = ref<any>(null)
 
@@ -96,7 +96,7 @@ const closeDialog = () => {
 const handleSubmit = () => {
   createRoleUser({
     role: { id: curRole.value.id },
-    ids: slectedUser.value
+    ids: selectedUser.value
   }).then(() => {
     userRef.value.refresh()
     dialogVisible.value = false
@@ -147,7 +147,7 @@ const handleSubmit = () => {
   </el-row>
   <el-dialog v-model="dialogVisible" title="添加用户" @close="closeDialog">
     <el-transfer
-      v-model="slectedUser"
+      v-model="selectedUser"
       :data="userList"
       :titles="['用户列表', '已选用户']"
       :props="{ key: 'id', label: 'name' }"