mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
fix: update account page demo (#92)
This commit is contained in:
parent
7a000366b9
commit
9f8796ee58
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 33 KiB |
@ -29,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { List, Card, Row, Col } from 'ant-design-vue';
|
import { List, Card } from 'ant-design-vue';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { applicationList } from './data';
|
import { applicationList } from './data';
|
||||||
|
|
||||||
@ -38,8 +38,6 @@
|
|||||||
List,
|
List,
|
||||||
ListItem: List.Item,
|
ListItem: List.Item,
|
||||||
Card,
|
Card,
|
||||||
Row,
|
|
||||||
Col,
|
|
||||||
Icon,
|
Icon,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
@ -72,7 +72,8 @@
|
|||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
color: rgba(0, 0, 0, 0.45);
|
color: rgba(0, 0, 0, 0.45);
|
||||||
|
|
||||||
&:not(:last-child) {
|
&:nth-child(1),
|
||||||
|
&:nth-child(2) {
|
||||||
border-right: 1px solid rgba(206, 206, 206, 0.4);
|
border-right: 1px solid rgba(206, 206, 206, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { List, Card, Row, Col } from 'ant-design-vue';
|
import { List, Card } from 'ant-design-vue';
|
||||||
import demoImg from '/@/assets/images/demo.png';
|
import demoImg from '/@/assets/images/demo.png';
|
||||||
import { projectList } from './data';
|
import { projectList } from './data';
|
||||||
|
|
||||||
@ -28,8 +28,6 @@
|
|||||||
List,
|
List,
|
||||||
ListItem: List.Item,
|
ListItem: List.Item,
|
||||||
Card,
|
Card,
|
||||||
Row,
|
|
||||||
Col,
|
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
return {
|
return {
|
||||||
@ -51,6 +49,7 @@
|
|||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-title {
|
&-title {
|
||||||
|
@ -42,14 +42,14 @@ export const teams: ListItem[] = [
|
|||||||
color: '#00adf7',
|
color: '#00adf7',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'ant-design:dribbble-circle-filled',
|
icon: 'ant-design:behance-square-filled',
|
||||||
title: '科学搬砖组',
|
title: '科学搬砖组',
|
||||||
color: '#ff4000',
|
color: '#7c51b8',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'ant-design:behance-square-filled',
|
icon: 'ant-design:dribbble-circle-filled',
|
||||||
title: '程序员日常',
|
title: '程序员日常',
|
||||||
color: '#7c51b8',
|
color: '#ff4000',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -124,8 +124,8 @@ export const projectList = (() => {
|
|||||||
const result: any[] = [];
|
const result: any[] = [];
|
||||||
for (let i = 0; i < 8; i++) {
|
for (let i = 0; i < 8; i++) {
|
||||||
result.push({
|
result.push({
|
||||||
title: 'Angular',
|
title: 'Vben Admin',
|
||||||
content: '那是一种内在的东西, 他们到达不了,',
|
content: '基于Vue Next, TypeScript, Ant Design实现的一套完整的企业级后台管理系统。',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Row, Col, Tag, Tabs } from 'ant-design-vue';
|
import { Tag, Tabs } from 'ant-design-vue';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { CollapseContainer } from '/@/components/Container/index';
|
import { CollapseContainer } from '/@/components/Container/index';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
@ -66,8 +66,6 @@
|
|||||||
components: {
|
components: {
|
||||||
CollapseContainer,
|
CollapseContainer,
|
||||||
Icon,
|
Icon,
|
||||||
Row,
|
|
||||||
Col,
|
|
||||||
Tag,
|
Tag,
|
||||||
Tabs,
|
Tabs,
|
||||||
TabPane: Tabs.TabPane,
|
TabPane: Tabs.TabPane,
|
||||||
@ -130,7 +128,7 @@
|
|||||||
&__team {
|
&__team {
|
||||||
&-item {
|
&-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 4px 18px;
|
padding: 4px 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
@ -1,22 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<CollapseContainer title="基本设置" :canExpan="false">
|
<CollapseContainer title="基本设置" :canExpan="false">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="14">
|
||||||
<BasicForm @register="register" />
|
<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>
|
<Button type="primary" @click="handleSubmit">更新基本信息</Button>
|
||||||
</CollapseContainer>
|
</CollapseContainer>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Upload } from 'ant-design-vue';
|
||||||
import { defineComponent, onMounted } from 'vue';
|
import { defineComponent, onMounted } from 'vue';
|
||||||
import { BasicForm, useForm } from '/@/components/Form/index';
|
import { BasicForm, useForm } from '/@/components/Form/index';
|
||||||
import { CollapseContainer } from '/@/components/Container/index';
|
import { CollapseContainer } from '/@/components/Container/index';
|
||||||
|
import Icon from '/@/components/Icon/index';
|
||||||
|
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
|
||||||
|
import headerImg from '/@/assets/images/header.jpg';
|
||||||
import { accountInfoApi } from '/@/api/demo/account';
|
import { accountInfoApi } from '/@/api/demo/account';
|
||||||
import { baseSetschemas } from './data';
|
import { baseSetschemas } from './data';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { BasicForm, CollapseContainer, Button },
|
components: { BasicForm, CollapseContainer, Button, Upload, Icon },
|
||||||
setup() {
|
setup() {
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
|
||||||
@ -32,6 +49,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
headerImg,
|
||||||
register,
|
register,
|
||||||
handleSubmit: () => {
|
handleSubmit: () => {
|
||||||
createMessage.success('更新成功!');
|
createMessage.success('更新成功!');
|
||||||
@ -40,3 +58,13 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.change-avatar {
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<ScrollContainer>
|
<ScrollContainer>
|
||||||
<div ref="wrapperRef" class="m-4 account">
|
<div ref="wrapperRef" class="m-4 account">
|
||||||
<Tabs tab-position="left">
|
<Tabs tab-position="left" :tabBarStyle="tabBarStyle">
|
||||||
<template v-for="item in settingList" :key="item.key">
|
<template v-for="item in settingList" :key="item.key">
|
||||||
<TabPane :tab="item.name">
|
<TabPane :tab="item.name">
|
||||||
<component :is="item.component" />
|
<component :is="item.component" />
|
||||||
@ -35,7 +35,12 @@
|
|||||||
MsgNotify,
|
MsgNotify,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
return { settingList };
|
return {
|
||||||
|
settingList,
|
||||||
|
tabBarStyle: {
|
||||||
|
width: '220px',
|
||||||
|
},
|
||||||
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user