iov-design 2.15.45 → 2.15.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- .el-message__closeBtn:focus,.el-message__content:focus{outline-width:0}.el-message{min-width:380px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border-width:1px;border-style:solid;border-color:#EBEEF5;position:fixed;left:50%;top:20px;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:#edf2fc;-webkit-transition:opacity .3s,top .4s,-webkit-transform .4s;transition:opacity .3s,top .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,top .4s;transition:opacity .3s,transform .4s,top .4s,-webkit-transform .4s;overflow:hidden;padding:15px 15px 15px 20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.el-message.is-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.el-message.is-closable .el-message__content{padding-right:16px}.el-message p{margin:0}.el-message--info .el-message__content{color:#0D1722}.el-message--success{background-color:#e9f7ef;border-color:#d3f0df}.el-message--success .el-message__content{color:#23B25D}.el-message--warning{background-color:#fff2e6;border-color:#ffe5cc}.el-message--warning .el-message__content{color:#FF7D00}.el-message--error{background-color:#feecec;border-color:#fdd9d9}.el-message--error .el-message__content{color:#F53F3F}.el-message__icon{margin-right:10px}.el-message__content{padding:0;font-size:14px;line-height:1}.el-message__closeBtn{position:absolute;top:50%;right:15px;-webkit-transform:translateY(-50%);transform:translateY(-50%);cursor:pointer;color:#C6C7CA;font-size:16px}.el-message__closeBtn:hover{color:#909399}.el-message .el-icon-success{color:#23B25D}.el-message .el-icon-error{color:#F53F3F}.el-message .el-icon-info{color:#0D1722}.el-message .el-icon-warning{color:#FF7D00}.el-message-fade-enter,.el-message-fade-leave-active{opacity:0;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}
1
+ .el-message__closeBtn:focus,.el-message__content:focus{outline-width:0}.el-message{min-width:204px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:1px solid #DCDFE6;position:fixed;left:50%;top:46px;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:#fff;-webkit-transition:opacity .3s,top .4s,-webkit-transform .4s;transition:opacity .3s,top .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,top .4s;transition:opacity .3s,transform .4s,top .4s,-webkit-transform .4s;overflow:hidden;padding:13px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 4px 18px 0 rgba(73,75,83,.1);box-shadow:0 4px 18px 0 rgba(73,75,83,.1)}.el-message.is-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.el-message.is-closable .el-message__content{padding-right:24px}.el-message p{margin:0}.el-message--error .el-message__content,.el-message--info .el-message__content,.el-message--success .el-message__content,.el-message--warning .el-message__content{color:#212026}.el-message__icon{margin-right:8px;font-size:16px}.el-message__content{padding:0;font-size:13px;line-height:16px}.el-message__closeBtn{position:absolute;top:50%;right:16px;-webkit-transform:translateY(-50%);transform:translateY(-50%);cursor:pointer;color:#777D87;font-size:14px}.el-message__closeBtn:hover{color:#494B53}.el-message .iov-icon-fill-success{color:#23B25D}.el-message .iov-icon-fill-explain{color:#3F57FF}.el-message .iov-icon-fill-warning{color:#FF7D00}.el-message .iov-icon-fill-fail{color:#F53F3F}.el-message-fade-enter,.el-message-fade-leave-active{opacity:0;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}
@@ -1 +1 @@
1
- .el-notification{display:-webkit-box;display:-ms-flexbox;display:flex;width:330px;padding:14px 26px 14px 13px;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #EBEEF5;position:fixed;background-color:#FFF;-webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);box-shadow:0 2px 12px 0 rgba(0,0,0,.1);-webkit-transition:opacity .3s,left .3s,right .3s,top .4s,bottom .3s,-webkit-transform .3s;transition:opacity .3s,left .3s,right .3s,top .4s,bottom .3s,-webkit-transform .3s;transition:opacity .3s,transform .3s,left .3s,right .3s,top .4s,bottom .3s;transition:opacity .3s,transform .3s,left .3s,right .3s,top .4s,bottom .3s,-webkit-transform .3s;overflow:hidden}.el-notification.right{right:16px}.el-notification.left{left:16px}.el-notification__group{margin-left:13px;margin-right:8px}.el-notification__title{font-weight:700;font-size:16px;color:#303133;margin:0}.el-notification__content{font-size:14px;line-height:21px;margin:6px 0 0;color:#212026;text-align:justify}.el-notification__content p{margin:0}.el-notification__icon{height:24px;width:24px;font-size:24px}.el-notification__closeBtn{position:absolute;top:18px;right:15px;cursor:pointer;color:#909399;font-size:16px}.el-notification__closeBtn:hover{color:#212026}.el-notification .el-icon-success{color:#23B25D}.el-notification .el-icon-error{color:#F53F3F}.el-notification .el-icon-info{color:#0D1722}.el-notification .el-icon-warning{color:#FF7D00}.el-notification-fade-enter.right{right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.el-notification-fade-enter.left{left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.el-notification-fade-leave-active{opacity:0}
1
+ .el-notification{display:-webkit-box;display:-ms-flexbox;display:flex;width:330px;padding:14px 26px 14px 13px;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #EBEEF5;position:fixed;background-color:#FFF;-webkit-box-shadow:0 2px 12px 0 rgba(0,0,0,.1);box-shadow:0 2px 12px 0 rgba(0,0,0,.1);-webkit-transition:opacity .3s,left .3s,right .3s,top .4s,bottom .3s,-webkit-transform .3s;transition:opacity .3s,left .3s,right .3s,top .4s,bottom .3s,-webkit-transform .3s;transition:opacity .3s,transform .3s,left .3s,right .3s,top .4s,bottom .3s;transition:opacity .3s,transform .3s,left .3s,right .3s,top .4s,bottom .3s,-webkit-transform .3s;overflow:hidden}.el-notification.right{right:16px}.el-notification.left{left:16px}.el-notification__group{margin-left:13px;margin-right:8px}.el-notification__title{font-weight:700;font-size:16px;color:#303133;margin:0}.el-notification__content{font-size:14px;line-height:21px;margin:6px 0 0;color:#212026;text-align:justify}.el-notification__content p{margin:0}.el-notification__icon{height:24px;width:24px;font-size:24px}.el-notification__closeBtn{position:absolute;top:18px;right:15px;cursor:pointer;color:#909399;font-size:14px}.el-notification__closeBtn:hover{color:#212026}.el-notification .el-icon-success{color:#23B25D}.el-notification .el-icon-error{color:#F53F3F}.el-notification .el-icon-info{color:#0D1722}.el-notification .el-icon-warning{color:#FF7D00}.el-notification-fade-enter.right{right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.el-notification-fade-enter.left{left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.el-notification-fade-leave-active{opacity:0}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iov-design",
3
- "version": "2.15.45",
3
+ "version": "2.15.46",
4
4
  "description": "A Component Library for Vue.js.",
5
5
  "main": "lib/iov-design.common.js",
6
6
  "files": [
@@ -27,8 +27,8 @@
27
27
  <i class="el-dialog__close el-icon iov-icon-close" v-if="showClose" @click="handleClose"></i>
28
28
  </span>
29
29
  </div>
30
- <div class="el-dialog__body" :class="type === 'form' ? 'el-dialog__body--form' : 'el-dialog__body--desc'" v-if="rendered"><slot></slot></div>
31
- <div class="el-dialog__footer" v-if="$slots.footer">
30
+ <div class="el-dialog__body" ref="body" :class="type === 'form' ? 'el-dialog__body--form' : 'el-dialog__body--desc'" v-if="rendered"><slot></slot></div>
31
+ <div class="el-dialog__footer" ref="footer" v-if="$slots.footer">
32
32
  <slot name="footer"></slot>
33
33
  </div>
34
34
  </div>
@@ -103,7 +103,7 @@
103
103
 
104
104
  top: {
105
105
  type: String,
106
- default: '15vh'
106
+ default: '50%'
107
107
  },
108
108
  beforeClose: Function,
109
109
  center: {
@@ -149,7 +149,7 @@
149
149
  style() {
150
150
  let style = {};
151
151
  if (!this.fullscreen) {
152
- style.marginTop = this.top;
152
+ style.top = this.top;
153
153
  if (this.width) {
154
154
  style.width = this.width;
155
155
  }
@@ -189,10 +189,47 @@
189
189
  this.broadcast('ElDropdownMenu', 'updatePopper');
190
190
  },
191
191
  afterEnter() {
192
+ this.onDialogOpened();
192
193
  this.$emit('opened');
193
194
  },
194
195
  afterLeave() {
195
196
  this.$emit('closed');
197
+ },
198
+
199
+ onDialogOpened() {
200
+ this.$nextTick(() => {
201
+ this.checkOverflow();
202
+ this.observeContentChanges();
203
+ });
204
+ },
205
+
206
+ // 检查内容是否超过body高度
207
+ checkOverflow() {
208
+ const body = this.$refs.body;
209
+ const footer = this.$refs.footer;
210
+ if (!body || !footer) return;
211
+ if (body.scrollHeight > body.clientHeight) {
212
+ footer.classList.add('el-dialog__footer--shadow');
213
+ } else {
214
+ footer.classList.remove('el-dialog__footer--shadow');
215
+ }
216
+ },
217
+ // 监听节点变化
218
+ observeContentChanges() {
219
+ const body = this.$refs.body;
220
+ if (!body) return;
221
+ if (this._mutationObserver) {
222
+ this._mutationObserver.disconnect();
223
+ }
224
+ this._mutationObserver = new MutationObserver(() => {
225
+ this.checkOverflow();
226
+ });
227
+ // 监听子节点及文本节点的内容变化
228
+ this._mutationObserver.observe(body, {
229
+ childList: true,
230
+ subtree: true,
231
+ characterData: true
232
+ });
196
233
  }
197
234
  },
198
235
 
@@ -211,6 +248,9 @@
211
248
  if (this.appendToBody && this.$el && this.$el.parentNode) {
212
249
  this.$el.parentNode.removeChild(this.$el);
213
250
  }
251
+ if (this._mutationObserver) {
252
+ this._mutationObserver.disconnect();
253
+ }
214
254
  }
215
255
  };
216
256
  </script>
@@ -44,7 +44,10 @@ export default {
44
44
  type: Number,
45
45
  default: 1
46
46
  },
47
- imageSize: Number,
47
+ imageSize: {
48
+ type: Number,
49
+ default: 140
50
+ },
48
51
  description: {
49
52
  type: String,
50
53
  default: ''
@@ -33,7 +33,7 @@ const Message = function(options) {
33
33
  }
34
34
  instance.$mount();
35
35
  document.body.appendChild(instance.$el);
36
- let verticalOffset = options.offset || 20;
36
+ let verticalOffset = options.offset || 46;
37
37
  instances.forEach(item => {
38
38
  verticalOffset += item.$el.offsetHeight + 16;
39
39
  });
@@ -19,17 +19,17 @@
19
19
  <p v-if="!dangerouslyUseHTMLString" class="el-message__content">{{ message }}</p>
20
20
  <p v-else v-html="message" class="el-message__content"></p>
21
21
  </slot>
22
- <i v-if="showClose" class="el-message__closeBtn el-icon-close" @click="close"></i>
22
+ <i v-if="showClose" class="el-message__closeBtn iov-icon-close" @click="close"></i>
23
23
  </div>
24
24
  </transition>
25
25
  </template>
26
26
 
27
27
  <script type="text/babel">
28
- const typeMap = {
28
+ let typeMap = {
29
29
  success: 'success',
30
- info: 'info',
30
+ info: 'explain',
31
31
  warning: 'warning',
32
- error: 'error'
32
+ error: 'fail'
33
33
  };
34
34
 
35
35
  export default {
@@ -44,7 +44,7 @@
44
44
  onClose: null,
45
45
  showClose: false,
46
46
  closed: false,
47
- verticalOffset: 20,
47
+ verticalOffset: 46,
48
48
  timer: null,
49
49
  dangerouslyUseHTMLString: false,
50
50
  center: false
@@ -54,7 +54,7 @@
54
54
  computed: {
55
55
  typeClass() {
56
56
  return this.type && !this.iconClass
57
- ? `el-message__icon el-icon-${ typeMap[this.type] }`
57
+ ? `el-message__icon iov-icon-fill-${ typeMap[this.type] }`
58
58
  : '';
59
59
  },
60
60
  positionStyle() {
@@ -1,196 +1,196 @@
1
- <script>
2
- import TabNav from './tab-nav';
3
-
4
- export default {
5
- name: 'ElTabs',
6
-
7
- components: {
8
- TabNav
9
- },
10
-
11
- props: {
12
- type: String,
13
- size: String,
14
- activeName: String,
15
- closable: Boolean,
16
- addable: Boolean,
17
- value: {},
18
- editable: Boolean,
19
- tabPosition: {
20
- type: String,
21
- default: 'top'
22
- },
23
- beforeLeave: Function,
24
- stretch: Boolean
25
- },
26
-
27
- provide() {
28
- return {
29
- rootTabs: this
30
- };
31
- },
32
-
33
- data() {
34
- return {
35
- currentName: this.value || this.activeName,
36
- panes: []
37
- };
38
- },
39
-
40
- watch: {
41
- activeName(value) {
42
- this.setCurrentName(value);
43
- },
44
- value(value) {
45
- this.setCurrentName(value);
46
- },
47
- currentName(value) {
48
- if (this.$refs.nav) {
49
- this.$nextTick(() => {
50
- this.$refs.nav.$nextTick(_ => {
51
- this.$refs.nav.scrollToActiveTab();
52
- });
53
- });
54
- }
55
- }
56
- },
57
-
58
- methods: {
59
- calcPaneInstances(isForceUpdate = false) {
60
- if (this.$slots.default) {
61
- const paneSlots = this.$slots.default.filter(vnode => vnode.tag &&
62
- vnode.componentOptions && vnode.componentOptions.Ctor.options.name === 'ElTabPane');
63
- // update indeed
64
- const panes = paneSlots.map(({ componentInstance }) => componentInstance);
65
- const panesChanged = !(panes.length === this.panes.length && panes.every((pane, index) => pane === this.panes[index]));
66
- if (isForceUpdate || panesChanged) {
67
- this.panes = panes;
68
- }
69
- } else if (this.panes.length !== 0) {
70
- this.panes = [];
71
- }
72
- },
73
- handleTabClick(tab, tabName, event) {
74
- if (tab.disabled) return;
75
- this.setCurrentName(tabName);
76
- this.$emit('tab-click', tab, event);
77
- },
78
- handleTabRemove(pane, ev) {
79
- if (pane.disabled) return;
80
- ev.stopPropagation();
81
- this.$emit('edit', pane.name, 'remove');
82
- this.$emit('tab-remove', pane.name);
83
- },
84
- handleTabAdd() {
85
- this.$emit('edit', null, 'add');
86
- this.$emit('tab-add');
87
- },
88
- setCurrentName(value) {
89
- const changeCurrentName = () => {
90
- this.currentName = value;
91
- this.$emit('input', value);
92
- };
93
- if (this.currentName !== value && this.beforeLeave) {
94
- const before = this.beforeLeave(value, this.currentName);
95
- if (before && before.then) {
96
- before
97
- .then(() => {
98
- changeCurrentName();
99
- this.$refs.nav && this.$refs.nav.removeFocus();
100
- }, () => {
101
- // https://github.com/ElemeFE/element/pull/14816
102
- // ignore promise rejection in `before-leave` hook
103
- });
104
- } else if (before !== false) {
105
- changeCurrentName();
106
- }
107
- } else {
108
- changeCurrentName();
109
- }
110
- }
111
- },
112
-
113
- render(h) {
114
- let {
115
- type,
116
- size,
117
- handleTabClick,
118
- handleTabRemove,
119
- handleTabAdd,
120
- currentName,
121
- panes,
122
- editable,
123
- addable,
124
- tabPosition,
125
- stretch
126
- } = this;
127
-
128
- const newButton = editable || addable
129
- ? (
130
- <span
131
- class="el-tabs__new-tab"
132
- on-click={ handleTabAdd }
133
- tabindex="0"
134
- on-keydown={ (ev) => { if (ev.keyCode === 13) { handleTabAdd(); }} }
135
- >
136
- <i class="iov-icon-plus"></i>
137
- </span>
138
- )
139
- : null;
140
-
141
- const navData = {
142
- props: {
143
- currentName,
144
- onTabClick: handleTabClick,
145
- onTabRemove: handleTabRemove,
146
- editable,
147
- type,
148
- panes,
149
- stretch
150
- },
151
- ref: 'nav'
152
- };
153
- const header = (
154
- <div class={['el-tabs__header', `is-${tabPosition}`]}>
155
- {newButton}
156
- <tab-nav { ...navData }></tab-nav>
157
- </div>
158
- );
159
- const panels = (
160
- <div class="el-tabs__content">
161
- {this.$slots.default}
162
- </div>
163
- );
164
-
165
- return (
166
- <div class={{
167
- 'el-tabs': true,
168
- 'el-tabs--normal': !type,
169
- 'el-tabs--card': type === 'card',
170
- 'el-tabs--capsule': type === 'capsule',
171
- [`el-tabs--${size}`]: size,
172
- [`el-tabs--${tabPosition}`]: true,
173
- 'el-tabs--border-card': type === 'border-card'
174
- }}>
175
- { tabPosition !== 'bottom' ? [header, panels] : [panels, header] }
176
- </div>
177
- );
178
- },
179
-
180
- created() {
181
- if (!this.currentName) {
182
- this.setCurrentName('0');
183
- }
184
-
185
- this.$on('tab-nav-update', this.calcPaneInstances.bind(null, true));
186
- },
187
-
188
- mounted() {
189
- this.calcPaneInstances();
190
- },
191
-
192
- updated() {
193
- this.calcPaneInstances();
194
- }
195
- };
196
- </script>
1
+ <script>
2
+ import TabNav from './tab-nav';
3
+
4
+ export default {
5
+ name: 'ElTabs',
6
+
7
+ components: {
8
+ TabNav
9
+ },
10
+
11
+ props: {
12
+ type: String,
13
+ size: String,
14
+ activeName: String,
15
+ closable: Boolean,
16
+ addable: Boolean,
17
+ value: {},
18
+ editable: Boolean,
19
+ tabPosition: {
20
+ type: String,
21
+ default: 'top'
22
+ },
23
+ beforeLeave: Function,
24
+ stretch: Boolean
25
+ },
26
+
27
+ provide() {
28
+ return {
29
+ rootTabs: this
30
+ };
31
+ },
32
+
33
+ data() {
34
+ return {
35
+ currentName: this.value || this.activeName,
36
+ panes: []
37
+ };
38
+ },
39
+
40
+ watch: {
41
+ activeName(value) {
42
+ this.setCurrentName(value);
43
+ },
44
+ value(value) {
45
+ this.setCurrentName(value);
46
+ },
47
+ currentName(value) {
48
+ if (this.$refs.nav) {
49
+ this.$nextTick(() => {
50
+ this.$refs.nav.$nextTick(_ => {
51
+ this.$refs.nav.scrollToActiveTab();
52
+ });
53
+ });
54
+ }
55
+ }
56
+ },
57
+
58
+ methods: {
59
+ calcPaneInstances(isForceUpdate = false) {
60
+ if (this.$slots.default) {
61
+ const paneSlots = this.$slots.default.filter(vnode => vnode.tag &&
62
+ vnode.componentOptions && vnode.componentOptions.Ctor.options.name === 'ElTabPane');
63
+ // update indeed
64
+ const panes = paneSlots.map(({ componentInstance }) => componentInstance);
65
+ const panesChanged = !(panes.length === this.panes.length && panes.every((pane, index) => pane === this.panes[index]));
66
+ if (isForceUpdate || panesChanged) {
67
+ this.panes = panes;
68
+ }
69
+ } else if (this.panes.length !== 0) {
70
+ this.panes = [];
71
+ }
72
+ },
73
+ handleTabClick(tab, tabName, event) {
74
+ if (tab.disabled) return;
75
+ this.setCurrentName(tabName);
76
+ this.$emit('tab-click', tab, event);
77
+ },
78
+ handleTabRemove(pane, ev) {
79
+ if (pane.disabled) return;
80
+ ev.stopPropagation();
81
+ this.$emit('edit', pane.name, 'remove');
82
+ this.$emit('tab-remove', pane.name);
83
+ },
84
+ handleTabAdd() {
85
+ this.$emit('edit', null, 'add');
86
+ this.$emit('tab-add');
87
+ },
88
+ setCurrentName(value) {
89
+ const changeCurrentName = () => {
90
+ this.currentName = value;
91
+ this.$emit('input', value);
92
+ };
93
+ if (this.currentName !== value && this.beforeLeave) {
94
+ const before = this.beforeLeave(value, this.currentName);
95
+ if (before && before.then) {
96
+ before
97
+ .then(() => {
98
+ changeCurrentName();
99
+ this.$refs.nav && this.$refs.nav.removeFocus();
100
+ }, () => {
101
+ // https://github.com/ElemeFE/element/pull/14816
102
+ // ignore promise rejection in `before-leave` hook
103
+ });
104
+ } else if (before !== false) {
105
+ changeCurrentName();
106
+ }
107
+ } else {
108
+ changeCurrentName();
109
+ }
110
+ }
111
+ },
112
+
113
+ render(h) {
114
+ let {
115
+ type,
116
+ size,
117
+ handleTabClick,
118
+ handleTabRemove,
119
+ handleTabAdd,
120
+ currentName,
121
+ panes,
122
+ editable,
123
+ addable,
124
+ tabPosition,
125
+ stretch
126
+ } = this;
127
+
128
+ const newButton = editable || addable
129
+ ? (
130
+ <span
131
+ class="el-tabs__new-tab"
132
+ on-click={ handleTabAdd }
133
+ tabindex="0"
134
+ on-keydown={ (ev) => { if (ev.keyCode === 13) { handleTabAdd(); }} }
135
+ >
136
+ <i class="iov-icon-plus"></i>
137
+ </span>
138
+ )
139
+ : null;
140
+
141
+ const navData = {
142
+ props: {
143
+ currentName,
144
+ onTabClick: handleTabClick,
145
+ onTabRemove: handleTabRemove,
146
+ editable,
147
+ type,
148
+ panes,
149
+ stretch
150
+ },
151
+ ref: 'nav'
152
+ };
153
+ const header = (
154
+ <div class={['el-tabs__header', `is-${tabPosition}`]}>
155
+ {newButton}
156
+ <tab-nav { ...navData }></tab-nav>
157
+ </div>
158
+ );
159
+ const panels = (
160
+ <div class="el-tabs__content">
161
+ {this.$slots.default}
162
+ </div>
163
+ );
164
+
165
+ return (
166
+ <div class={{
167
+ 'el-tabs': true,
168
+ 'el-tabs--normal': !type,
169
+ 'el-tabs--card': type === 'card',
170
+ 'el-tabs--capsule': type === 'capsule',
171
+ [`el-tabs--${size}`]: size,
172
+ [`el-tabs--${tabPosition}`]: true,
173
+ 'el-tabs--border-card': type === 'border-card'
174
+ }}>
175
+ { tabPosition !== 'bottom' ? [header, panels] : [panels, header] }
176
+ </div>
177
+ );
178
+ },
179
+
180
+ created() {
181
+ if (!this.currentName) {
182
+ this.setCurrentName('0');
183
+ }
184
+
185
+ this.$on('tab-nav-update', this.calcPaneInstances.bind(null, true));
186
+ },
187
+
188
+ mounted() {
189
+ this.calcPaneInstances();
190
+ },
191
+
192
+ updated() {
193
+ this.calcPaneInstances();
194
+ }
195
+ };
196
+ </script>