优化现有代码问题

This commit is contained in:
mgw
2023-11-22 09:54:31 +08:00
parent 423d5cec8e
commit d6dcb6bf55
8 changed files with 14 additions and 13 deletions

View File

@@ -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();
},

View File

@@ -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;
}