UNPKG

@opensig/opendesign

Version:

<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>

24 lines (23 loc) 593 B
import { computed } from "vue"; import { defaultRound } from "./global.mjs"; function getRoundClass(props, name) { return { class: computed(() => { if (props.round === "pill" || !props.round && defaultRound.value === "pill") { return ["-", "_"].includes(name[0]) ? `o${name}-round-pill` : `o-${name}-round-pill`; } return ""; }), style: computed(() => { if (props.round) { return { [`--${name}-radius`]: props.round === "pill" ? "100vh" : props.round }; } return {}; }) }; } export { getRoundClass };