import React from 'react' import { renderToString } from 'react-dom/server' import { StyleProvider, createCache, extractStyle } from '@ant-design/cssinjs' import { Form, Input, ConfigProvider } from 'antd' // 只渲染【没有 Form 包裹】的 Form.Item,看 vertical 样式是否存在 const App = () => ( ) const cache = createCache() renderToString() const css = String(extractStyle(cache, { plain: true } as never)) console.log('len', css.length) const hits = css.replace(/\s+/g, ' ').split('}').filter(r => /-vertical/.test(r)) console.log('vertical rules:', hits.length) console.log(hits.slice(0, 6).join('\n}\n'))