Skip to content

Commit 3a61899

Browse files
committed
update Dash
1 parent 140a6d9 commit 3a61899

3 files changed

Lines changed: 87 additions & 89 deletions

File tree

Dash/components.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
dbc.DropdownMenuItem("Active", active=True)
2121
]
2222

23-
2423
# ---------------------------------------------------------------------------------------
2524
email_input = dbc.FormGroup(children=[
2625
dbc.Label("Email", html_for="example-email"),
@@ -34,7 +33,6 @@
3433
dbc.FormText("A password stops mean people taking your stuff", color="secondary"),
3534
])
3635

37-
3836
# ---------------------------------------------------------------------------------------
3937
email_input_row = dbc.FormGroup(children=[
4038
dbc.Label("Email", html_for="example-email-row", width=2),
@@ -46,7 +44,6 @@
4644
dbc.Col(dbc.Input(type="password", id="example-password-row", placeholder="Enter password"), width=10)
4745
], row=True)
4846

49-
5047
# ---------------------------------------------------------------------------------------
5148
radioitems = dbc.FormGroup(children=[
5249
dbc.Label("Choose one"),
@@ -64,7 +61,6 @@
6461
], values=[1, 2]),
6562
], className="bg-light")
6663

67-
6864
# ---------------------------------------------------------------------------------------
6965
radioitems_inline = dbc.FormGroup(children=[
7066
dbc.Label("Choose one"),
@@ -82,7 +78,6 @@
8278
], values=[1, 2], inline=True),
8379
], className="bg-light")
8480

85-
8681
# ---------------------------------------------------------------------------------------
8782
tab1_content = dbc.Card(children=dbc.CardBody([
8883
dbc.CardText("This is tab 1!"),
@@ -97,6 +92,7 @@
9792
)
9893

9994

95+
# ---------------------------------------------------------------------------------------
10096
def generate_table(dataframe, max_rows=10, size="md"):
10197
"""
10298
创建表

Dash/config.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,50 @@
2626
primary / secondary / success / danger / warning / info
2727
2828
Borders:
29-
border, border-top, border-primary,
30-
border-light, border-dark, border-white
29+
border, border-top, border-0, border-top-0,
30+
border-primary, border-light, border-dark, border-white
3131
rounded, rounded-top, rounded-circle, rounded-0
3232
3333
Color:
3434
Text: text-primary, text-light, text-dark, text-white, text-muted
3535
Backgroud: bg-primary, bg-light, bg-dark, bg-white, bg-gradient-primary, bg-gradient-light, bg-gradient-dark
3636
3737
Display:
38-
d-[none/inline/inline-block/block/table/table-cell/table-row/flex/inline-flex]
39-
d-[sm/md/lg/xl]-[none/inline...]
38+
d-[sm/md/lg/xl]-[none/inline/inline-block/block/table/table-cell/table-row/flex/inline-flex]
39+
d-print-[none/inline/inline-block/block/table/table-cell/table-row/flex/inline-flex]
4040
4141
Flex:
42-
Display: d-flex, d-inline-flex
42+
Display: d-flex, d-inline-flex, d-sm-flex, d-sm-inline-flex
4343
Direction: flex-row, flex-row-reverse, flex-column, flex-column-reverse
4444
Justify content: justify-content-[start/end/center/between/around]
4545
Align items: align-items-[start/end/center/baseline/stretch]
4646
Align self: align-self-[start/end/center/baseline/stretch]
4747
Align content: align-content-[start/end/center/around/stretch]
48-
Wrap: flex-wrap, flex-nowrap
48+
Wrap: flex-wrap, flex-nowrap, flex-wrap-reverse
4949
5050
Float:
51-
float-left, float-right, float-none, float-sm-left
51+
float-left, float-right, float-none, float-sm-left, float-sm-right, float-sm-none
5252
5353
Position:
5454
position-static, position-relative, position-absolute, position-fixed, position-sticky
5555
5656
Sizing:
57-
w-25, w-50, w-75, w-100, mw-50, mw-100
58-
h-25, h-50, h-75, h-100, mh-50, mh-100
57+
w-25, w-50, w-75, w-100, mw-50, mw-100 [m is max]
58+
h-25, h-50, h-75, h-100, mh-50, mh-100 [m is max]
5959
6060
Spacing:
61-
Margin: m-2, mt-1, mr-2, mb-3, ml-4, mx-3, my-2, m-auto
62-
Padding: p-2, pt-1, pr-2, pb-3, pl-4, px-3, py-2, p-auto
61+
Margin: m-1, mt-1, mr-2, mb-3, ml-4, mx-3, my-2, m-auto
62+
Padding: p-1, pt-1, pr-2, pb-3, pl-4, px-3, py-2, p-auto
6363
6464
Text:
65-
text-primary, text-light, text-dark, text-white, text-muted
65+
text-nowrap, text-justify
6666
text-left, text-center, text-right, text-sm-left, text-lg-left
6767
text-lowercase, text-uppercase, text-capitalize
68-
font-weight-[bold/normal/light], font-italic
68+
font-weight-bold, font-weight-normal, font-weight-light, font-italic
6969
7070
Vertical alignment:
71-
align-baseline, align-top, align-middle, align-bottom, align-text-top, align-text-bottom
71+
align-baseline, align-top, align-middle, align-bottom
72+
align-text-top, align-text-bottom
7273
7374
Visibility:
7475
visible, invisible

0 commit comments

Comments
 (0)