Browse Source

Pull request #3493: KERNEL-14316 fix:同步以及修复定时调度相关细节问题

Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6

* commit 'faa3b96827bc680bfcaa55c8c0d6a3458a940839':
  KERNEL-14316 fix:同步以及修复相关细节问题
  KERNEL-14316 fix:定时调度相关的 BUG 修复
es6
treecat-罗群 2 years ago
parent
commit
7bdc339452
  1. 4
      .gitignore
  2. 5
      package.json
  3. 2
      packages/demo/src/main.js
  4. BIN
      packages/fineui/dist/font/iconfont.eot
  5. 2241
      packages/fineui/dist/font/iconfont.svg
  6. BIN
      packages/fineui/dist/font/iconfont.ttf
  7. BIN
      packages/fineui/dist/font/iconfont.woff
  8. BIN
      packages/fineui/dist/font/iconfont.woff2
  9. 18
      packages/fineui/esm.babel.js
  10. 6
      packages/fineui/src/base/collection/collection.js
  11. 1
      packages/fineui/src/case/trigger/trigger.text.js
  12. 2
      packages/fineui/src/case/trigger/trigger.text.select.js
  13. 6
      packages/fineui/src/core/5.inject.js
  14. 4
      packages/fineui/src/core/platform/web/jquery/jquery.polyfill.js
  15. 7
      packages/fineui/src/core/utils/dom.js
  16. 4
      packages/fineui/src/index.js
  17. 4
      packages/fineui/src/less/base/single/text.less
  18. 9
      packages/fineui/src/less/widget/multitree/check/multi.tree.check.pane.less
  19. 2
      packages/fineui/src/widget/multitree/check/multi.tree.check.pane.js
  20. 4
      packages/fineui/typescript/bundle.ts
  21. 2
      packages/fineui/webpack/attachments.js

4
.gitignore vendored

@ -1,2 +1,4 @@
node_modules
dist
packages/demo/dist
packages/fineui/dist/*
!packages/fineui/dist/font

5
package.json

@ -22,6 +22,7 @@
"@babel/core": "^7.21.0",
"@babel/runtime": "^7.21.0",
"@fui/babel-preset-fineui": "^3.0.1",
"@types/node": "^18.15.11",
"autoprefixer": "^10.4.14",
"babel-loader": "^9.1.2",
"babel-plugin-module-resolver": "^5.0.0",
@ -29,6 +30,7 @@
"css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^5.0.0",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"glob": "^9.3.4",
"html-webpack-plugin": "^5.5.0",
"less": "^4.1.3",
"less-loader": "^11.1.0",
@ -36,11 +38,10 @@
"npm-run-all": "^4.1.5",
"postcss": "^8.4.21",
"postcss-loader": "^7.1.0",
"glob": "^9.3.4",
"style-loader": "^3.3.1",
"terser-webpack-plugin": "^5.3.7",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.8.0",
"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 { Center } from "./center";
import { North } from "./north";

BIN
packages/fineui/dist/font/iconfont.eot vendored

Binary file not shown.

2241
packages/fineui/dist/font/iconfont.svg vendored

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 885 KiB

BIN
packages/fineui/dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff2 vendored

Binary file not shown.

18
packages/fineui/esm.babel.js

@ -1,5 +1,23 @@
const { resolve } = require("path");
const modules = ["./core/platform/web/config"];
module.exports = {
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",
{

6
packages/fineui/src/base/collection/collection.js

@ -359,11 +359,9 @@ export class CollectionView extends Widget {
_isOverflowY() {
const o = this.options;
const { overflowX } = this.options;
const { overflowY, scrollable, scrolly } = o;
// 兼容一下
const scrollable = o.scrollable,
scrolly = o.scrolly;
if (overflowX === false) {
if (overflowY === false) {
return false;
}
if (scrolly) {

1
packages/fineui/src/case/trigger/trigger.text.js

@ -47,7 +47,6 @@ export class TextTrigger extends Trigger {
height: o.height,
text: text || o.defaultText,
tipType: o.tipType,
title: o.title,
warningTitle: o.warningTitle,
hgap: o.textHgap,
vgap: o.textVgap,

2
packages/fineui/src/case/trigger/trigger.text.select.js

@ -43,7 +43,7 @@ export class SelectTextTrigger extends Trigger {
textTgap: o.textTgap,
textBgap: o.textBgap,
tipType: o.tipType,
title: o.title,
title: null,
allowClear: o.allowClear,
listeners: [
{

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

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

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

@ -1,9 +1,9 @@
/**
* 用于 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 fakeElement = Object.create(document);

7
packages/fineui/src/core/utils/dom.js

@ -2,7 +2,7 @@
* 对DOM操作的通用函数
*/
import { Widget } from "../4.widget"
import { each, isEmpty, isNull } from "../2.base";
import { each, isEmpty, isNull, isNotNull } from "../2.base";
import $ from "jquery";
export function ready(fn) {
@ -103,13 +103,14 @@ export function getTextSizeHeight(text, fontSize = 12) {
// 获取滚动条的宽度,页面display: none时候获取到的为0
let _scrollWidth = null;
export function getScrollWidth() {
if (isNull(_scrollWidth) || _scrollWidth === 0) {
export function getScrollWidth(css) {
if (isNull(_scrollWidth) || isNotNull(css) || _scrollWidth === 0) {
const ul = Widget._renderEngine.createElement("<div>").width(50).height(50)
.css({
position: "absolute",
top: "-9999px",
overflow: "scroll",
...css
})
.appendTo("body");
_scrollWidth = ul[0].offsetWidth - ul[0].clientWidth;

4
packages/fineui/src/index.js

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

4
packages/fineui/src/less/base/single/text.less

@ -3,5 +3,7 @@
.bi-text {
.overflow-hidden();
.box-sizing(border-box);
word-break: break-all;
// https://developer.mozilla.org/en-US/docs/Web/CSS/word-break 参考mdn最标准的规范. 不再接受任何质疑
word-break: normal;
overflow-wrap: anywhere;
}

9
packages/fineui/src/less/widget/multitree/check/multi.tree.check.pane.less

@ -1,9 +0,0 @@
@import "../../../index.less";
.bi-multi-tree-check-pane {
& .multi-tree-continue-select {
}
& .multi-tree-check-selected {
color: @color-bi-text-multi-tree-check-pane-check-button;
}
}

2
packages/fineui/src/widget/multitree/check/multi.tree.check.pane.js

@ -42,7 +42,7 @@ export class MultiTreeCheckPane extends Pane {
type: TextButton.xtype,
title: i18nText("BI-Continue_Select"),
text: i18nText("BI-Continue_Select"),
cls: "multi-tree-check-selected",
cls: "bi-high-light",
});
continueSelect.on(TextButton.EVENT_CHANGE, () => {
opts.onClickContinueSelect();

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 lodashJs = "src/core/1.lodash.js";
const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js";
const configJS = "./src/core/platform/web/config.js";
const runtimePolyfill = [];
@ -145,6 +146,7 @@ const fineuiWithoutNormalize = [].concat(
);
const fineui = [].concat(
configJS,
bundleCss,
basicAttachmentMap.polyfill,
basicAttachmentMap.js_bundle,

Loading…
Cancel
Save