UNPKG

sd-component-library

Version:

A Vue3 + Element Plus components library

46 lines (45 loc) 1.89 kB
import "./base-B4QkiMzD.js"; import { E as p } from "./button-DTI2ap3z.js"; import { _ as c } from "./index.vue_vue_type_script_setup_true_lang-5fJV14pf.js"; import { defineComponent as I, getCurrentInstance as u, createBlock as s, createCommentVNode as i, openBlock as a, mergeProps as m, withModifiers as F, withCtx as k, createTextVNode as _, toDisplayString as y } from "vue"; import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const h = /* @__PURE__ */ I({ __name: "index", props: { btnInfo: {} }, setup(l) { const o = l, { proxy: t } = u(), f = () => o.btnInfo.hiddenFn && typeof o.btnInfo.hiddenFn == "function" ? o.btnInfo.hiddenFn(t == null ? void 0 : t.$attrs.payload) : o.btnInfo.hiddenFn || !0, d = () => o.btnInfo.disabledFn && typeof o.btnInfo.disabledFn == "function" ? o.btnInfo.disabledFn(t == null ? void 0 : t.$attrs.payload) : o.btnInfo.disabledFn || !1; return (n, e) => { const r = c, b = p; return f() ? (a(), s(b, m({ key: 0, class: n.btnInfo.className, plain: n.btnInfo.plain, type: n.btnInfo.type, icon: n.btnInfo.icon, link: n.btnInfo.link }, n.$attrs, { disabled: d(), onClick: e[0] || (e[0] = F( () => { n.btnInfo.clickFn && typeof n.btnInfo.clickFn == "function" && n.btnInfo.clickFn(n.$attrs.payload, n.btnInfo.label); }, ["stop"] )) }), { default: k(() => [ n.btnInfo.svgIcon ? (a(), s(r, { key: 0, "icon-class": n.btnInfo.svgIconClass || "" }, null, 8, ["icon-class"])) : i("", !0), _(" " + y(n.btnInfo.label), 1) ]), _: 1 }, 16, ["class", "plain", "type", "icon", "link", "disabled"])) : i("", !0); }; } }), w = /* @__PURE__ */ g(h, [["__scopeId", "data-v-4dbf830f"]]); export { w as default };