优化现有代码问题
This commit is contained in:
@@ -11,7 +11,7 @@ var Dialog = require('web.Dialog');
|
||||
patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
|
||||
// 你可以重写或者添加一些方法和属性
|
||||
async _onDiscardChanges() {
|
||||
var self = this;
|
||||
// var self = this;
|
||||
Dialog.confirm(this, _t("Are you sure you want to discard changes?"), {
|
||||
title: _t("Discard Changes"),
|
||||
|
||||
@@ -25,7 +25,8 @@ patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
|
||||
// if (window.confirm("Are you sure you want to discard changes?")) {
|
||||
// await this.props.discard();
|
||||
// }
|
||||
const result = await this._confirmDiscardChange();
|
||||
// const result = await this._confirmDiscardChange();
|
||||
await this._confirmDiscardChange();
|
||||
await this.props.discard();
|
||||
},
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', {
|
||||
// The following code manipulates the DOM directly to avoid having to wait for a
|
||||
// render + patch which would occur on the next frame and cause flickering.
|
||||
freezeColumnWidths() {
|
||||
console.log('ccccccccccccccccccccccccccc')
|
||||
// console.log('ccccccccccccccccccccccccccc')
|
||||
if (!this.keepColumnWidths) {
|
||||
this.columnWidths = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user