修改部分结构

This commit is contained in:
zouzhibing 2022-08-05 10:40:50 +08:00
parent 2c58db5885
commit d97c6245b4
3 changed files with 19 additions and 14 deletions

View File

View File

@ -2,35 +2,35 @@ export const userData =[
{
username:'zzb',
nickname:'林峰',
sex:1,
sex:'男',
role:'超级管理员',
status:true,
},
{
username:'zhangsan',
nickname:'张三',
sex:0,
sex:'女',
role:'管理员',
status:true,
},
{
username:'lisi',
nickname:'李四',
sex:1,
sex:'男',
role:'管理员',
status:true,
},
{
username:'wangwu',
nickname:'王五',
sex:0,
sex:'男',
role:'超级管理员',
status:false,
},
{
username:'zhaoliu',
nickname:'赵柳',
sex:0,
sex:'男',
role:'普通用户',
status:false,
},

View File

@ -44,6 +44,7 @@
</el-table-column>
</el-table>
<el-dialog
@close="close"
v-model="dialogVisible"
:title="title"
width="50%"
@ -64,8 +65,8 @@
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-radio-group v-model="ruleForm.sex">
<el-radio :label="1" ></el-radio>
<el-radio :label="0" ></el-radio>
<el-radio label="男" ></el-radio>
<el-radio label="女" ></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="角色" prop="role">
@ -85,8 +86,6 @@
</span>
</template>
</el-dialog>
</u-container-layout>
</template>
@ -137,16 +136,22 @@
dialogVisible.value = true
}
const ruleForm = reactive({
name: '',
sex: null,
price:null,
username: '',
nickname: null,
sex:null,
role:null,
})
const edit = (row)=>{
title.value='编辑'
// rowObj.value = row
dialogVisible.value = true
ruleForm.nickname = row.nickname
ruleForm.username = row.username
ruleForm.sex = row.sex
ruleForm.role = row.role
}
function close(){
ruleFormRef.value.resetFields()
}
const del = (row)=>{
ElMessageBox.confirm(
'你确定要删除当前项吗?',