UNPKG

birdpaper-ui

Version:

一个通用的 vue3 UI组件库。A common vue3 UI component library.

32 lines (31 loc) 1.51 kB
import _sfc_main from "./checkbox.vue2.js"; import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, renderSlot } from "vue"; import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js"; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_IconCheckLine = resolveComponent("IconCheckLine"); const _component_IconSubtractLine = resolveComponent("IconSubtractLine"); return openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.cls), onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)) }, [ createElementVNode("input", { type: "checkbox", class: normalizeClass(`${_ctx.name}-inner`) }, null, 2), createElementVNode("span", { class: normalizeClass([`${_ctx.name}-checkbox`, _ctx.isCheck ? `${_ctx.name}-check` : ""]) }, [ _ctx.isCheck && !_ctx.indeterminate ? (openBlock(), createBlock(_component_IconCheckLine, { key: 0 })) : createCommentVNode("", true), _ctx.isCheck && _ctx.indeterminate ? (openBlock(), createBlock(_component_IconSubtractLine, { key: 1 })) : createCommentVNode("", true) ], 2), createElementVNode("span", { class: normalizeClass(`${_ctx.name}-label`) }, [ renderSlot(_ctx.$slots, "default") ], 2) ], 2); } const _checkbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { _checkbox as default };