|
|
|
@ -1,22 +1,39 @@ |
|
|
|
<template> |
|
|
|
<CollapseContainer title="基本设置" :canExpan="false"> |
|
|
|
<BasicForm @register="register" /> |
|
|
|
<a-row :gutter="24"> |
|
|
|
<a-col :span="14"> |
|
|
|
<BasicForm @register="register" /> |
|
|
|
</a-col> |
|
|
|
<a-col :span="10"> |
|
|
|
<div class="change-avatar"> |
|
|
|
<div class="mb-2">头像</div> |
|
|
|
<img width="140" :src="headerImg" /> |
|
|
|
<Upload :showUploadList="false"> |
|
|
|
<Button type="ghost" class="ml-5"> |
|
|
|
<Icon icon="ant-design:upload-outlined" />更换头像 |
|
|
|
</Button> |
|
|
|
</Upload> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
<Button type="primary" @click="handleSubmit">更新基本信息</Button> |
|
|
|
</CollapseContainer> |
|
|
|
</template> |
|
|
|
<script lang="ts"> |
|
|
|
import { Button } from 'ant-design-vue'; |
|
|
|
import { Button, Upload } from 'ant-design-vue'; |
|
|
|
import { defineComponent, onMounted } from 'vue'; |
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'; |
|
|
|
import { CollapseContainer } from '/@/components/Container/index'; |
|
|
|
import Icon from '/@/components/Icon/index'; |
|
|
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
|
|
|
|
import headerImg from '/@/assets/images/header.jpg'; |
|
|
|
import { accountInfoApi } from '/@/api/demo/account'; |
|
|
|
import { baseSetschemas } from './data'; |
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
components: { BasicForm, CollapseContainer, Button }, |
|
|
|
components: { BasicForm, CollapseContainer, Button, Upload, Icon }, |
|
|
|
setup() { |
|
|
|
const { createMessage } = useMessage(); |
|
|
|
|
|
|
|
@ -32,6 +49,7 @@ |
|
|
|
}); |
|
|
|
|
|
|
|
return { |
|
|
|
headerImg, |
|
|
|
register, |
|
|
|
handleSubmit: () => { |
|
|
|
createMessage.success('更新成功!'); |
|
|
|
@ -40,3 +58,13 @@ |
|
|
|
}, |
|
|
|
}); |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
.change-avatar { |
|
|
|
img { |
|
|
|
display: block; |
|
|
|
margin-bottom: 15px; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
|