UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

51 lines (49 loc) 1.55 kB
/*! * devextreme-vue * Version: 19.2.6 * Build date: Thu Jan 30 2020 * * Copyright (c) 2012 - 2020 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 */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var VueType = require("vue"); var Vue = VueType.default || VueType; var configuration_1 = require("./configuration"); function initBinding(vueInstance) { if (!vueInstance.$vnode) { return; } var componentOptions = vueInstance.$vnode.componentOptions; var config = componentOptions && componentOptions.$_config; if (!config) { return; } var innerChanges = {}; config.init(Object.keys(vueInstance.$props)); configuration_1.bindOptionWatchers(config, vueInstance, innerChanges); configuration_1.setEmitOptionChangedFunc(config, vueInstance, innerChanges); } exports.initBinding = initBinding; var DxConfiguration = Vue.extend({ beforeMount: function () { initBinding(this); }, mounted: function () { if (this.$parent.$_instance) { this.$parent.$_config.componentsCountChanged = true; } }, beforeDestroy: function () { this.$parent.$_config.componentsCountChanged = true; }, render: function (createElement) { return createElement(); } }); exports.DxConfiguration = DxConfiguration;