Skip to content

Commit 7a00036

Browse files
committed
feat(desc-page): add desc page demo
1 parent 0b6110a commit 7a00036

File tree

17 files changed

+573
-44
lines changed

17 files changed

+573
-44
lines changed

CHANGELOG.zh_CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- 新增可编辑行示例
88
- 新增个人页
99
- 新增表单页
10+
- 新增详情页
1011

1112
### 🎫 Chores
1213

build/config/lessModifyVars.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ const modifyVars = {
1111
'warning-color': '#EFBD47', // Warning color
1212
'link-color': primaryColor, // Link color
1313
'disabled-color': '#C2C2CC', // Failure color
14-
'heading-color': '#2C3A61', // Title color
15-
'text-color': '#2C3A61', // Main text color
14+
'heading-color': 'rgba(0, 0, 0, 0.85)', // Title color
15+
'text-color': 'rgba(0, 0, 0, 0.85)', // Main text color
16+
// 'heading-color': '#2C3A61', // Title color
17+
// 'text-color': '#2C3A61', // Main text color
1618
'text-color-secondary ': '#606266', // Subtext color
1719
'background-color-base': '#F0F2F5', // background color
1820
'font-size-base': '14px', // Main font size

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
display: block;
6363
margin: 20px auto 0 0;
6464
font-size: 30px;
65-
color: #2c3a61;
65+
color: rgba(0, 0, 0, 0.85);
6666
}
6767
</style>
6868
</head>

public/resource/img/loading.svg

Lines changed: 1 addition & 1 deletion
Loading

src/api/demo/table.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ export function demoListApi(params: DemoParams) {
1313
url: Api.DEMO_LIST,
1414
method: 'GET',
1515
params,
16+
headers: {
17+
ignoreCancelToken: true,
18+
},
1619
});
1720
}

src/components/registerGlobComp.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
Steps,
3232
PageHeader,
3333
Result,
34+
Empty,
3435
} from 'ant-design-vue';
3536
import { getApp } from '/@/useApp';
3637

@@ -75,5 +76,6 @@ export function registerGlobComp() {
7576
.use(Steps)
7677
.use(PageHeader)
7778
.use(Result)
79+
.use(Empty)
7880
.use(Tabs);
7981
}

src/design/ant/index.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
width: 100%;
88
}
99

10+
.collapse-container__body {
11+
> .ant-descriptions {
12+
margin-left: 6px;
13+
}
14+
}
15+
1016
// .ant-form-item-label {
1117
// text-align: unset;
1218
// }

src/design/color.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
// =================================
112112

113113
// Main text color
114-
@text-color-base: #2c3a61;
114+
@text-color-base: @text-color;
115115

116116
// Label color
117117
@text-color-call-out: #606266;

src/router/menus/modules/demo/page.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/*
2-
* @description: Do not edit
3-
* @author: cxiaoting
4-
* @Date: 2020-11-13 14:00:37
5-
* @LastEditors: cxiaoting
6-
* @LastEditTime: 2020-11-13 18:07:11
7-
*/
81
import type { MenuModule } from '/@/router/types.d';
92
const menu: MenuModule = {
103
orderNo: 20,
@@ -36,6 +29,23 @@ const menu: MenuModule = {
3629
},
3730
],
3831
},
32+
{
33+
path: 'desc',
34+
name: '详情页',
35+
tag: {
36+
content: 'new',
37+
},
38+
children: [
39+
{
40+
path: 'basic',
41+
name: '基础详情页',
42+
},
43+
{
44+
path: 'high',
45+
name: '高级详情页',
46+
},
47+
],
48+
},
3949
{
4050
path: 'result',
4151
name: '结果页',

src/router/routes/modules/demo/page.ts

Lines changed: 56 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,34 @@ const page: AppRouteModule = {
5151
],
5252
},
5353
// =============================form end=============================
54+
// =============================desc start=============================
55+
{
56+
path: '/desc',
57+
name: 'DescPage',
58+
redirect: '/page-demo/desc/basic',
59+
meta: {
60+
title: '详情页',
61+
},
62+
children: [
63+
{
64+
path: 'basic',
65+
name: 'DescBasicPage',
66+
component: () => import('/@/views/demo/page/desc/basic/index.vue'),
67+
meta: {
68+
title: '基础详情页',
69+
},
70+
},
71+
{
72+
path: 'high',
73+
name: 'DescHighPage',
74+
component: () => import('/@/views/demo/page/desc/high/index.vue'),
75+
meta: {
76+
title: '高级详情页',
77+
},
78+
},
79+
],
80+
},
81+
// =============================desc end=============================
5482

5583
// =============================result start=============================
5684
{
@@ -81,6 +109,34 @@ const page: AppRouteModule = {
81109
},
82110
// =============================result end=============================
83111

112+
// =============================account start=============================
113+
{
114+
path: '/account',
115+
name: 'AccountPage',
116+
redirect: '/page-demo/account/setting',
117+
meta: {
118+
title: '个人页',
119+
},
120+
children: [
121+
{
122+
path: 'center',
123+
name: 'AccountCenterPage',
124+
component: () => import('/@/views/demo/page/account/center/index.vue'),
125+
meta: {
126+
title: '个人中心',
127+
},
128+
},
129+
{
130+
path: 'setting',
131+
name: 'AccountSettingPage',
132+
component: () => import('/@/views/demo/page/account/setting/index.vue'),
133+
meta: {
134+
title: '个人设置',
135+
},
136+
},
137+
],
138+
},
139+
// =============================account end=============================
84140
// =============================exception start=============================
85141
{
86142
path: '/exception',
@@ -153,35 +209,6 @@ const page: AppRouteModule = {
153209
],
154210
},
155211
// =============================exception end=============================
156-
157-
// =============================account start=============================
158-
{
159-
path: '/account',
160-
name: 'AccountPage',
161-
redirect: '/page-demo/account/setting',
162-
meta: {
163-
title: '个人页',
164-
},
165-
children: [
166-
{
167-
path: 'center',
168-
name: 'AccountCenterPage',
169-
component: () => import('/@/views/demo/page/account/center/index.vue'),
170-
meta: {
171-
title: '个人中心',
172-
},
173-
},
174-
{
175-
path: 'setting',
176-
name: 'AccountSettingPage',
177-
component: () => import('/@/views/demo/page/account/setting/index.vue'),
178-
meta: {
179-
title: '个人设置',
180-
},
181-
},
182-
],
183-
},
184-
// =============================account end=============================
185212
],
186213
};
187214

0 commit comments

Comments
 (0)