@progress/kendo-vue-grid
Version:
54 lines (53 loc) • 1.44 kB
JavaScript
/**
* @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 r, createVNode as s } from "vue";
import { Draggable as a } from "@progress/kendo-vue-common";
const o = /* @__PURE__ */ r({
props: {
onResize: Function
},
mounted() {
this.$el && (this.draggable = this.$refs.draggable);
},
methods: {
drag(e) {
const t = this.draggable && this.draggable.element;
t && this.$emit("resize", e, t, !1);
},
release(e) {
const t = this.draggable && this.draggable.element;
t && this.$emit("resize", e, t, !0);
}
},
render() {
const e = {
// TODO: move to theme
cursor: "col-resize",
display: "block",
height: "1000%",
position: "absolute",
// [this.props.isRtl ? 'left' : 'right']: 0,
top: 0,
width: ".5em"
};
return s(a, {
onDrag: this.drag,
onRelease: this.release,
ref: "draggable"
}, {
default: () => [s("span", {
class: "k-column-resizer",
draggable: !1,
style: e
}, null)]
});
}
});
export {
o as ColumnResizer
};