当我运行这段代码时,会收到一条错误消息:" error:dash_bootstrap_components.Row组件(Version1.0.2)收到了一个意外的关键字参数:no_gutters允许的参数:对齐、子、className、class_name、id、className、loading_state、style“
我相信这是因为我使用的破折号引导版本。如何修改代码以使其工作?
app.layout = dbc.Container([
dbc.Row(
dbc.Col(html.H1("My Dashboard",
className='text-center'),
width=12)
),
dbc.Row([
dbc.Col([
dcc.Dropdown(id='my-dpdn', multi=False, value='A',
options=[{'label':x, 'value':x}
for x in sorted(df['Value'].unique())],
),
dcc.Graph(id='line-fig', figure={})
],# width={'size':5, 'offset':1, 'order':1},
xs=12, sm=12, md=12, lg=5, xl=5
),
dbc.Col([
dcc.Dropdown(id='my-dpdn2', multi=True, value=['B','C'],
options=[{'label':x, 'value':x}
for x in sorted(df['Value'].unique())],
),
dcc.Graph(id='line-fig2', figure={})
], #width={'size':5, 'offset':0, 'order':2},
xs=12, sm=12, md=12, lg=5, xl=5
),
], no_gutters=True, justify='start')
], fluid=True)发布于 2022-01-21 03:16:59
发布于 2022-01-30 19:15:21
您可以只需切换
no_gutters=True为
className="g-0"https://stackoverflow.com/questions/70795755
复制相似问题