useDesign
useDesign 生成样式隔离前缀字符串
实现代码
html
<div :class="prefixCls">生成的前缀字符串<Tag>{{prefixCls}}</Tag></div>tsx
import { Button, Tag } from '@aplus-frontend/antdv';
import { useDesign } from './index';
const { prefixCls } = useDesign('custom-prefix');API
| 属性 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| scope | 字符串 | string | - |
Type Declarations
jsx
function useDesign(scope: string): {
prefixCls: string;
prefixVar: Ref<string>;
}