This commit is contained in:
梁灏 2017-04-10 09:58:51 +08:00
parent b164f7c05c
commit 67c9b1c8b9
6 changed files with 87 additions and 44 deletions

View file

@ -32,12 +32,13 @@
import TransferDom from '../../directives/transfer-dom';
import { getScrollBarSize } from '../../utils/assist';
import Locale from '../../mixins/locale';
import Emitter from '../../mixins/emitter';
const prefixCls = 'ivu-modal';
export default {
name: 'Modal',
mixins: [ Locale ],
mixins: [ Locale, Emitter ],
components: { Icon, iButton },
directives: { TransferDom },
props: {
@ -247,6 +248,7 @@
this.addScrollEffect();
}
}
this.broadcast('Table', 'on-visible-change', val);
},
loading (val) {
if (!val) {

View file

@ -664,6 +664,9 @@
this.fixedHeader();
this.$nextTick(() => this.ready = true);
window.addEventListener('resize', this.handleResize, false);
this.$on('on-visible-change', (val) => {
if (val) this.handleResize();
});
},
beforeDestroy () {
window.removeEventListener('resize', this.handleResize, false);

View file

@ -23,11 +23,13 @@
<script>
import Icon from '../icon/icon.vue';
import { oneOf, getStyle } from '../../utils/assist';
import Emitter from '../../mixins/emitter';
const prefixCls = 'ivu-tabs';
export default {
name: 'Tabs',
mixins: [ Emitter ],
components: { Icon },
props: {
value: {
@ -226,6 +228,7 @@
activeKey () {
this.updateBar();
this.updateStatus();
this.broadcast('Table', 'on-visible-change', true);
}
},
mounted () {