feffery_antd_components 0.2.10-rc14 → 0.2.10-rc15
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/DESCRIPTION +1 -1
- package/Project.toml +1 -1
- package/build/lib/feffery_antd_components/AntdTable.py +5 -3
- package/build/lib/feffery_antd_components/AntdTree.py +7 -3
- package/build/lib/feffery_antd_components/AntdUpload.py +2 -0
- package/build/lib/feffery_antd_components/async-antd_table.js +1 -1
- package/build/lib/feffery_antd_components/async-antd_upload.js +1 -1
- package/build/lib/feffery_antd_components/feffery_antd_components.min.js +1 -1
- package/build/lib/feffery_antd_components/metadata.json +33 -0
- package/build/lib/feffery_antd_components/package-info.json +1 -1
- package/feffery_antd_components/AntdTable.py +5 -3
- package/feffery_antd_components/AntdTree.py +7 -3
- package/feffery_antd_components/AntdUpload.py +2 -0
- package/feffery_antd_components/async-antd_table.js +1 -1
- package/feffery_antd_components/async-antd_upload.js +1 -1
- package/feffery_antd_components/feffery_antd_components.min.js +1 -1
- package/feffery_antd_components/metadata.json +33 -0
- package/feffery_antd_components/package-info.json +1 -1
- package/package.json +1 -1
- package/src/jl/'feffery'_antdtable.jl +2 -1
- package/src/jl/'feffery'_antdtree.jl +3 -1
- package/src/jl/'feffery'_antdupload.jl +2 -1
- package/src/lib/components/dataDisplay/AntdTable.react.js +8 -2
- package/src/lib/components/dataDisplay/AntdTree.react.js +65 -3
- package/src/lib/components/dataEntry/upload/AntdUpload.react.js +4 -0
- package/src/lib/components/styles.css +5 -0
- package/src/lib/fragments/AntdTable.react.js +3 -3
- package/src/lib/fragments/upload/AntdUpload.react.js +3 -249
- package/usage.py +64 -9
package/usage.py
CHANGED
|
@@ -1,18 +1,64 @@
|
|
|
1
1
|
import dash
|
|
2
|
-
from dash import html, dcc
|
|
3
2
|
import feffery_antd_components as fac
|
|
4
|
-
from dash.dependencies import Input, Output
|
|
3
|
+
from dash.dependencies import Input, Output
|
|
5
4
|
|
|
6
|
-
app = dash.Dash(__name__, compress=True
|
|
5
|
+
app = dash.Dash(__name__, compress=True)
|
|
7
6
|
|
|
8
|
-
app.layout = html.Div(
|
|
7
|
+
app.layout = dash.html.Div(
|
|
9
8
|
[
|
|
10
|
-
fac.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
fac.AntdSpace(
|
|
10
|
+
[
|
|
11
|
+
fac.AntdInput(
|
|
12
|
+
id='search-keyword',
|
|
13
|
+
placeholder='请输入搜索关键词',
|
|
14
|
+
style={
|
|
15
|
+
'width': 250
|
|
16
|
+
}
|
|
17
|
+
),
|
|
18
|
+
fac.AntdTree(
|
|
19
|
+
id='demo-tree',
|
|
20
|
+
treeData=[
|
|
21
|
+
{
|
|
22
|
+
'title': '四川省',
|
|
23
|
+
'key': '四川省',
|
|
24
|
+
'children': [
|
|
25
|
+
{
|
|
26
|
+
'title': '成都市',
|
|
27
|
+
'key': '成都市'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
'title': '广安市',
|
|
31
|
+
'key': '广安市'
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
'title': '重庆市',
|
|
37
|
+
'key': '重庆市',
|
|
38
|
+
'children': [
|
|
39
|
+
{
|
|
40
|
+
'title': '渝中区',
|
|
41
|
+
'key': '渝中区',
|
|
42
|
+
'children': [
|
|
43
|
+
{
|
|
44
|
+
'title': '解放碑街道',
|
|
45
|
+
'key': '解放碑街道'
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
'title': '渝北区',
|
|
51
|
+
'key': '渝北区'
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
defaultExpandAll=True
|
|
57
|
+
)
|
|
58
|
+
],
|
|
59
|
+
direction='vertical',
|
|
14
60
|
style={
|
|
15
|
-
'width':
|
|
61
|
+
'width': '100%'
|
|
16
62
|
}
|
|
17
63
|
)
|
|
18
64
|
],
|
|
@@ -22,5 +68,14 @@ app.layout = html.Div(
|
|
|
22
68
|
)
|
|
23
69
|
|
|
24
70
|
|
|
71
|
+
@app.callback(
|
|
72
|
+
Output('demo-tree', 'searchKeyword'),
|
|
73
|
+
Input('search-keyword', 'value')
|
|
74
|
+
)
|
|
75
|
+
def filter_tree(keyword):
|
|
76
|
+
|
|
77
|
+
return keyword
|
|
78
|
+
|
|
79
|
+
|
|
25
80
|
if __name__ == '__main__':
|
|
26
81
|
app.run(debug=True)
|