devextreme-vue
Version:
DevExtreme Vue UI and Visualization Components
38 lines (36 loc) • 1.15 kB
JavaScript
/*!
* devextreme-vue
* Version: 25.1.5
* Build date: Wed Sep 03 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-vue
*/
import { defineComponent } from 'vue';
import { initBaseComponent } from './component';
import { getNodeOptions } from './vue-helper';
function initDxExtensionComponent() {
return defineComponent({
extends: initBaseComponent(),
mounted() {
this.$el.setAttribute('isExtension', 'true');
const nodeOptions = getNodeOptions(this);
nodeOptions.$_isExtension = true;
nodeOptions.$_attachTo = this.attachTo.bind(this);
if (nodeOptions && nodeOptions.$_hasOwner) {
return;
}
this.attachTo(this.$el);
},
methods: {
attachTo(element) {
this.$_createWidget(element);
},
},
});
}
export { initDxExtensionComponent, };