ProLayout 新版本欢迎试用 #4945
Replies: 43 comments 8 replies
-
Amazing😆 可以在@umijs/plugin-layout中使用吗? |
Beta Was this translation helpful? Give feedback.
-
可以的, @umijs/plugin-layout 会拿用户package.json 的问题 |
Beta Was this translation helpful? Give feedback.
-
PageContainer 区域颜色搭配上会不会太丑了 |
Beta Was this translation helpful? Give feedback.
-
做了 token 可以配置,设计师是想让主要内容更吸引注意力 |
Beta Was this translation helpful? Give feedback.
-
有没有一个在线预览的新版本呢 |
Beta Was this translation helpful? Give feedback.
-
这里看 https://pro-components-preview-pr-4734.surge.sh/components/layout 相关pr: #4734 (comment) |
Beta Was this translation helpful? Give feedback.
-
的确是不好看 |
Beta Was this translation helpful? Give feedback.
-
token headerBgColor 设置无效, header background始终为transparent |
Beta Was this translation helpful? Give feedback.
-
升级一下最新的版本。 |
Beta Was this translation helpful? Give feedback.
-
升级了下到7.0.1-beta.2,设置 headerBgColor还是无效 |
Beta Was this translation helpful? Give feedback.
-
pro 大概什么时候换上呀? @chenshuai2144 |
Beta Was this translation helpful? Give feedback.
-
@leshalv 要等antd的新版本发布了 |
Beta Was this translation helpful? Give feedback.
-
菜单没有选中效果了 |
Beta Was this translation helpful? Give feedback.
-
网站上看起来没问题,你有复现吗 |
Beta Was this translation helpful? Give feedback.
-
layoutbug.mp4看起来是一个bug 收起后打开闪了一下 |
Beta Was this translation helpful? Give feedback.
-
移动端有适配计划吗? |
Beta Was this translation helpful? Give feedback.
-
https://pro-components-preview-pr-4734.surge.sh/~demos/layout-base/?layout=mix&splitMenus=true F12缩小屏幕,点击展开按钮,无法打开菜单 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
内容区域使用 Tabs,有一个 Tab 为Form并采用固定页脚,另一个Tab 是 Table,切换到Table后,还是展示固定页脚。 @chenshuai2144 |
Beta Was this translation helpful? Give feedback.
-
移动端侧边栏收起后,trigger按钮样式错位且无法点击 |
Beta Was this translation helpful? Give feedback.
-
splitMenus false时, headerBgColor生效,headerTitleColor不生效 |
Beta Was this translation helpful? Give feedback.
-
Token 对应的颜色,放出设计稿 + 标注一下多好啊!更清晰、一目了然。 |
Beta Was this translation helpful? Give feedback.
-
看这个效果图,submenuitem 文本的 |
Beta Was this translation helpful? Give feedback.
-
token特性正式版本有了吗 |
Beta Was this translation helpful? Give feedback.
-
最新的版本那个收缩按钮能够保持和老版本一样的位置吗,在左下角。 |
Beta Was this translation helpful? Give feedback.
-
想要 menu const [pathname, setPathname] = useState('/list/xxx');
location={{
pathname,
}}
menuItemRender={(item, dom) => (
<div onClick={() => setPathname(item.path || '/welcome')}>
{dom}
</div>
)} 在旧版的 app.tsx layout 里没法用。 |
Beta Was this translation helpful? Give feedback.
-
一级菜单个数超过页面能显示的数量后没有增加省略号显示,而是覆盖了头像区域 |
Beta Was this translation helpful? Give feedback.
-
token Sider Token 缺少 menuItem 的选中字体颜色 |
Beta Was this translation helpful? Give feedback.
-
In my case, the token is not behaving dynamically. Is there any way to achieve dynamic dark mode for the Pro Layout? Please see my #6056 (comment). |
Beta Was this translation helpful? Give feedback.
-
查看这里直接访问 https://next-procomponents.ant.design/components/layout
基于 css in js 的方案让我们可以动态的设置布局的主题,以下是支持自定的token 列表。
Token
Token 是一种设计系统的基本元素,可以使用 Token 快速的修改组件库的基础样式。Layout 中可以通过 token 属性来配置这些颜色。
默认的 token
默认的 token 部分来自于 antd,可能会有一些改动,以下是 layout 依赖的部分。
#1677FF
#ff4d4f
#52c41a
#1677FF
#faad14
rgba(0, 0, 0, 0.85)
rgba(0, 0, 0, 0.65)
rgba(0, 0, 0, 0.45)
#d9d9d9
rgba(0, 0, 0, 0.06)
4px
Layout 的 token
#f0f2f5
#666
rgba(0, 0, 0, 0.65)
rgba(0, 0, 0, 0.04)
Sider Token
Sider Token 是 侧边菜单的色值,与顶部菜单不同。
transparent
headingColor
borderColorSplit
rgba(0, 0, 0, 0.25)
textColor
textColor
rgb(0,0,0)
rgba(90, 75, 75, 0.03)
rgba(0, 0, 0, 0.04)
rgba(0, 145, 255, 0.1)
rgba(0, 145, 255, 0.08)
#fff
menuTextColorSecondary
menuTextColor
Header Token
headingColor
textColor
textColor
rgb(0,0,0)
rgba(90, 75, 75, 0.03)
rgba(0, 0, 0, 0.04)
rgba(0, 145, 255, 0.1)
rgba(0, 145, 255, 0.08)
textColorSecondary
rgba(0, 0, 0, 0.03)
pageContainer Token
#fff
transparent
#FFF
🎏 如何升级到最新版本?
我们可以使用 next 标签来安装最新版本的 ProLayout。
新版本的 ProLayout 主要是样式上的升级, API 变化不是很大的。
rightContentRender
修改为avatarProps
和actionsRender
, 对头像模式做了默认抽象。layout=sider
模式下,header 消失,只保留了侧边栏,增大可视面积。layout=sider
模式下,header 消失后,右侧操作区域修改为左下角。appList
,用于进行多站点之前的导航。修改的 API 列表
[AvatarProps](https://ant.design/components/avatar-cn/)
(layoutProps)=>ReactNode[]
{ icon, title, desc:, url }[]
另外此次的最大改变在于样式的重写,减少了 less 的导入,所以样式覆盖的功能需要重新设置。
🙋 反馈给我们
ProLayout 暂时还在测试模式,并且使用了 css in js 的技术,可能会有一些无法覆盖的角落,如果你在使用中碰到了问题,欢迎来给我们报告。
你可以在钉钉群 和 github 中找到我们。
Beta Was this translation helpful? Give feedback.
All reactions