Skip to content

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>;
}