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>

33 lines (32 loc) 1.07 kB
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createBlock, unref, resolveDynamicComponent } from "vue"; import { IconLoading } from "../_utils/icons.mjs"; import { iconProps } from "./types.mjs"; const _hoisted_1 = ["tabindex"]; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "OIcon", props: iconProps, setup(__props) { const props = __props; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(["o-icon", [ { "o-icon-btn": props.button, "o-icon-btn-disabled": props.disabled } ]]), tabindex: props.button ? 0 : "" }, [ renderSlot(_ctx.$slots, "default", {}, () => [ props.loading ? (openBlock(), createBlock(unref(IconLoading), { key: 0, class: "o-rotating" })) : (openBlock(), createBlock(resolveDynamicComponent(props.icon), { key: 1 })) ]) ], 10, _hoisted_1); }; } }); export { _sfc_main as default };