mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-30 03:07:36 +08:00
Table: fix an undefined issue in ssr (#11109)
This commit is contained in:
parent
3d5f9ef080
commit
1ff01a77f9
@ -232,10 +232,10 @@
|
||||
removeClass(this.getInputElement(), 'invalid');
|
||||
return true;
|
||||
},
|
||||
getFistFocus() {
|
||||
const $btns = this.$el.querySelector('.el-message-box__btns .el-button');
|
||||
const $title = this.$el.querySelector('.el-message-box__btns .el-message-box__title');
|
||||
return $btns && $btns[0] || $title;
|
||||
getFirstFocus() {
|
||||
const btn = this.$el.querySelector('.el-message-box__btns .el-button');
|
||||
const title = this.$el.querySelector('.el-message-box__btns .el-message-box__title');
|
||||
return btn || title;
|
||||
},
|
||||
getInputElement() {
|
||||
const inputRefs = this.$refs.input.$refs;
|
||||
@ -264,7 +264,7 @@
|
||||
});
|
||||
}
|
||||
this.focusAfterClosed = document.activeElement;
|
||||
messageBox = new Dialog(this.$el, this.focusAfterClosed, this.getFistFocus());
|
||||
messageBox = new Dialog(this.$el, this.focusAfterClosed, this.getFirstFocus());
|
||||
}
|
||||
|
||||
// prompt
|
||||
|
@ -112,6 +112,7 @@ class TableLayout {
|
||||
}
|
||||
|
||||
updateColumnsWidth() {
|
||||
if (Vue.prototype.$isServer) return;
|
||||
const fit = this.fit;
|
||||
const bodyWidth = this.table.$el.clientWidth;
|
||||
let bodyMinWidth = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user