Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions magic_dash/templates/magic-dash-pro-fastapi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# Virtual environments
.venv


# Database files
*.db
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
Empty file.
10 changes: 9 additions & 1 deletion magic_dash/templates/magic-dash-pro-fastapi/assets/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,12 @@

#core-side-menu .ant-menu-inline {
background: none !important;
}
}

/* 侧边菜单 itemgroup 标题样式 */
#core-side-menu .ant-menu-item-group-title {
/* font-size: 16px; */
color: #8c8c8c;
text-overflow: clip; /* 取消展开/折叠动画过程中的 ... 省略号,改为直接裁剪文字 */
padding:6px; /* 调整内边距固定折叠位置 */
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,29 @@ window.dash_clientside = Object.assign({}, window.dash_clientside, {
clientside_basic: {
// 处理核心页面侧边栏展开/收起
handleSideCollapse: (nClicks, originIcon, originHeaderSideStyle, coreConfig) => {
// 是否为贯穿全宽布局(full布局下不折叠页首标题与logo组)
const isFullHeader = coreConfig.core_header_style === 'full';
// 若先前为展开状态
if (originIcon === 'antd-menu-fold') {
return [
// 更新图标
'antd-menu-unfold',
// 更新页首侧边容器样式
{
...originHeaderSideStyle,
width: 110
},
// 更新页首标题样式
{
display: 'none'
},
// 更新页首侧边容器样式(full布局保持原样)
isFullHeader
? dash_clientside.no_update
: {
...originHeaderSideStyle,
width: 88
},
// 更新页首标题样式(full布局保持原样)
isFullHeader
? dash_clientside.no_update
: {
display: 'none'
},
// 更新侧边菜单容器样式
{
width: 110
width: 88
},
// 更新侧边菜单折叠状态
true
Expand All @@ -38,13 +44,15 @@ window.dash_clientside = Object.assign({}, window.dash_clientside, {
return [
// 更新图标
'antd-menu-fold',
// 更新页首侧边容器样式
{
...originHeaderSideStyle,
width: coreConfig.core_side_width
},
// 更新页首标题样式
{},
// 更新页首侧边容器样式(full布局保持原样)
isFullHeader
? dash_clientside.no_update
: {
...originHeaderSideStyle,
width: coreConfig.core_side_width
},
// 更新页首标题样式(full布局保持原样)
isFullHeader ? dash_clientside.no_update : {},
// 更新侧边菜单容器样式
{
width: coreConfig.core_side_width
Expand Down
Loading