优化警告问题

This commit is contained in:
mgw
2023-11-27 21:30:45 +08:00
parent 96df8f971c
commit 4f83c5f29a
19 changed files with 58 additions and 74 deletions

View File

@@ -1,8 +1,7 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { Many2OneField } from '@web/views/fields/many2one/many2one_field';
import {registry} from "@web/core/registry";
import {Many2OneField} from '@web/views/fields/many2one/many2one_field';
// 继承FieldMany2One组件实现自定义组件:当光标聚焦于输入框时,选中输入框内容
@@ -17,12 +16,13 @@ class CustomMany2One extends Many2OneField {
// console.log('CustomMany2One.setup11111111111111');
super.setup();
}
onMounted() {
// console.log('CustomMany2One.onMounted1');
// 当光标聚焦于输入框时,选中输入框内容
this.input.el.addEventListener('focus', function () {
this.select();
})
});
}
}