UNPKG

@matechat/core

Version:

前端智能化场景解决方案UI库,轻松构建你的AI应用。

66 lines (65 loc) 1.61 kB
import "./index.css"; import { defineComponent as d, createElementBlock as n, openBlock as r, createElementVNode as a, normalizeClass as m, createCommentVNode as g, toDisplayString as p, renderSlot as _ } from "vue"; const k = { logoImg: { type: String, default: "" }, title: { type: String, default: "" }, logoClickable: { type: Boolean, default: !1 } }, f = { class: "mc-header" }, h = ["src", "alt"], u = { class: "mc-header-title" }, C = { class: "mc-header-operation" }, v = /* @__PURE__ */ d({ __name: "Header", props: k, emits: ["logoClicked"], setup(e, { emit: l }) { const t = l, c = e, s = () => { c.logoClickable && t("logoClicked"); }; return (o, I) => (r(), n("div", f, [ a( "div", { class: m(["mc-header-logo-container", { clickable: o.logoClickable }]), onClick: s }, [ o.logoImg ? (r(), n("img", { key: 0, class: "mc-header-logo", src: o.logoImg, alt: o.logoImg }, null, 8, h)) : g("v-if", !0), a( "div", u, p(o.title), 1 /* TEXT */ ) ], 2 /* CLASS */ ), a("div", C, [ _(o.$slots, "operationArea", {}, void 0, !0) ]) ])); } }), y = (e, l) => { const t = e.__vccOpts || e; for (const [c, s] of l) t[c] = s; return t; }, i = /* @__PURE__ */ y(v, [["__scopeId", "data-v-05829e90"]]); i.install = (e) => { e.component("McHeader", i); }; export { i as McHeader };