是否可以更改 Dash Python 应用程序生成的 HTML 页面的图标和标题?
我使用了以下代码,但它不起作用
import dash
from dash import html
app = dash.Dash(__name__)
app.layout = html.Meta([
html.Link(
rel='icon',
href='assets/icon.ico',
type='imagex/ico'
),
html.Title(
title='My App'
)
])
if __name__ == '__main__':
app.run_server(debug=True)
是的,你可以这样做
app = Dash(__name__)
app.title = "My title"
app._favicon = ("my_icon.png")
图标图像文件必须位于assets文件夹中