修改因添加表格必填而出现报错问题
This commit is contained in:
@@ -128,8 +128,7 @@ patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', {
|
||||
this.allColumns.forEach(_ => {
|
||||
if( tableRequiredList.indexOf(_.name) >= 0 ) {
|
||||
const dom = $(`th[data-name=${_.name}]`)
|
||||
let t = dom.html()
|
||||
dom.html('<i style="color: red;margin-left: -4px;position: absolute;left: 0">*</i>' + t)
|
||||
dom.addClass('addRequired')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -478,4 +478,14 @@ div:has(.o_required_modifier) > label::before {
|
||||
width: auto !important;
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
.addRequired {
|
||||
padding-left: calc(0.3rem + 2px)!important;
|
||||
}
|
||||
.addRequired:before {
|
||||
content: '*';
|
||||
color: red;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
Reference in New Issue
Block a user