优化警告问题
This commit is contained in:
@@ -15,19 +15,18 @@ export class Many2OneRadioField extends RadioField {
|
||||
// 放大图片逻辑
|
||||
// 获取图片元素
|
||||
const img = event.target;
|
||||
const close = img.nextSibling
|
||||
|
||||
const close = img.nextSibling;
|
||||
// 实现放大图片逻辑
|
||||
// 比如使用 CSS 放大
|
||||
img.parentElement.classList.add('zoomed');
|
||||
close.classList.add('img_close')
|
||||
close.classList.add('img_close');
|
||||
}
|
||||
|
||||
onCloseClick(event) {
|
||||
const close = event.target;
|
||||
const img = close.previousSibling
|
||||
img.parentElement.classList.remove('zoomed')
|
||||
close.classList.remove('img_close')
|
||||
const img = close.previousSibling;
|
||||
img.parentElement.classList.remove('zoomed');
|
||||
close.classList.remove('img_close');
|
||||
}
|
||||
|
||||
get items() {
|
||||
@@ -48,7 +47,7 @@ export class Many2OneRadioField extends RadioField {
|
||||
}
|
||||
}
|
||||
|
||||
Many2OneRadioField.template = "jikimo_frontend.Many2OneRadioField"
|
||||
Many2OneRadioField.template = "jikimo_frontend.Many2OneRadioField";
|
||||
// MyCustomWidget.supportedTypes = ['many2many'];
|
||||
|
||||
registry.category("fields").add("many2one_radio", Many2OneRadioField);
|
||||
|
||||
@@ -537,7 +537,7 @@ class WorkCenterBarcode(models.Model):
|
||||
action1 = json.dumps(action)
|
||||
return action1
|
||||
else:
|
||||
return False
|
||||
return None
|
||||
|
||||
def cnc_file_download(self):
|
||||
"""
|
||||
|
||||
@@ -73,10 +73,7 @@ class CustomChar extends CharField {
|
||||
// this.$input.on('focus', function () {
|
||||
// $(this).select();
|
||||
// });
|
||||
|
||||
|
||||
// 当光标聚焦于输入框时,选中输入框内容
|
||||
|
||||
}
|
||||
|
||||
registry.category("fields").add("custom_char", CustomChar);
|
||||
|
||||
@@ -24,7 +24,6 @@ class CustomMany2One extends Many2OneField {
|
||||
this.select();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
registry.category("fields").add("custom_many2one", CustomMany2One);
|
||||
|
||||
Reference in New Issue
Block a user