birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
81 lines (80 loc) • 2.98 kB
JavaScript
import _sfc_main from "./popconfirm.vue2.js";
import { resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, resolveDynamicComponent, toDisplayString, createVNode, createTextVNode, renderSlot } from "vue";
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_bp_button = resolveComponent("bp-button");
const _component_bp_space = resolveComponent("bp-space");
const _component_bp_trigger = resolveComponent("bp-trigger");
return openBlock(), createBlock(_component_bp_trigger, {
"popup-visible": _ctx.show,
"onUpdate:popupVisible": _cache[0] || (_cache[0] = ($event) => _ctx.show = $event),
class: normalizeClass(_ctx.name),
"popup-offset": 10,
position: _ctx.position,
"update-at-scroll": ""
}, {
content: withCtx(() => [
createElementVNode("div", {
class: normalizeClass(`${_ctx.name}-inner`)
}, [
createElementVNode("div", {
class: normalizeClass(`${_ctx.name}-inner-content`)
}, [
createElementVNode("span", {
class: normalizeClass(`${_ctx.name}-icon`)
}, [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconType[_ctx.type]), { size: "16px" }))
], 2),
createElementVNode("span", {
class: normalizeClass(`${_ctx.name}-text`)
}, toDisplayString(_ctx.content), 3)
], 2),
createElementVNode("div", {
class: normalizeClass(`${_ctx.name}-inner-footer`)
}, [
createVNode(_component_bp_space, {
size: "mini",
justify: "flex-end"
}, {
default: withCtx(() => [
createVNode(_component_bp_button, {
onClick: _ctx.handleCancle,
size: "mini"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(_ctx.cancleText), 1)
]),
_: 1
}, 8, ["onClick"]),
createVNode(_component_bp_button, {
onClick: _ctx.handleOk,
loading: _ctx.okLoading,
size: "mini",
type: "primary",
status: "primary"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(_ctx.okText), 1)
]),
_: 1
}, 8, ["onClick", "loading"])
]),
_: 1
})
], 2)
], 2)
]),
default: withCtx(() => [
createElementVNode("div", {
class: normalizeClass(`${_ctx.name}-slot`)
}, [
renderSlot(_ctx.$slots, "default")
], 2)
]),
_: 3
}, 8, ["popup-visible", "class", "position"]);
}
const _popconfirm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
_popconfirm as default
};