birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
100 lines (99 loc) • 4.37 kB
JavaScript
"use strict";
const drawer_vue_vue_type_script_lang = require("./drawer.vue2.js");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.js");
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_IconCloseLine = vue.resolveComponent("IconCloseLine");
const _component_bp_button = vue.resolveComponent("bp-button");
const _component_bp_space = vue.resolveComponent("bp-space");
return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
vue.withDirectives(vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-container`)
}, [
vue.createVNode(vue.Transition, { name: "fade-modal-mask" }, {
default: vue.withCtx(() => [
vue.withDirectives(vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-mask`)
}, null, 2), [
[vue.vShow, _ctx.modelValue]
])
]),
_: 1
}),
vue.createVNode(vue.Transition, { name: "drawer-fade" }, {
default: vue.withCtx(() => [
vue.withDirectives(vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-wrapper`),
onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.handleMaskClick && _ctx.handleMaskClick(...args), ["self"]))
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(_ctx.cls),
style: vue.normalizeStyle(`width:${_ctx.width};`)
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-header`)
}, [
vue.createElementVNode("p", {
class: vue.normalizeClass(`${_ctx.name}-header-title`)
}, vue.toDisplayString(_ctx.title), 3),
!_ctx.hideClose ? (vue.openBlock(), vue.createBlock(_component_IconCloseLine, {
key: 0,
class: vue.normalizeClass(`${_ctx.name}-header-close`),
onClick: _ctx.handleCancle,
size: "20px"
}, null, 8, ["class", "onClick"])) : vue.createCommentVNode("", true)
], 2),
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-body`)
}, [
vue.renderSlot(_ctx.$slots, "default")
], 2),
!_ctx.hideFooter ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass(`${_ctx.name}-footer`)
}, [
!_ctx.slots.footer ? (vue.openBlock(), vue.createBlock(_component_bp_space, {
key: 0,
justify: "flex-end",
size: "small"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_bp_button, {
type: "plain",
onClick: _ctx.handleCancle
}, {
default: vue.withCtx(() => [
vue.createTextVNode(vue.toDisplayString(_ctx.cancleText), 1)
]),
_: 1
}, 8, ["onClick"]),
vue.createVNode(_component_bp_button, {
onClick: _ctx.handleOk,
loading: _ctx.confirmLoading || _ctx.okLoading,
type: "primary",
status: "primary"
}, {
default: vue.withCtx(() => [
vue.createTextVNode(vue.toDisplayString(_ctx.okText), 1)
]),
_: 1
}, 8, ["onClick", "loading"])
]),
_: 1
})) : vue.createCommentVNode("", true),
vue.renderSlot(_ctx.$slots, "footer")
], 2)) : vue.createCommentVNode("", true)
], 6)
], 2), [
[vue.vShow, _ctx.modelValue]
])
]),
_: 3
})
], 2), [
[vue.vShow, _ctx.containerVisable]
])
]);
}
const _drawer = /* @__PURE__ */ _pluginVue_exportHelper(drawer_vue_vue_type_script_lang, [["render", _sfc_render]]);
module.exports = _drawer;