- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL - 修复 HomePage.tsx 中所有图片引用 - 修复 CoursePage.tsx 中所有图片引用 - 确保图片在 GitHub Pages 上正确加载 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
"use strict";
|
|
module.exports =
|
|
function(Promise, PromiseArray, debug) {
|
|
var PromiseInspection = Promise.PromiseInspection;
|
|
var util = require("./util");
|
|
|
|
function SettledPromiseArray(values) {
|
|
this.constructor$(values);
|
|
}
|
|
util.inherits(SettledPromiseArray, PromiseArray);
|
|
|
|
SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
|
|
this._values[index] = inspection;
|
|
var totalResolved = ++this._totalResolved;
|
|
if (totalResolved >= this._length) {
|
|
this._resolve(this._values);
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
|
|
SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
|
|
var ret = new PromiseInspection();
|
|
ret._bitField = 33554432;
|
|
ret._settledValueField = value;
|
|
return this._promiseResolved(index, ret);
|
|
};
|
|
SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
|
|
var ret = new PromiseInspection();
|
|
ret._bitField = 16777216;
|
|
ret._settledValueField = reason;
|
|
return this._promiseResolved(index, ret);
|
|
};
|
|
|
|
Promise.settle = function (promises) {
|
|
debug.deprecated(".settle()", ".reflect()");
|
|
return new SettledPromiseArray(promises).promise();
|
|
};
|
|
|
|
Promise.allSettled = function (promises) {
|
|
return new SettledPromiseArray(promises).promise();
|
|
};
|
|
|
|
Promise.prototype.settle = function () {
|
|
return Promise.settle(this);
|
|
};
|
|
};
|