Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
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
ReactWeb5
wisdom-components
Commits
93f0d05b
Commit
93f0d05b
authored
Jan 21, 2021
by
程恺文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加组件
parent
7bf64667
Pipeline
#22798
failed with stages
in 16 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
149 additions
and
5 deletions
+149
-5
chengkaiwen_test.md
packages/chengkaiwen_test/src/chengkaiwen_test.md
+10
-0
Basis.js
packages/chengkaiwen_test/src/demos/Basis.js
+31
-0
Pagination.js
packages/chengkaiwen_test/src/demos/Pagination.js
+30
-0
Simple.js
packages/chengkaiwen_test/src/demos/Simple.js
+22
-0
a.css
packages/chengkaiwen_test/src/demos/a.css
+5
-0
index.js
packages/chengkaiwen_test/src/index.js
+46
-0
Basis.js
packages/list/src/demos/Basis.js
+5
-5
No files found.
packages/chengkaiwen_test/src/chengkaiwen_test.md
View file @
93f0d05b
---
title
:
ProList - 测试列表11
nav
:
title
:
组件
path
:
/components
group
:
path
:
/
---
<code
src=
"./demos/Simple.js"
>
packages/chengkaiwen_test/src/demos/Basis.js
0 → 100644
View file @
93f0d05b
import
React
from
'react'
;
import
{
Avatar
}
from
'antd'
;
import
List
from
'../index'
;
const
data
=
[
'上海杨树浦一期水厂1'
,
'上海杨树浦二期水厂2'
,
'上海杨树浦三期水厂43'
,
'光谷金融港一期水厂5'
,
'光谷金融港二期水厂6'
,
];
export
default
()
=>
{
return
(
<
List
itemLayout
=
"horizontal"
dataSource
=
{
data
}
renderItem
=
{(
item
)
=>
(
<
List
.
Item
>
<
List
.
Item
.
Meta
avatar
=
{
<
Avatar
src
=
"https://g.civnet.cn:5010/web4Assets/images/icon/%E7%86%8A%E7%8C%AB%E6%96%B01.png"
/>
}
title
=
{
item
}
description
=
"杨树浦水厂始建于公元1881年8月,建成于1883年8月1日正式向外供水的杨树浦水厂隶属于上海市自来水市北有限公司。"
/>
<
/List.Item
>
)}
/
>
);
};
packages/chengkaiwen_test/src/demos/Pagination.js
0 → 100644
View file @
93f0d05b
import
React
from
'react'
;
import
List
from
'../index'
;
// import {List} from "antd"
const
data
=
[];
for
(
let
i
=
0
;
i
<
23
;
i
+=
1
)
{
data
.
push
(
`上海杨树浦
${
i
.
toString
()}
期水厂`
);
}
export
default
(
props
)
=>
{
return
(
<
List
itemLayout
=
"vertical"
size
=
"large"
pagination
=
{{
onChange
:
(
page
)
=>
{
console
.
log
(
page
);
},
pageSize
:
3
,
}}
dataSource
=
{
data
}
footer
=
{
<
div
>
<
b
>
水厂统计信息
:
<
/b> footer par
t
<
/div
>
}
renderItem
=
{(
item
)
=>
<
List
.
Item
>
{
item
}
<
/List.Item>
}
/>
);
};
packages/chengkaiwen_test/src/demos/Simple.js
0 → 100644
View file @
93f0d05b
import
React
from
'react'
;
import
{
Typography
,
Divider
}
from
'antd'
;
import
'./a.css'
;
const
data
=
[
'光谷智慧园一期泵房1'
,
'光谷智慧园一期泵房2'
,
'光谷智慧园一期泵房3'
,
'光谷金融港一期水厂4'
,
'光谷金融港二期水厂5'
,
];
const
color
=
[
'red'
,
'green'
,
'olive'
,
'blue'
,
'purple'
];
export
default
()
=>
{
return
(
<>
{
data
.
map
((
v
,
i
)
=>
(
<
div
className
=
{
data
[
i
]}
title
=
{
'程恺文'
+
i
}
style
=
{{
color
:
color
[
i
]
}}
>
{
i
+
v
+
'程恺文'
}
<
/div
>
))}
<
/
>
);
};
packages/chengkaiwen_test/src/demos/a.css
0 → 100644
View file @
93f0d05b
.
光谷智慧园一期泵房
1
{
width
:
300px
;
height
:
60px
;
background-color
:
brown
;
}
packages/chengkaiwen_test/src/index.js
View file @
93f0d05b
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
List
}
from
'antd'
;
const
PandaList
=
(
props
)
=>
{
return
<
List
{...
props
}
/>
;
};
PandaList
.
defaultProps
=
{
bordered
:
false
,
className
:
'panda-list'
,
dataSource
:
[],
footer
:
<
div
className
=
"panda-list-footer"
/>
,
grid
:
undefined
,
header
:
<
div
className
=
"panda-list-header"
/>
,
itemLayout
:
undefined
,
loading
:
false
,
loadMore
:
undefined
,
locale
:
{
emptyText
:
'暂无数据'
},
pagination
:
false
,
renderItem
:
(
item
,
index
)
=>
<
List
.
Item
key
=
{
index
}
>
{
item
}
<
/List.Item>
,
size
:
'default'
,
split
:
false
,
};
PandaList
.
propTypes
=
{
bordered
:
PropTypes
.
bool
,
// 是否显示边框
className
:
PropTypes
.
string
,
// 类名称
dataSource
:
PropTypes
.
array
,
// 列表数据源
footer
:
PropTypes
.
element
,
// 列表尾部
grid
:
PropTypes
.
object
,
// 列表栅格配置
header
:
PropTypes
.
element
,
// 列表头部
itemLayout
:
PropTypes
.
string
,
// 设置 List.Item 布局, 设置成 vertical 则竖直样式显示, 默认横排
loading
:
PropTypes
.
oneOfType
([
PropTypes
.
bool
,
PropTypes
.
object
]),
// 当卡片内容还在加载中时,可以用 loading 展示一个占位
loadMore
:
PropTypes
.
element
,
// 加载更多
locale
:
PropTypes
.
object
,
// 默认文案设置,目前包括空数据文案
pagination
:
PropTypes
.
object
,
// 对应的 pagination 配置, 设置 false 不显示
renderItem
:
PropTypes
.
func
,
// 列表元素展示钩子
size
:
PropTypes
.
oneOf
([
'small'
,
'default'
,
'large'
]),
// list 的尺寸
split
:
PropTypes
.
bool
,
// 是否展示分割线
};
PandaList
.
Item
=
List
.
Item
;
PandaList
.
Item
.
Meta
=
List
.
Item
.
Meta
;
console
.
log
(
'程恺文'
);
export
default
<
h5
>
程恺文
<
/h5>
;
packages/list/src/demos/Basis.js
View file @
93f0d05b
...
...
@@ -3,11 +3,11 @@ import { Avatar } from 'antd';
import
List
from
'../index'
;
const
data
=
[
'上海杨树浦一期水厂'
,
'上海杨树浦二期水厂'
,
'上海杨树浦三期水厂'
,
'光谷金融港一期水厂'
,
'光谷金融港二期水厂'
,
'上海杨树浦一期水厂
1
'
,
'上海杨树浦二期水厂
2
'
,
'上海杨树浦三期水厂
43
'
,
'光谷金融港一期水厂
5
'
,
'光谷金融港二期水厂
6
'
,
];
export
default
()
=>
{
...
...
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