我有一个带有tailwind和antd的nextjs项目。当我使用antd布局组件时,会应用此样式,我无法删除它。
:where(.css-dev-only-do-not-override-12upa3x).ant-layout-header
字符串
它来自head的风格脚本:
<style data-rc-order="prependQueue" data-css-hash="twrzxg" data-token-hash="vx5xn4" data-dev-cache-path="vx5xn4|Shared|ant">:where(.css-dev-only-do-not-override-12upa3x) a{color:#1677ff;text-decoration:none;background-color:transparent;outline:none;cursor:pointer;transition:color 0.3s;-webkit-text-decoration-skip:objects;}:where(.css-dev-only-do-not-override-12upa3x) a:hover{color:#69b1ff;}:where(.css-dev-only-do-not-override-12upa3x) a:active{color:#0958d9;}:where(.css-dev-only-do-not-override-12upa3x) a:active,:where(.css-dev-only-do-not-override-12upa3x) a:hover{text-decoration:none;outline:0;}:where(.css-dev-only-do-not-override-12upa3x) a:focus{text-decoration:none;outline:0;}:where(.css-dev-only-do-not-override-12upa3x) a[disabled]{color:rgba(0, 0, 0, 0.25);cursor:not-allowed;}</style>
型
我怎么才能摆脱这个?
1条答案
按热度按时间pvabu6sv1#
你将需要使用
<StyleProvider>
as outlined here。我花了一些时间让它与我使用的来自ant design的 single 组件一起工作,这是我最终想到的:字符串
根据我的经验,StyleProvider必须是组件中的根元素。