UNPKG

@progress/kendo-vue-data-tools

Version:
54 lines (53 loc) 1.36 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { defineComponent as s, createVNode as n } from "vue"; import { Icon as c, Keys as m } from "@progress/kendo-vue-common"; const d = /* @__PURE__ */ s({ props: { title: String, iconClass: String, icon: String, svgIcon: Object, selected: Boolean, onMenuitemclick: Function }, emits: { click: null }, methods: { onClick(e) { this.$emit("click", e), this.$emit("menuitemclick", e); }, onKeyDown(e) { e.keyCode === m.enter && this.$emit("menuitemclick", e); } }, render() { const { title: e, iconClass: i, selected: l, icon: o, svgIcon: t } = this.$props; return n("div", { tabindex: 0, onKeydown: this.onKeyDown, onClick: this.onClick, class: `k-columnmenu-item ${l ? "k-selected" : ""}` }, [i && n(c, { class: i }, null), (o || t) && n(c, { name: o, icon: t }, null), e]); } }); export { d as ColumnMenuItem };