first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export const cardList = (() => {
|
||||
const result: any[] = [];
|
||||
for (let i = 0; i < 6; i++) {
|
||||
result.push({
|
||||
id: i,
|
||||
title: 'Jeecg Admin',
|
||||
description: '基于Vue Next, TypeScript, Ant Design Vue实现的一套完整的企业级后台管理系统',
|
||||
datetime: '2020-11-26 17:39',
|
||||
extra: '编辑',
|
||||
icon: 'logos:vue',
|
||||
color: '#1890ff',
|
||||
author: 'Jeecg',
|
||||
percent: 20 * (i + 1),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<PageWrapper :class="prefixCls" title="标准列表">
|
||||
<div :class="`${prefixCls}__top`">
|
||||
<a-row :gutter="12">
|
||||
<a-col :span="8" :class="`${prefixCls}__top-col`">
|
||||
<div>我的待办</div>
|
||||
<p>8个任务</p>
|
||||
</a-col>
|
||||
<a-col :span="8" :class="`${prefixCls}__top-col`">
|
||||
<div>本周任务平均处理时间</div>
|
||||
<p>32分钟</p>
|
||||
</a-col>
|
||||
<a-col :span="8" :class="`${prefixCls}__top-col`">
|
||||
<div>本周完成任务数</div>
|
||||
<p>24个任务</p>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
|
||||
<div :class="`${prefixCls}__content`">
|
||||
<a-list :pagination="pagination">
|
||||
<template v-for="item in list" :key="item.id">
|
||||
<a-list-item class="list">
|
||||
<a-list-item-meta>
|
||||
<template #avatar>
|
||||
<Icon class="icon" v-if="item.icon" :icon="item.icon" :color="item.color" />
|
||||
</template>
|
||||
<template #title>
|
||||
<span>{{ item.title }}</span>
|
||||
<div class="extra" v-if="item.extra">
|
||||
{{ item.extra }}
|
||||
</div>
|
||||
</template>
|
||||
<template #description>
|
||||
<div class="description">
|
||||
{{ item.description }}
|
||||
</div>
|
||||
<div class="info">
|
||||
<div><span>Owner</span>{{ item.author }}</div>
|
||||
<div><span>开始时间</span>{{ item.datetime }}</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<Progress :percent="item.percent" status="active" />
|
||||
</div>
|
||||
</template>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
</template>
|
||||
</a-list>
|
||||
</div>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Progress, Row, Col } from 'ant-design-vue';
|
||||
import { defineComponent } from 'vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { cardList } from './data';
|
||||
import { PageWrapper } from '/@/components/Page';
|
||||
import { List } from 'ant-design-vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
Icon,
|
||||
Progress,
|
||||
PageWrapper,
|
||||
[List.name]: List,
|
||||
[List.Item.name]: List.Item,
|
||||
AListItemMeta: List.Item.Meta,
|
||||
[Row.name]: Row,
|
||||
[Col.name]: Col,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
prefixCls: 'list-basic',
|
||||
list: cardList,
|
||||
pagination: {
|
||||
show: true,
|
||||
pageSize: 3,
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.list-basic {
|
||||
&__top {
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
background-color: @component-background;
|
||||
|
||||
&-col {
|
||||
&:not(:last-child) {
|
||||
border-right: 1px dashed @border-color-base;
|
||||
}
|
||||
|
||||
div {
|
||||
margin-bottom: 12px;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
line-height: 32px;
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__content {
|
||||
padding: 24px;
|
||||
margin-top: 12px;
|
||||
background-color: @component-background;
|
||||
|
||||
.list {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 40px !important;
|
||||
}
|
||||
|
||||
.extra {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 15px;
|
||||
font-weight: normal;
|
||||
color: @primary-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.description {
|
||||
display: inline-block;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.info {
|
||||
display: inline-block;
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
|
||||
div {
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
display: inline-block;
|
||||
width: 15%;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,14 @@
|
||||
export const cardList = (() => {
|
||||
const result: any[] = [];
|
||||
for (let i = 0; i < 12; i++) {
|
||||
result.push({
|
||||
title: 'Jeecg Admin',
|
||||
icon: 'logos:vue',
|
||||
color: '#1890ff',
|
||||
active: '100',
|
||||
new: '1,799',
|
||||
download: 'bx:bx-download',
|
||||
});
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<PageWrapper :class="prefixCls" title="卡片列表">
|
||||
<template #headerContent>
|
||||
基于Vue Next, TypeScript, Ant Design Vue实现的一套完整的企业级后台管理系统。
|
||||
<div :class="`${prefixCls}__link`">
|
||||
<a><Icon icon="bx:bx-paper-plane" color="#1890ff" /><span>开始</span></a>
|
||||
<a><Icon icon="carbon:warning" color="#1890ff" /><span>简介</span></a>
|
||||
<a><Icon icon="ion:document-text-outline" color="#1890ff" /><span>文档</span></a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div :class="`${prefixCls}__content`">
|
||||
<a-list>
|
||||
<a-row :gutter="16">
|
||||
<template v-for="item in list" :key="item.title">
|
||||
<a-col :span="6">
|
||||
<a-list-item>
|
||||
<a-card :hoverable="true" :class="`${prefixCls}__card`">
|
||||
<div :class="`${prefixCls}__card-title`">
|
||||
<Icon class="icon" v-if="item.icon" :icon="item.icon" :color="item.color" />
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div :class="`${prefixCls}__card-detail`"> 基于Vue Next, TypeScript, Ant Design Vue实现的一套完整的企业级后台管理系统 </div>
|
||||
</a-card>
|
||||
</a-list-item>
|
||||
</a-col>
|
||||
</template>
|
||||
</a-row>
|
||||
</a-list>
|
||||
</div>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { cardList } from './data';
|
||||
import { PageWrapper } from '/@/components/Page';
|
||||
import { Card, Row, Col, List } from 'ant-design-vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
Icon,
|
||||
PageWrapper,
|
||||
[Card.name]: Card,
|
||||
[List.name]: List,
|
||||
[List.Item.name]: List.Item,
|
||||
[Row.name]: Row,
|
||||
[Col.name]: Col,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
prefixCls: 'list-card',
|
||||
list: cardList,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.list-card {
|
||||
&__link {
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
|
||||
a {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
&__card {
|
||||
width: 100%;
|
||||
margin-bottom: -8px;
|
||||
|
||||
.ant-card-body {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
&-title {
|
||||
margin-bottom: 5px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: @text-color;
|
||||
|
||||
.icon {
|
||||
margin-top: -5px;
|
||||
margin-right: 10px;
|
||||
font-size: 38px !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-detail {
|
||||
padding-top: 10px;
|
||||
padding-left: 30px;
|
||||
font-size: 14px;
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,37 @@
|
||||
import { FormSchema } from '/@/components/Form/index';
|
||||
|
||||
export const searchList = (() => {
|
||||
const result: any[] = [];
|
||||
for (let i = 0; i < 6; i++) {
|
||||
result.push({
|
||||
id: i,
|
||||
title: 'Jeecg Admin',
|
||||
description: ['Jeecg', '设计语言', 'Typescript'],
|
||||
content: '基于Vue Next, TypeScript, Ant Design实现的一套完整的企业级后台管理系统。',
|
||||
time: '2020-11-14 11:20',
|
||||
});
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
|
||||
export const actions: any[] = [
|
||||
{ icon: 'clarity:star-line', text: '156', color: '#018ffb' },
|
||||
{ icon: 'bx:bxs-like', text: '156', color: '#459ae8' },
|
||||
{ icon: 'bx:bxs-message-dots', text: '2', color: '#42d27d' },
|
||||
];
|
||||
|
||||
export const schemas: FormSchema[] = [
|
||||
{
|
||||
field: 'field1',
|
||||
component: 'InputSearch',
|
||||
label: '项目名',
|
||||
colProps: {
|
||||
span: 8,
|
||||
},
|
||||
componentProps: {
|
||||
onChange: (e: any) => {
|
||||
console.log(e);
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<PageWrapper :class="prefixCls" title="搜索列表">
|
||||
<template #headerContent>
|
||||
<BasicForm :class="`${prefixCls}__header-form`" :labelWidth="100" :schemas="schemas" :showActionButtonGroup="false" />
|
||||
</template>
|
||||
|
||||
<div :class="`${prefixCls}__container`">
|
||||
<a-list>
|
||||
<template v-for="item in list" :key="item.id">
|
||||
<a-list-item>
|
||||
<a-list-item-meta>
|
||||
<template #description>
|
||||
<div :class="`${prefixCls}__content`">
|
||||
{{ item.content }}
|
||||
</div>
|
||||
<div :class="`${prefixCls}__action`">
|
||||
<template v-for="action in actions" :key="action.icon">
|
||||
<div :class="`${prefixCls}__action-item`">
|
||||
<Icon v-if="action.icon" :class="`${prefixCls}__action-icon`" :icon="action.icon" :color="action.color" />
|
||||
{{ action.text }}
|
||||
</div>
|
||||
</template>
|
||||
<span :class="`${prefixCls}__time`">{{ item.time }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #title>
|
||||
<p :class="`${prefixCls}__title`">
|
||||
{{ item.title }}
|
||||
</p>
|
||||
<div>
|
||||
<template v-for="tag in item.description" :key="tag">
|
||||
<Tag class="mb-2">
|
||||
{{ tag }}
|
||||
</Tag>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
</template>
|
||||
</a-list>
|
||||
</div>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import { defineComponent } from 'vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { BasicForm } from '/@/components/Form/index';
|
||||
import { actions, searchList, schemas } from './data';
|
||||
import { PageWrapper } from '/@/components/Page';
|
||||
import { List } from 'ant-design-vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
Icon,
|
||||
Tag,
|
||||
BasicForm,
|
||||
PageWrapper,
|
||||
[List.name]: List,
|
||||
[List.Item.name]: List.Item,
|
||||
AListItemMeta: List.Item.Meta,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
prefixCls: 'list-search',
|
||||
list: searchList,
|
||||
actions,
|
||||
schemas,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.list-search {
|
||||
&__header {
|
||||
&-form {
|
||||
margin-bottom: -16px;
|
||||
}
|
||||
}
|
||||
|
||||
&__container {
|
||||
padding: 12px;
|
||||
background-color: @component-background;
|
||||
}
|
||||
|
||||
&__title {
|
||||
margin-bottom: 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
&__content {
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
|
||||
&__action {
|
||||
margin-top: 10px;
|
||||
|
||||
&-item {
|
||||
display: inline-block;
|
||||
padding: 0 16px;
|
||||
color: @text-color-secondary;
|
||||
|
||||
&:nth-child(1) {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&:nth-child(1),
|
||||
&:nth-child(2) {
|
||||
border-right: 1px solid @border-color-base;
|
||||
}
|
||||
}
|
||||
|
||||
&-icon {
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
&__time {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user