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>

67 lines (66 loc) 2.09 kB
"use strict"; const vue = require("vue"); const global = require("../_utils/global.js"); const icons = require("../_utils/icons.js"); require("../option/index.js"); const slot = require("./slot.js"); const OOptionList_vue_vue_type_script_setup_true_lang = require("../option/OOptionList.vue.js"); const _hoisted_1 = { key: 0, class: "o-select-options-loading" }; const _hoisted_2 = { key: 0, class: "o-select-actions" }; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "SelectOption", props: { size: {}, wrapClass: {}, loading: { type: Boolean }, optionTitle: {}, multiple: { type: Boolean } }, setup(__props) { const props = __props; const scrollbarCfg = { barClass: "o-select-options-scrollbar", size: "small", showType: "hover" }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "div", { class: vue.normalizeClass(["o-select-options", [ `o-select-options-${props.size || vue.unref(global.defaultSize)}`, { "o-select-options-multiple": props.multiple } ]]) }, [ vue.createVNode(vue.unref(OOptionList_vue_vue_type_script_setup_true_lang), { "wrap-class": props.wrapClass, scrollbar: scrollbarCfg }, { default: vue.withCtx(() => [ props.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createVNode(vue.unref(icons.IconLoading), { class: "o-rotating" }) ])) : vue.renderSlot(_ctx.$slots, vue.unref(slot).names.optionTarget, { key: 1 }) ]), _: 3 /* FORWARDED */ }, 8, ["wrap-class"]), _ctx.$slots.action ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [ vue.renderSlot(_ctx.$slots, vue.unref(slot).option.names.action) ])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); }; } }); module.exports = _sfc_main;