Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
b508a5b2
Unverified
Commit
b508a5b2
authored
Mar 06, 2019
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: eslint fix.
parent
7eb35815
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
222 additions
and
222 deletions
+222
-222
App.vue
src/views/account/center/page/App.vue
+112
-112
AdvancedForm.vue
src/views/form/advancedForm/AdvancedForm.vue
+0
-0
CardList.vue
src/views/list/CardList.vue
+108
-108
TableInnerEditList.vue
src/views/list/TableInnerEditList.vue
+2
-2
No files found.
src/views/account/center/page/App.vue
View file @
b508a5b2
<
template
>
<div
class=
"app-list"
>
<a-list
:grid=
"
{ gutter: 24, lg: 3, md: 2, sm: 1, xs: 1 }"
:dataSource="dataSource">
<a-list-item
slot=
"renderItem"
slot-scope=
"item
, index"
>
<a-card
:hoverable=
"true"
>
<a-card-meta>
<div
style=
"margin-bottom: 3px"
slot=
"title"
>
{{
item
.
title
}}
</div>
<a-avatar
class=
"card-avatar"
slot=
"avatar"
:src=
"item.avatar"
size=
"small"
/>
<div
class=
"meta-cardInfo"
slot=
"description"
>
<div>
<p>
活跃用户
</p>
<p>
<span>
{{
item
.
activeUser
}}
<span>
万
</span></span>
</p>
</div>
<div>
<p>
新增用户
</p>
<p>
{{
item
.
newUser
|
NumberFormat
}}
</p>
</div>
</div>
</a-card-meta>
<template
class=
"ant-card-actions"
slot=
"actions"
>
<a>
<a-icon
type=
"download"
/>
</a>
<a>
<a-icon
type=
"edit"
/>
</a>
<a>
<a-icon
type=
"share-alt"
/>
</a>
<a>
<a-dropdown>
<a
class=
"ant-dropdown-link"
href=
"javascript:;"
>
<a-icon
type=
"ellipsis"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
1st menu item
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
2nd menu item
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
3rd menu item
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</a>
</
template
>
</a-card>
</a-list-item>
</a-list>
</div>
</template>
<
script
>
const
dataSource
=
[]
for
(
let
i
=
0
;
i
<
11
;
i
++
)
{
dataSource
.
push
({
title
:
'Alipay'
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png'
,
activeUser
:
17
,
newUser
:
1700
})
}
export
default
{
name
:
'Article'
,
components
:
{},
data
()
{
return
{
dataSource
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.app-list
{
.meta-cardInfo
{
zoom
:
1
;
margin-top
:
16px
;
>
div
{
position
:
relative
;
text-align
:
left
;
float
:
left
;
width
:
50%
;
p
{
line-height
:
32px
;
font-size
:
24px
;
margin
:
0
;
&:first-child
{
color
:
rgba
(
0
,
0
,
0
,
.45
);
font-size
:
12px
;
line-height
:
20px
;
margin-bottom
:
4px
;
}
}
}
}
}
<
template
>
<div
class=
"app-list"
>
<a-list
:grid=
"
{ gutter: 24, lg: 3, md: 2, sm: 1, xs: 1 }"
:dataSource="dataSource">
<a-list-item
slot=
"renderItem"
slot-scope=
"item
"
>
<a-card
:hoverable=
"true"
>
<a-card-meta>
<div
style=
"margin-bottom: 3px"
slot=
"title"
>
{{
item
.
title
}}
</div>
<a-avatar
class=
"card-avatar"
slot=
"avatar"
:src=
"item.avatar"
size=
"small"
/>
<div
class=
"meta-cardInfo"
slot=
"description"
>
<div>
<p>
活跃用户
</p>
<p>
<span>
{{
item
.
activeUser
}}
<span>
万
</span></span>
</p>
</div>
<div>
<p>
新增用户
</p>
<p>
{{
item
.
newUser
|
NumberFormat
}}
</p>
</div>
</div>
</a-card-meta>
<template
class=
"ant-card-actions"
slot=
"actions"
>
<a>
<a-icon
type=
"download"
/>
</a>
<a>
<a-icon
type=
"edit"
/>
</a>
<a>
<a-icon
type=
"share-alt"
/>
</a>
<a>
<a-dropdown>
<a
class=
"ant-dropdown-link"
href=
"javascript:;"
>
<a-icon
type=
"ellipsis"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
1st menu item
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
2nd menu item
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
3rd menu item
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</a>
</
template
>
</a-card>
</a-list-item>
</a-list>
</div>
</template>
<
script
>
const
dataSource
=
[]
for
(
let
i
=
0
;
i
<
11
;
i
++
)
{
dataSource
.
push
({
title
:
'Alipay'
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png'
,
activeUser
:
17
,
newUser
:
1700
})
}
export
default
{
name
:
'Article'
,
components
:
{},
data
()
{
return
{
dataSource
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.app-list
{
.meta-cardInfo
{
zoom
:
1
;
margin-top
:
16px
;
>
div
{
position
:
relative
;
text-align
:
left
;
float
:
left
;
width
:
50%
;
p
{
line-height
:
32px
;
font-size
:
24px
;
margin
:
0
;
&:first-child
{
color
:
rgba
(
0
,
0
,
0
,
.45
);
font-size
:
12px
;
line-height
:
20px
;
margin-bottom
:
4px
;
}
}
}
}
}
</
style
>
src/views/form/advancedForm/AdvancedForm.vue
View file @
b508a5b2
This diff is collapsed.
Click to expand it.
src/views/list/CardList.vue
View file @
b508a5b2
<
template
>
<div
class=
"card-list"
ref=
"content"
>
<a-list
:grid=
"
{gutter: 24, lg: 3, md: 2, sm: 1, xs: 1}"
:dataSource="dataSource"
>
<a-list-item
slot=
"renderItem"
slot-scope=
"item
, index"
>
<template
v-if=
"item === null"
>
<a-button
class=
"new-btn"
type=
"dashed"
>
<a-icon
type=
"plus"
/>
新增产品
</a-button>
</
template
>
<
template
v-else
>
<a-card
:hoverable=
"true"
>
<a-card-meta>
<div
style=
"margin-bottom: 3px"
slot=
"title"
>
{{
item
.
title
}}
</div>
<a-avatar
class=
"card-avatar"
slot=
"avatar"
:src=
"item.avatar"
size=
"large"
/>
<div
class=
"meta-content"
slot=
"description"
>
{{
item
.
content
}}
</div>
</a-card-meta>
<template
class=
"ant-card-actions"
slot=
"actions"
>
<a>
操作一
</a>
<a>
操作二
</a>
</
template
>
</a-card>
</template>
</a-list-item>
</a-list>
</div>
</template>
<
script
>
const
dataSource
=
[]
dataSource
.
push
(
null
)
for
(
let
i
=
0
;
i
<
11
;
i
++
)
{
dataSource
.
push
({
title
:
'Alipay'
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png'
,
content
:
'在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。'
})
}
export
default
{
name
:
'CardList'
,
data
()
{
return
{
description
:
'段落示意:蚂蚁金服务设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态, 提供跨越设计与开发的体验解决方案。'
,
linkList
:
[
{
icon
:
'rocket'
,
href
:
'#'
,
title
:
'快速开始'
},
{
icon
:
'info-circle-o'
,
href
:
'#'
,
title
:
'产品简介'
},
{
icon
:
'file-text'
,
href
:
'#'
,
title
:
'产品文档'
}
],
extraImage
:
'https://gw.alipayobjects.com/zos/rmsportal/RzwpdLnhmvDJToTdfDPe.png'
,
dataSource
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.card-avatar
{
width
:
48px
;
height
:
48px
;
border-radius
:
48px
;
}
.ant-card-actions
{
background
:
#f7f9fa
;
li
{
float
:
left
;
text-align
:
center
;
margin
:
12px
0
;
color
:
rgba
(
0
,
0
,
0
,
0.45
);
width
:
50%
;
&:not(:last-child)
{
border-right
:
1px
solid
#e8e8e8
;
}
a
{
color
:
rgba
(
0
,
0
,
0
,
.45
);
line-height
:
22px
;
display
:
inline-block
;
width
:
100%
;
&:hover
{
color
:
#1890ff
;
}
}
}
}
.new-btn
{
background-color
:
#fff
;
border-radius
:
2px
;
width
:
100%
;
height
:
188px
;
}
.meta-content
{
position
:
relative
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
height
:
64px
;
-webkit-line-clamp
:
3
;
-webkit-box-orient
:
vertical
;
}
<
template
>
<div
class=
"card-list"
ref=
"content"
>
<a-list
:grid=
"
{gutter: 24, lg: 3, md: 2, sm: 1, xs: 1}"
:dataSource="dataSource"
>
<a-list-item
slot=
"renderItem"
slot-scope=
"item
"
>
<template
v-if=
"item === null"
>
<a-button
class=
"new-btn"
type=
"dashed"
>
<a-icon
type=
"plus"
/>
新增产品
</a-button>
</
template
>
<
template
v-else
>
<a-card
:hoverable=
"true"
>
<a-card-meta>
<div
style=
"margin-bottom: 3px"
slot=
"title"
>
{{
item
.
title
}}
</div>
<a-avatar
class=
"card-avatar"
slot=
"avatar"
:src=
"item.avatar"
size=
"large"
/>
<div
class=
"meta-content"
slot=
"description"
>
{{
item
.
content
}}
</div>
</a-card-meta>
<template
class=
"ant-card-actions"
slot=
"actions"
>
<a>
操作一
</a>
<a>
操作二
</a>
</
template
>
</a-card>
</template>
</a-list-item>
</a-list>
</div>
</template>
<
script
>
const
dataSource
=
[]
dataSource
.
push
(
null
)
for
(
let
i
=
0
;
i
<
11
;
i
++
)
{
dataSource
.
push
({
title
:
'Alipay'
,
avatar
:
'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png'
,
content
:
'在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。'
})
}
export
default
{
name
:
'CardList'
,
data
()
{
return
{
description
:
'段落示意:蚂蚁金服务设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态, 提供跨越设计与开发的体验解决方案。'
,
linkList
:
[
{
icon
:
'rocket'
,
href
:
'#'
,
title
:
'快速开始'
},
{
icon
:
'info-circle-o'
,
href
:
'#'
,
title
:
'产品简介'
},
{
icon
:
'file-text'
,
href
:
'#'
,
title
:
'产品文档'
}
],
extraImage
:
'https://gw.alipayobjects.com/zos/rmsportal/RzwpdLnhmvDJToTdfDPe.png'
,
dataSource
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.card-avatar
{
width
:
48px
;
height
:
48px
;
border-radius
:
48px
;
}
.ant-card-actions
{
background
:
#f7f9fa
;
li
{
float
:
left
;
text-align
:
center
;
margin
:
12px
0
;
color
:
rgba
(
0
,
0
,
0
,
0.45
);
width
:
50%
;
&:not(:last-child)
{
border-right
:
1px
solid
#e8e8e8
;
}
a
{
color
:
rgba
(
0
,
0
,
0
,
.45
);
line-height
:
22px
;
display
:
inline-block
;
width
:
100%
;
&:hover
{
color
:
#1890ff
;
}
}
}
}
.new-btn
{
background-color
:
#fff
;
border-radius
:
2px
;
width
:
100%
;
height
:
188px
;
}
.meta-content
{
position
:
relative
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
height
:
64px
;
-webkit-line-clamp
:
3
;
-webkit-box-orient
:
vertical
;
}
</
style
>
src/views/list/TableInnerEditList.vue
View file @
b508a5b2
...
...
@@ -83,7 +83,7 @@
:alert=
"{ show: true, clear: true }"
:rowSelection=
"{ selectedRowKeys: this.selectedRowKeys, onChange: this.onSelectChange }"
>
<
template
v-for=
"(col, index) in columns"
v-if=
"col.scopedSlots"
:slot=
"col.dataIndex"
slot-scope=
"text, record
, index
"
>
<
template
v-for=
"(col, index) in columns"
v-if=
"col.scopedSlots"
:slot=
"col.dataIndex"
slot-scope=
"text, record"
>
<div
:key=
"index"
>
<a-input
v-if=
"record.editable"
...
...
@@ -94,7 +94,7 @@
<template
v-else
>
{{
text
}}
</
template
>
</div>
</template>
<
template
slot=
"action"
slot-scope=
"text, record
, index
"
>
<
template
slot=
"action"
slot-scope=
"text, record"
>
<div
class=
"editable-row-operations"
>
<span
v-if=
"record.editable"
>
<a
@
click=
"() => save(record)"
>
保存
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment