Browse Source

KERNEL-16294 fix: 导出适配1、导出widgetEngin构造的Element没有width方法,通过css设置 2、打包添加基本控件fineuiwithoutjquery = worker+基本控件

research/test
jian 1 year ago
parent
commit
b2b59c9d40
  1. 8
      package.json
  2. 2
      packages/fineui/src/core/wrapper/layout/flex/flex.horizontal.js
  3. 14
      packages/fineui/src/without_Jquery_Polyfill.js
  4. 8
      packages/fineui/webpack/attachments.js
  5. 2
      packages/fineui/webpack/webpack.common.js
  6. 7
      packages/fineui/webpack/webpack.dev.js
  7. 4
      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"
}
}

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

@ -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");

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);

8
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,9 +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),
fineuiForV8Export: 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,
},
},
}
});

4
packages/fineui/webpack/webpack.prod.js

@ -10,9 +10,7 @@ module.exports = merge(common, {
entry: {
"fineui.min": attachments.fineui,
"fineui.worker.min": attachments.fineuiForWorker,
"fineui.worker": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill.min": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill.min": attachments.fineuiWithout_Jquery_Polyfill,
},
output: {

Loading…
Cancel
Save