@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>
62 lines (61 loc) • 2.1 kB
JavaScript
;
const vue = require("vue");
const global = require("../../_utils/global.js");
const types = require("./types.js");
const styleClass = require("../../_utils/style-class.js");
const _hoisted_1 = {
key: 0,
class: "o_box-prepend"
};
const _hoisted_2 = {
key: 1,
class: "o_box-append"
};
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "InBox",
props: types.inBoxProps,
setup(__props) {
const props = __props;
const round = styleClass.getRoundClass(props, "_box");
return (_ctx, _cache) => {
var _a, _b, _c, _d;
return vue.openBlock(), vue.createElementBlock(
"div",
{
class: vue.normalizeClass(["o_box", [`o_box-${props.color}`, `o_box-${props.variant}`, `o_box-${props.size || vue.unref(global.defaultSize)}`, vue.unref(round).class.value]]),
style: vue.normalizeStyle(vue.unref(round).style.value)
},
[
((_b = (_a = _ctx.$slots).prepend) == null ? void 0 : _b.call(_a)) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.renderSlot(_ctx.$slots, "prepend")
])) : vue.createCommentVNode("v-if", true),
vue.createElementVNode(
"div",
{
class: vue.normalizeClass(["o_box-main", [
{
"o_box-disabled": props.disabled,
"o_box-readonly": props.readonly,
"o_box-focused": props.focused,
"has-prepend": _ctx.$slots.prepend,
"has-append": _ctx.$slots.append
}
]])
},
[
vue.renderSlot(_ctx.$slots, "default")
],
2
/* CLASS */
),
((_d = (_c = _ctx.$slots).append) == null ? void 0 : _d.call(_c)) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
vue.renderSlot(_ctx.$slots, "append")
])) : vue.createCommentVNode("v-if", true)
],
6
/* CLASS, STYLE */
);
};
}
});
module.exports = _sfc_main;