fix: 修复用户管理问题

This commit is contained in:
wangdan-fit2cloud 2024-03-21 18:01:04 +08:00
parent 40608781c3
commit c4a25a0f52
3 changed files with 19 additions and 23 deletions

View File

@ -31,23 +31,10 @@
<span>论坛求助</span>
</div>
</el-card>
<div class="text-center">当前版本号{{ version }}</div>
</div>
<!-- <ul class="about-ui">
<li class="flex mb-16">
<span class="label text-right">授权数量</span><span class="text-center">-</span>
</li>
<li class="flex mb-16">
<span class="label text-right">过期时间</span><span class="text-center">-</span>
</li>
<li class="flex mb-16">
<span class="label text-right">版本</span><span class="text-center">-</span>
</li>
<li class="flex">
<span class="label text-right">版本号</span
><span class="text-center">{{ PackageJSON.version }}</span>
</li>
</ul> -->
<div class="text-center">
当前版本号v1.0.0-dev (build at 2024-03-21T17:32, commit: 40608781)
</div>
</el-dialog>
</template>
<script setup lang="ts">
@ -72,9 +59,10 @@ defineExpose({ open })
</script>
<style lang="scss" scope>
.about-dialog {
padding: 0;
padding: 0 0 24px 0;
border-radius: 4px;
width: 600px;
font-weight: 400;
.el-dialog__header {
background: var(--app-header-bg-color);
margin-right: 0;
@ -95,11 +83,11 @@ defineExpose({ open })
height: 59px;
}
.about-ui {
padding: 24px;
width: 360px;
margin: 0 auto;
font-weight: 400;
font-size: 16px;
margin-top: 24px;
.label {
width: 180px;
text-align: left;

View File

@ -12,7 +12,7 @@
<el-input
v-model="userForm.username"
placeholder="请输入用户名"
maxlength="64"
maxlength="20"
show-word-limit
>
</el-input>
@ -73,8 +73,16 @@ const userForm = ref<any>({
})
const rules = reactive({
username: [{ required: true, message: '请输入用户名' }],
email: [{ required: true, message: '请输入邮箱' }],
username: [
{ required: true, message: '请输入用户名', trigger: 'blur' },
{
min: 6,
max: 20,
message: '长度在 6 到 20 个字符',
trigger: 'blur'
}
],
email: [{ required: true, message: '请输入邮箱', trigger: 'blur' }],
password: [
{
required: true,
@ -102,8 +110,8 @@ watch(dialogVisible, (bool) => {
phone: '',
nick_name: ''
}
userFormRef.value?.clearValidate()
isEdit.value = false
userFormRef.value?.clearValidate()
}
})

View File

@ -99,13 +99,13 @@ watch(dialogVisible, (bool) => {
password: '',
re_password: ''
}
userFormRef.value?.clearValidate()
}
})
const open = (data: any) => {
userId.value = data.id
dialogVisible.value = true
userFormRef.value?.clearValidate()
}
const submit = async (formEl: FormInstance | undefined) => {