Comments (4)
目前我发现ProList里面引用的是CheckCard,CheckCard和Card引用的是同一个Actions组件。
Actions使用@ant-design/cssinjs的时候使用的组件的名字设置的useStyleRegister的path,但是我没有找到对应useStyleRegister对应的path参数的具体文档。
我测试了下,如果我把Actions的useStyle改为下面的代码是可以解决这个问题的。
export default function useStyle(prefixCls?: string) {
return useAntdStyle(`ProCardActions${prefixCls}`, (token) => {
const proCardActionsToken: ProCardActionsToken = {
...token,
componentCls: `.${prefixCls}`,
cardActionIconSize: 16,
};
return [genActionsStyle(proCardActionsToken)];
});
}
我猜想prefixCls变化后组件名称没有变化导致缓存的值没更新。
from pro-components.
我也遇到跟你一样的问题
我是使用路由切换页面后下面action的樣式会跑掉
前提是上一个页面有使用ProList设置actions的组件
切换到下一个页面也是有使用ProList设置actions的组件,這时就会遗失样式,然後畫面重新整理就又恢復了,超詭異
还在找原因就刚好看到你的issue
from pro-components.
可以提个pr
from pro-components.
useAntdStyle是个通用方法,我这种写法破坏了规范,我暂时没有好的想法可以解决这个问题。
from pro-components.
Related Issues (20)
- 🐛[BUG] 通过Token修改样式,顶部导航模式二级菜单背景色问题
- 🧐[问题] 可编辑表格的单元格支持上传文件吗?
- antd 的 pro-components 官网地址 需要更改
- 🐛[BUG] 使用 EditableProTable renderFormItem 下拉選單 Select 下添加任一標籤<span> form功能無法正常運作
- 🐛[BUG] ProComponents (e.g ProFormUploadButton) not fully internationalized? HOT 1
- ErrorBoundary不支持传入props? HOT 2
- 使用 EditableProTable renderFormItem 下拉選單 Select 下添加任一標籤<span> form功能無法正常運作
- column defaultSortOrder无效 HOT 2
- 🐛[BUG]EditableProTable 在 Form中使用时,受控状态下,取消编辑无效 HOT 1
- 🐛[BUG] ProFormSelect 添加 Style 属性,不会生效 HOT 2
- 🧐[问题] 在ProForm 里 怎么可以在不修改的情况下, 也可以取到 {lable:"dispaly name", value:123} HOT 5
- 🐛[BUG]秒格式化字段类型负数会错误显示 HOT 1
- 👑 [需求]ProTable 里配置columns , valueType: 'treeSelect'的时候,有个场景跟antd的TreeSelect组件不符 HOT 6
- 🧐[问题] Schema Form的valueType:formList,renderFormItem失效
- 🐛[BUG] ModalForm 子元素的`transform`函数会在初始化时触发且忽视`convertValue` HOT 5
- 🐛[BUG] ProTable filterType:'light'时,时间区间相关组件展示与valueType 不符合
- ProLayout的Sider Token没有字体大小设置,使用全局的ConfigProvidert又不生效, 难道没人觉得左侧菜单栏的字体14px太小了吗 HOT 3
- 为什么 DrawerForm onFinish 后 会造成 ProFormDependency 重新渲染 或其 依赖项重新触发 onChange?
- 🧐[问题] HOT 1
- 官网地址打开白屏 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pro-components.