UNPKG

@artmate/chat

Version:

借鉴字节开源react库AntX,通过vue实现的版本

43 lines (42 loc) 1.24 kB
import { defineComponent as f, createBlock as l, openBlock as n, unref as o, withCtx as t, renderSlot as i, createVNode as c, createElementBlock as g, Fragment as _, renderList as w, mergeProps as C, createTextVNode as k, toDisplayString as x } from "vue"; import { ElDropdown as B, ElDropdownMenu as D, ElDropdownItem as E } from "element-plus"; const y = /* @__PURE__ */ f({ __name: "index", props: { placement: {}, trigger: {}, disabled: { type: Boolean, default: !1 }, menu: { default: () => [] } }, emits: ["onOpenChange"], setup(a, { emit: d }) { const p = a, u = d; return (s, r) => (n(), l(o(B), { onVisibleChange: r[0] || (r[0] = (e) => u("onOpenChange", e)) }, { dropdown: t(() => [ c(o(D), null, { default: t(() => [ (n(!0), g(_, null, w(p.menu, (e, m) => (n(), l(o(E), C({ key: m, ref_for: !0 }, e), { default: t(() => [ k(x(e.label), 1) ]), _: 2 }, 1040))), 128)) ]), _: 1 }) ]), default: t(() => [ i(s.$slots, "default") ]), _: 3 })); } }); export { y as default };