fix compile error

This commit is contained in:
pengfei.zhou 2021-10-13 15:45:31 +08:00 committed by osborn
parent cba9133388
commit 3969e13d8a
4 changed files with 14 additions and 11 deletions

View File

@ -5447,7 +5447,7 @@ var doric_web = (function (exports, axios, sandbox) {
}()); }());
}); });
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -5459,8 +5459,8 @@ var doric_web = (function (exports, axios, sandbox) {
const loaders = [ const loaders = [
{ {
filter: () => true, filter: () => true,
request: (source) => __awaiter(void 0, void 0, void 0, function* () { request: (source) => __awaiter$1(void 0, void 0, void 0, function* () {
const result = yield axios__default['default'].get(source); const result = yield axios__default["default"].get(source);
return result.data; return result.data;
}) })
} }
@ -5469,7 +5469,7 @@ var doric_web = (function (exports, axios, sandbox) {
loaders.push(loader); loaders.push(loader);
} }
function loadDoricJSBundle(source) { function loadDoricJSBundle(source) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter$1(this, void 0, void 0, function* () {
const matched = loaders.filter(e => e.filter(source)); const matched = loaders.filter(e => e.filter(source));
if (matched.length > 0) { if (matched.length > 0) {
return matched[matched.length - 1].request(source); return matched[matched.length - 1].request(source);
@ -5486,6 +5486,7 @@ var doric_web = (function (exports, axios, sandbox) {
} }
} }
exports.LayoutSpec = void 0;
(function (LayoutSpec) { (function (LayoutSpec) {
LayoutSpec[LayoutSpec["EXACTLY"] = 0] = "EXACTLY"; LayoutSpec[LayoutSpec["EXACTLY"] = 0] = "EXACTLY";
LayoutSpec[LayoutSpec["WRAP_CONTENT"] = 1] = "WRAP_CONTENT"; LayoutSpec[LayoutSpec["WRAP_CONTENT"] = 1] = "WRAP_CONTENT";
@ -7907,7 +7908,7 @@ ${content}
} }
} }
var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -7921,8 +7922,8 @@ ${content}
smoothscroll.polyfill(); smoothscroll.polyfill();
registerDoricJSLoader({ registerDoricJSLoader({
filter: (source) => source.startsWith("assets://"), filter: (source) => source.startsWith("assets://"),
request: (source) => __awaiter$1(void 0, void 0, void 0, function* () { request: (source) => __awaiter(void 0, void 0, void 0, function* () {
const ret = yield axios__default['default'].get(source.replace("assets://", `${window.location.href}/../../doric-demo/bundle/`)); const ret = yield axios__default["default"].get(source.replace("assets://", `${window.location.href}/../../doric-demo/bundle/`));
return ret.data; return ret.data;
}) })
}); });
@ -7955,7 +7956,9 @@ ${content}
exports.toPixelString = toPixelString; exports.toPixelString = toPixelString;
exports.toRGBAString = toRGBAString; exports.toRGBAString = toRGBAString;
Object.defineProperty(exports, '__esModule', { value: true });
return exports; return exports;
}({}, axios, doric)); })({}, axios, doric);
//# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ smoothscroll.polyfill();
registerDoricJSLoader({ registerDoricJSLoader({
filter: (source) => source.startsWith("assets://"), filter: (source) => source.startsWith("assets://"),
request: async (source) => { request: async (source) => {
const ret = await axios.get(source.replace("assets://", `${window.location.href}/../../doric-demo/bundle/`)) const ret = await axios.get<string>(source.replace("assets://", `${window.location.href}/../../doric-demo/bundle/`))
return ret.data return ret.data
} }
}) })

View File

@ -10,7 +10,7 @@ const loaders: DoricJSLoader[] = [
{ {
filter: () => true, filter: () => true,
request: async (source) => { request: async (source) => {
const result = await axios.get(source) const result = await axios.get<string>(source)
return result.data; return result.data;
} }
} }