Browse Source

Pull request #3657: 无jira任务 导出缺失代码

Merge in VISUAL/fineui from ~IMP/fineui_fui:master to master

* commit 'b2b59c9d40b7372d87589507b40c69bcc297b450':
  KERNEL-16294 fix: 导出适配1、导出widgetEngin构造的Element没有width方法,通过css设置 2、打包添加基本控件fineuiwithoutjquery = worker+基本控件
  无jira任务 回退
  无jira任务 多余空行
  无jira任务 导出缺失
research/test
imp-张健 1 year ago
parent
commit
ba2d47b0e3
  1. 8
      package.json
  2. 6
      packages/fineui/src/core/wrapper/layout/flex/flex.horizontal.js
  3. 14
      packages/fineui/src/without_Jquery_Polyfill.js
  4. 7
      packages/fineui/webpack/attachments.js
  5. 2
      packages/fineui/webpack/webpack.common.js
  6. 7
      packages/fineui/webpack/webpack.dev.js
  7. 47
      packages/fineui/webpack/webpack.prod.js

8
package.json

@ -41,17 +41,17 @@
"less-loader": "^11.1.0",
"mini-css-extract-plugin": "^2.7.5",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.0",
"postcss": "^8.4.21",
"postcss-loader": "^7.1.0",
"prettier": "^3.0.0",
"style-loader": "^3.3.1",
"terser-webpack-plugin": "^5.3.7",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1",
"webpack-merge": "^5.8.0"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
}
}

6
packages/fineui/src/core/wrapper/layout/flex/flex.horizontal.js

@ -51,7 +51,7 @@ export class FlexHorizontalLayout extends Layout {
if (o.columnSize.length > 0) {
return o.columnSize.indexOf("fill") >= 0 || o.columnSize.indexOf("auto") >= 0;
}
return some(o.items, (i, item) => {
if (item.width === "fill" || item.width === "auto") {
return true;
@ -87,7 +87,7 @@ export class FlexHorizontalLayout extends Layout {
}
}
if (columnSize > 0) {
w.element.width(this._optimiseGap(columnSize));
w.element.css({ width: this._optimiseGap(columnSize) });
}
if (columnSize === "fill") {
w.element.addClass("f-f");
@ -103,7 +103,7 @@ export class FlexHorizontalLayout extends Layout {
w.element.addClass("l-c");
}
this._handleGap(w, item, i);
return w;
}

14
packages/fineui/src/without_Jquery_Polyfill.js

@ -0,0 +1,14 @@
export * from './worker.js';
// "!src/base/single/input/file.js",
// "!src/case/ztree/**/*.js",
import * as _case from './case';
import * as _widget from './widget';
import { _global } from "@/core/0.foundation";
const fuiExport = {
..._case,
..._widget
};
Object.assign(_global.BI, fuiExport);

7
packages/fineui/webpack/attachments.js

@ -21,6 +21,7 @@ const basicAttachmentMap = {
]),
js_bundle: sync(["src/bundle.js"]),
js_worker: sync(["src/worker.js"]),
js_without_Jquery_polyfill: sync(["src/without_Jquery_Polyfill.js"]),
};
const bundleCss = uniq([].concat(basicAttachmentMap.less, basicAttachmentMap.ui, sync(["public/less/app.less", "public/less/**/*.less"])));
@ -38,8 +39,14 @@ const fineuiForWorker = [].concat(
basicAttachmentMap.ts
);
const fineuiWithout_Jquery_Polyfill = [].concat(
basicAttachmentMap.js_withoutJquery,
basicAttachmentMap.ts
);
module.exports = {
fineui: uniq(fineui),
fineuiForWorker: uniq(fineuiForWorker),
fineuiWithout_Jquery_Polyfill: uniq(fineuiWithout_Jquery_Polyfill),
bundleCss,
};

2
packages/fineui/webpack/webpack.common.js

@ -25,6 +25,8 @@ function git(command) {
module.exports = {
entry: {
fineui: attachments.fineui,
"fineui.worker": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill": attachments.fineuiWithout_Jquery_Polyfill,
},
externals: {
lodash: "_",

7
packages/fineui/webpack/webpack.dev.js

@ -16,5 +16,12 @@ module.exports = merge(common, {
devServer: {
port: 9001,
// liveReload: true,
client: {
logging: 'error',
overlay: {
errors: true,
warnings: false,
},
},
}
});

47
packages/fineui/webpack/webpack.prod.js

@ -1,24 +1,23 @@
const common = require("./webpack.common.js");
const { merge } = require("webpack-merge");
const dirs = require("./dirs");
const attachments = require("./attachments");
module.exports = merge(common, {
mode: "production",
target: ["web", "es5"],
entry: {
"fineui.min": attachments.fineui,
"fineui.worker.min": attachments.fineuiForWorker,
"fineui.worker": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill.min":attachments.fineuiForWorker,
},
output: {
path: dirs.DEST,
filename: "[name].js",
publicPath: ""
},
devtool: "hidden-source-map"
});
const common = require("./webpack.common.js");
const { merge } = require("webpack-merge");
const dirs = require("./dirs");
const attachments = require("./attachments");
module.exports = merge(common, {
mode: "production",
target: ["web", "es5"],
entry: {
"fineui.min": attachments.fineui,
"fineui.worker.min": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill.min": attachments.fineuiWithout_Jquery_Polyfill,
},
output: {
path: dirs.DEST,
filename: "[name].js",
publicPath: ""
},
devtool: "hidden-source-map"
});

Loading…
Cancel
Save