过时特性改为用trace提示

This commit is contained in:
nonameShijian 2024-01-29 14:39:21 +08:00
parent 88749fd97d
commit 29bdea64c3
1 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import { UI as ui } from '../ui/index.js';
// 改为HTMLDivElement.prototype.addTempClass // 改为HTMLDivElement.prototype.addTempClass
HTMLDivElement.prototype.animate = function (keyframes, options) { HTMLDivElement.prototype.animate = function (keyframes, options) {
if (typeof keyframes == 'string') { if (typeof keyframes == 'string') {
console.warn(this, '无名杀开发者修改的animate方法已废弃请改为使用addTempClass方法'); console.trace(this, '无名杀开发者修改的animate方法已废弃请改为使用addTempClass方法');
return HTMLDivElement.prototype.addTempClass.call(this, keyframes, options); return HTMLDivElement.prototype.addTempClass.call(this, keyframes, options);
} }
else return HTMLElement.prototype.animate.call(this, keyframes, options); else return HTMLElement.prototype.animate.call(this, keyframes, options);
@ -255,7 +255,7 @@ HTMLTableElement.prototype.get = function (row, col) {
}; };
/*处理lib.nature等从array改为map的兼容性问题*/ /*处理lib.nature等从array改为map的兼容性问题*/
const mapHasFunc = function (item) { const mapHasFunc = function (item) {
console.warn(this, '已经从array改为map请改为使用has方法'); console.trace(this, '已经从array改为map请改为使用has方法');
return this.has(item); return this.has(item);
} }
Object.defineProperty(Map.prototype, "contains", { Object.defineProperty(Map.prototype, "contains", {
@ -271,7 +271,7 @@ Object.defineProperty(Map.prototype, "includes", {
value: mapHasFunc value: mapHasFunc
}); });
const mapAddFunc = function (item) { const mapAddFunc = function (item) {
console.warn(this, '已经从array改为map请改为使用set方法'); console.trace(this, '已经从array改为map请改为使用set方法');
this.set(item, 0); this.set(item, 0);
return this; return this;
} }
@ -303,7 +303,7 @@ Object.defineProperty(Map.prototype, "remove", {
enumerable: false, enumerable: false,
writable: true, writable: true,
value: function (item) { value: function (item) {
console.warn(this, '已经从array改为map请改为使用delete方法'); console.trace(this, '已经从array改为map请改为使用delete方法');
this.delete(item); this.delete(item);
return this; return this;
} }