Browse Source

KERNEL-14316 fix:定时调度相关的 BUG 修复

es6
Treecat 2 years ago
parent
commit
d95861cd31
  1. 5
      package.json
  2. 2
      packages/demo/src/main.js
  3. 18
      packages/fineui/esm.babel.js
  4. 6
      packages/fineui/src/core/5.inject.js
  5. 4
      packages/fineui/src/core/platform/web/jquery/jquery.polyfill.js
  6. 4
      packages/fineui/src/index.js
  7. 4
      packages/fineui/typescript/bundle.ts
  8. 2
      packages/fineui/webpack/attachments.js

5
package.json

@ -22,6 +22,7 @@
"@babel/core": "^7.21.0", "@babel/core": "^7.21.0",
"@babel/runtime": "^7.21.0", "@babel/runtime": "^7.21.0",
"@fui/babel-preset-fineui": "^3.0.1", "@fui/babel-preset-fineui": "^3.0.1",
"@types/node": "^18.15.11",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"babel-loader": "^9.1.2", "babel-loader": "^9.1.2",
"babel-plugin-module-resolver": "^5.0.0", "babel-plugin-module-resolver": "^5.0.0",
@ -29,6 +30,7 @@
"css-loader": "^6.7.3", "css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^5.0.0", "css-minimizer-webpack-plugin": "^5.0.0",
"fork-ts-checker-webpack-plugin": "^8.0.0", "fork-ts-checker-webpack-plugin": "^8.0.0",
"glob": "^9.3.4",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"less": "^4.1.3", "less": "^4.1.3",
"less-loader": "^11.1.0", "less-loader": "^11.1.0",
@ -36,11 +38,10 @@
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"postcss": "^8.4.21", "postcss": "^8.4.21",
"postcss-loader": "^7.1.0", "postcss-loader": "^7.1.0",
"glob": "^9.3.4",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"terser-webpack-plugin": "^5.3.7", "terser-webpack-plugin": "^5.3.7",
"ts-node": "^10.9.1",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^5.75.0", "webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.8.0", "webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1", "webpack-cli": "^5.0.1",

2
packages/demo/src/main.js

@ -1,4 +1,4 @@
import { shortcut, Widget, BorderLayout, Label } from "@fui/core"; import { shortcut, Widget, BorderLayout } from "@fui/core";
import { West } from "./west"; import { West } from "./west";
import { Center } from "./center"; import { Center } from "./center";
import { North } from "./north"; import { North } from "./north";

18
packages/fineui/esm.babel.js

@ -1,5 +1,23 @@
const { resolve } = require("path");
const modules = ["./core/platform/web/config"];
module.exports = { module.exports = {
plugins: [ plugins: [
function (babel) {
const { types: t } = babel;
return {
visitor: {
Program(path) {
if (path.hub.file.opts.filename === resolve(__dirname, "src/index.js")) {
for (let i = 0; i < modules.length; i++) {
const importStatement = t.importDeclaration([], t.stringLiteral(modules[i]));
path.pushContainer("body", importStatement);
}
}
},
},
};
},
[ [
"@babel/plugin-proposal-decorators", "@babel/plugin-proposal-decorators",
{ {

6
packages/fineui/src/core/5.inject.js

@ -403,6 +403,12 @@ export function shortcut(xtype, cls) {
if (cls) { if (cls) {
cls.xtype = xtype; cls.xtype = xtype;
} }
// 兼容性
if(!cls.superclass) {
cls.superclass = Object.getPrototypeOf(cls.prototype);
}
kv[xtype] = cls; kv[xtype] = cls;
} }

4
packages/fineui/src/core/platform/web/jquery/jquery.polyfill.js

@ -1,9 +1,9 @@
/** /**
* 用于 jquery worker 环境或者 V8 引擎的 polyfill * 用于 jquery worker 环境或者 V8 引擎的 polyfill
*/ */
import { _global } from "@/core/0.foundation"; // import { _global } from "@/core/0.foundation";
// const _global = globalThis; const _global = globalThis;
const document = {}; const document = {};
const fakeElement = Object.create(document); const fakeElement = Object.create(document);

4
packages/fineui/src/index.js

@ -1,8 +1,6 @@
// sideEffects // sideEffects
import "./core/system"; import "./core/system";
import "./core/platform/web/jquery" import "./core/platform/web/jquery";
import "./core/platform/web/config";
import jquery from "jquery"; import jquery from "jquery";
export * from "./core"; export * from "./core";

4
packages/fineui/typescript/bundle.ts

@ -1,3 +1,3 @@
import fineui from "./index"; // import fineui from "./index";
BI.extend(BI, fineui); // BI.extend(BI, fineui);

2
packages/fineui/webpack/attachments.js

@ -6,6 +6,7 @@ const fixCompact = "./dist/fix/fix.compact.js";
const workerCompact = "./dist/fix/worker.compact.js"; const workerCompact = "./dist/fix/worker.compact.js";
const lodashJs = "src/core/1.lodash.js"; const lodashJs = "src/core/1.lodash.js";
const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js"; const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js";
const configJS = "./src/core/platform/web/config.js";
const runtimePolyfill = []; const runtimePolyfill = [];
@ -145,6 +146,7 @@ const fineuiWithoutNormalize = [].concat(
); );
const fineui = [].concat( const fineui = [].concat(
configJS,
bundleCss, bundleCss,
basicAttachmentMap.polyfill, basicAttachmentMap.polyfill,
basicAttachmentMap.js_bundle, basicAttachmentMap.js_bundle,

Loading…
Cancel
Save