提交 73f45d9d authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 修复个人信息、修改密码刷新后左侧留白;表单过大。

上级 c5fc275c
......@@ -84,6 +84,11 @@ export default {
'user'
])
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('app/toggleSideBarHide', true)
})
},
created() {
this.$store.dispatch('app/toggleSideBarHide', true)
this.initVersion()
......
<template>
<layout-content :header="$t('user.change_password')">
<layout-content>
<div style="width: 100%;display: flex;justify-content: center;">
<el-card class="box-card about-card">
<div class="form-header">
<span>{{ $t('user.change_password') }}</span>
</div>
<el-form ref="createUserForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('user.origin_passwd')" prop="oldPwd">
<el-input v-model="form.oldPwd" type="password" />
......@@ -16,7 +20,8 @@
<el-button type="primary" @click="save">{{ $t('commons.confirm') }}</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</layout-content>
</template>
......@@ -54,7 +59,11 @@ export default {
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('app/toggleSideBarHide', true)
})
},
created() {
this.$store.dispatch('app/toggleSideBarHide', true)
},
......@@ -86,3 +95,21 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.about-card {
background: inherit;
margin-top: 5%;
flex-direction: row;
width: 640px;
min-width: 640px;
height: auto;
position: relative;
>>>div.el-card__header {
padding: 0;
}
}
.form-header {
line-height: 60px;
font-size: 18px;
}
</style>
<template>
<layout-content header="个人信息">
<div>
<layout-content>
<div style="width: 100%;display: flex;justify-content: center;">
<el-card class="box-card about-card">
<div class="form-header">
<span>{{ $t('commons.personal_info') }}</span>
</div>
<el-form ref="createUserForm" :disabled="formType !== 'modify'" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item label="ID" prop="username">
<el-input v-model="form.username" disabled />
......@@ -60,6 +64,7 @@
<el-button v-if="formType==='modify'" type="primary" @click="save">{{ $t('commons.confirm') }}</el-button>
<el-button v-if="formType!=='modify'" type="primary" @click="edit">{{ $t('commons.edit') }}</el-button>
</div>
</el-card>
</div>
</layout-content>
......@@ -149,7 +154,11 @@ export default {
formType: 'add'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('app/toggleSideBarHide', true)
})
},
created() {
this.$store.dispatch('app/toggleSideBarHide', true)
this.queryPerson()
......@@ -259,3 +268,21 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.about-card {
background: inherit;
margin-top: 5%;
flex-direction: row;
width: 640px;
min-width: 640px;
height: auto;
position: relative;
>>>div.el-card__header {
padding: 0;
}
}
.form-header {
line-height: 60px;
font-size: 18px;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论