UNPKG

birdpaper-ui

Version:

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

101 lines (100 loc) 4.32 kB
import _sfc_main from "./drawer.vue2.js"; import { resolveComponent, openBlock, createBlock, Teleport, withDirectives, createElementVNode, normalizeClass, createVNode, Transition, withCtx, vShow, withModifiers, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementBlock, createTextVNode } from "vue"; import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js"; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_IconCloseLine = resolveComponent("IconCloseLine"); const _component_bp_button = resolveComponent("bp-button"); const _component_bp_space = resolveComponent("bp-space"); return openBlock(), createBlock(Teleport, { to: "body" }, [ withDirectives(createElementVNode("div", { class: normalizeClass(`${_ctx.name}-container`) }, [ createVNode(Transition, { name: "fade-modal-mask" }, { default: withCtx(() => [ withDirectives(createElementVNode("div", { class: normalizeClass(`${_ctx.name}-mask`) }, null, 2), [ [vShow, _ctx.modelValue] ]) ]), _: 1 }), createVNode(Transition, { name: "drawer-fade" }, { default: withCtx(() => [ withDirectives(createElementVNode("div", { class: normalizeClass(`${_ctx.name}-wrapper`), onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleMaskClick && _ctx.handleMaskClick(...args), ["self"])) }, [ createElementVNode("div", { class: normalizeClass(_ctx.cls), style: normalizeStyle(`width:${_ctx.width};`) }, [ createElementVNode("div", { class: normalizeClass(`${_ctx.name}-header`) }, [ createElementVNode("p", { class: normalizeClass(`${_ctx.name}-header-title`) }, toDisplayString(_ctx.title), 3), !_ctx.hideClose ? (openBlock(), createBlock(_component_IconCloseLine, { key: 0, class: normalizeClass(`${_ctx.name}-header-close`), onClick: _ctx.handleCancle, size: "20px" }, null, 8, ["class", "onClick"])) : createCommentVNode("", true) ], 2), createElementVNode("div", { class: normalizeClass(`${_ctx.name}-body`) }, [ renderSlot(_ctx.$slots, "default") ], 2), !_ctx.hideFooter ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(`${_ctx.name}-footer`) }, [ !_ctx.slots.footer ? (openBlock(), createBlock(_component_bp_space, { key: 0, justify: "flex-end", size: "small" }, { default: withCtx(() => [ createVNode(_component_bp_button, { type: "plain", onClick: _ctx.handleCancle }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.cancleText), 1) ]), _: 1 }, 8, ["onClick"]), createVNode(_component_bp_button, { onClick: _ctx.handleOk, loading: _ctx.confirmLoading || _ctx.okLoading, type: "primary", status: "primary" }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.okText), 1) ]), _: 1 }, 8, ["onClick", "loading"]) ]), _: 1 })) : createCommentVNode("", true), renderSlot(_ctx.$slots, "footer") ], 2)) : createCommentVNode("", true) ], 6) ], 2), [ [vShow, _ctx.modelValue] ]) ]), _: 3 }) ], 2), [ [vShow, _ctx.containerVisable] ]) ]); } const _drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { _drawer as default };