fixbug ui 20 21
This commit is contained in:

parent
f9643f46a0
commit
34d5a1eeb7
@ -253,8 +253,9 @@ export class NewCustomRenderer {
|
||||
} else {
|
||||
el.type = 'text';
|
||||
|
||||
$(el).addClass('tui-grid-cell-content');
|
||||
$(el).addClass('tui-grid-cell-content w100');
|
||||
$(el).css('text-align', 'center');
|
||||
$(el).css('border', '0');
|
||||
}
|
||||
this.render(props);
|
||||
if(!this.disabled){
|
||||
@ -314,6 +315,8 @@ export class NewCustomEditor {
|
||||
this.rowKey = rowKey;
|
||||
this.columnInfo = columnInfo;
|
||||
this.grid = grid;
|
||||
const divEl = document.createElement('div');
|
||||
$(divEl).css('text-align', 'center');
|
||||
const el = document.createElement('input');
|
||||
if (
|
||||
props.grid.store.data.rawData[props.rowKey].addInfoDataKind == 'FG'
|
||||
@ -363,16 +366,20 @@ export class NewCustomEditor {
|
||||
}
|
||||
$(el).addClass('tui-grid-content-text');
|
||||
}
|
||||
|
||||
divEl.append(el);
|
||||
|
||||
// console.log('props: %o', props);
|
||||
// console.log('el: %o', el);
|
||||
this.el = el;
|
||||
this.divEl = divEl;
|
||||
|
||||
this.render(props);
|
||||
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
return this.divEl;
|
||||
}
|
||||
|
||||
getValue() {
|
||||
@ -389,9 +396,9 @@ export class NewCustomEditor {
|
||||
}
|
||||
|
||||
mounted() {
|
||||
if (this.el.type == 'checkbox') {
|
||||
$(this.el.parentElement).css('text-align', 'center');
|
||||
}
|
||||
// if (this.el.type == 'checkbox') {
|
||||
// $(this.el.parentElement).css('text-align', 'center');
|
||||
// }
|
||||
this.el.select();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user