feffery_antd_components 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/usage.py CHANGED
@@ -8,7 +8,163 @@ app = dash.Dash(__name__)
8
8
 
9
9
  app.layout = html.Div(
10
10
  [
11
+ fac.AntdTable(
12
+ selectedRowKeys=['2', '4'],
13
+ rowSelectionWidth='5rem',
14
+ columns=[
15
+ {
16
+ 'title': '默认的checkbox模式',
17
+ 'dataIndex': f'默认的checkbox模式',
18
+ 'width': 400
19
+ },
20
+ {
21
+ 'title': '自定义选项的checkbox模式',
22
+ 'dataIndex': '自定义选项的checkbox模式',
23
+ 'width': 400
24
+ },
25
+ {
26
+ 'title': 'keyword模式',
27
+ 'dataIndex': 'keyword模式',
28
+ 'width': 400
29
+ }
30
+ ],
31
+ containerId='docs-content',
32
+ sticky=True,
33
+ pagination={
34
+ 'pageSize': 100
35
+ },
36
+ data=[
37
+ {
38
+ '默认的checkbox模式': i,
39
+ '自定义选项的checkbox模式': i,
40
+ 'keyword模式': i
41
+ }
42
+ for i in range(500)
43
+ ],
44
+ filterOptions={
45
+ '默认的checkbox模式': {
46
+ 'filterMode': 'keyword'
47
+ },
48
+ '自定义选项的checkbox模式': {
49
+ 'filterMode': 'keyword'
50
+ },
51
+ 'keyword模式': {
52
+ 'filterMode': 'keyword'
53
+ }
54
+ },
55
+ rowSelectionType='checkbox',
56
+ style={
57
+ 'width': '600px'
58
+ }
59
+ ),
60
+
61
+ html.Div(
62
+ [
63
+ fac.AntdAlert(
64
+ description='好样的',
65
+ message=[
66
+ html.Div(
67
+ [
68
+ fac.AntdText(
69
+ '这是一段测试文字,'
70
+ ),
71
+ fac.AntdText(
72
+ '加粗',
73
+ strong=True
74
+ ),
75
+ html.A(
76
+ '链接',
77
+ href='/'
78
+ )
79
+ ]
80
+ )
81
+ ],
82
+ showIcon=True
83
+ )
84
+ ]
85
+ ),
86
+
87
+
88
+ html.Div(
89
+ [
90
+ fac.AntdAlert(
91
+ description='这是一段辅助说明文字',
92
+ message=[
93
+ '君不见黄河之水天上来',
94
+ '奔流到海不复回',
95
+ '君不见高堂明镜悲白发',
96
+ '朝如青丝暮成雪',
97
+ '人生得意须尽欢',
98
+ '莫使金樽空对月',
99
+ '天生我材必有用',
100
+ '千金散尽还复来'
101
+ ],
102
+ showIcon=True,
103
+ messageRenderMode='loop-text'
104
+ )
105
+ ]
106
+ ),
107
+
108
+ html.Div(
109
+ [
110
+ fac.AntdAlert(
111
+ '这是一段辅助说明文字',
112
+ message=','.join([
113
+ '君不见黄河之水天上来',
114
+ '奔流到海不复回',
115
+ '君不见高堂明镜悲白发',
116
+ '朝如青丝暮成雪',
117
+ '人生得意须尽欢',
118
+ '莫使金樽空对月',
119
+ '天生我材必有用',
120
+ '千金散尽还复来'
121
+ ]) + '。',
122
+ description='这是跑马灯模式示例',
123
+ showIcon=True,
124
+ messageRenderMode='marquee'
125
+ )
126
+ ]
127
+ ),
11
128
 
129
+ fac.AntdRadioGroup(
130
+ options=[
131
+ {
132
+ 'label': f'选项{i}',
133
+ 'value': f'选项{i}'
134
+ }
135
+ for i in range(5)
136
+ ],
137
+ defaultValue='选项1'
138
+ ),
139
+
140
+ fac.AntdSpace(
141
+ [
142
+ html.Div(
143
+ '输入框',
144
+ style={
145
+ 'height': '32px',
146
+ 'lineHeight': '32px',
147
+ 'backgroundColor': 'rgb(241, 241, 241)',
148
+ 'paddingLeft': '8px',
149
+ 'paddingRight': '8px',
150
+ 'borderTopLeftRadius': '5px',
151
+ 'borderBottomLeftRadius': '5px',
152
+ }
153
+ ),
154
+ fac.AntdInput(
155
+ style={
156
+ 'width': '100px'
157
+ }
158
+ )
159
+ ],
160
+ size=0
161
+ ),
162
+
163
+ html.Div(
164
+ style={
165
+ 'height': '200px'
166
+ }
167
+ ),
12
168
 
13
169
  fac.AntdRadioGroup(
14
170
  options=[
@@ -195,9 +351,8 @@ app.layout = html.Div(
195
351
  '字段示例2': i,
196
352
  '字段示例3': i
197
353
  }
198
- for i in range(5)
199
- ],
200
- rowSelectionType='radio'
354
+ for i in range(30)
355
+ ]
201
356
  ),
202
357
 
203
358
  fac.AntdSpace(
@@ -821,7 +976,8 @@ app.layout = html.Div(
821
976
  )
822
977
  ],
823
978
  style={
824
- 'height': '100vh'
979
+ 'height': '100vh',
980
+ 'padding': '50px'
825
981
  }
826
982
  )
827
983