Browse Source

Merge remote-tracking branch 'origin/master'

research/test
Kobi 5 months ago
parent
commit
75bb2197b0
  1. BIN
      packages/fineui/dist/font/iconfont.eot
  2. 8
      packages/fineui/dist/font/iconfont.svg
  3. BIN
      packages/fineui/dist/font/iconfont.ttf
  4. BIN
      packages/fineui/dist/font/iconfont.woff
  5. BIN
      packages/fineui/dist/font/iconfont.woff2
  6. 458
      packages/fineui/src/base/foundation/message.js
  7. 48
      packages/fineui/src/base/layer/layer.popover.js
  8. 2
      packages/fineui/src/case/button/item.multiselect.js
  9. 1
      packages/fineui/src/case/colorchooser/colorchooser.js
  10. 1
      packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js
  11. 2
      packages/fineui/typescript/base/foundation/message.ts

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

Binary file not shown.

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

@ -14,6 +14,10 @@
/>
<missing-glyph />
<glyph glyph-name="quxiaohebing" unicode="&#60090;" d="M384 728a8 8 0 0 0-8-8H176v-672h200a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8H128a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h248a8 8 0 0 0 8-8v-48z m256-736a8 8 0 0 1 8-8h248a16 16 0 0 1 16 16V768a16 16 0 0 1-16 16h-248a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8h200v-672h-200a8 8 0 0 1-8-8v-48zM480 592a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8V776a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-184z m0-600a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v184a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-184z m203.412 523.5a8 8 0 0 0 0-11.312l-120.344-120.344 120.344-120.344a8 8 0 0 0 0-11.312l-39.6-39.6a8 8 0 0 0-11.312 0l-120.344 120.344-122.9-122.9a8 8 0 0 0-11.312 0l-39.6 39.596a8 8 0 0 0 0 11.312l122.9 122.904-122.9 122.9a8 8 0 0 0 0 11.316l39.6 39.6a8 8 0 0 0 11.312 0l122.9-122.904 120.344 120.344a8 8 0 0 0 11.316 0l39.596-39.6z" horiz-adv-x="1024" />
<glyph glyph-name="chakanbiduixiangqing" unicode="&#60078;" d="M180 52V716h224v-449.884a331.58 331.58 0 0 0 68 118.616V768a16 16 0 0 1-16 16H128a16 16 0 0 1-16-16v-768a16 16 0 0 1 16-16h312.984A330.54 330.54 0 0 0 404 61.884V52H180zM912 768v-333.116a331.248 331.248 0 0 1-68 37.184V716h-224v-235.324a330.2 330.2 0 0 1-68-30.256V768a16 16 0 0 0 16 16h328a16 16 0 0 0 16-16z m48-600a231.996 231.996 0 0 0-45.328-137.76l80.28-80.28a8 8 0 0 0 0-11.316l-39.596-39.596a8 8 0 0 0-11.316 0l-80.592 80.592a232.024 232.024 0 0 0-299.496 24.312A232 232 0 1 0 960 168z m-400 0a168 168 0 1 1 336.004 0A168 168 0 0 1 560 168z" horiz-adv-x="1024" />
<glyph glyph-name="zhinengwenda" unicode="&#60077;" d="M561.404 272l55.864-38.192L732 160.684V272h164V736H276v-464h285.404z m20.596-91.608L541.616 208H260c-26.508 0-48 21.492-48 48V752c0 26.508 21.492 48 48 48h652c26.508 0 48-21.492 48-48v-496c0-26.508-21.492-48-48-48h-116v-105.656c0-25.264-27.896-40.564-49.2-26.988l-164.8 105.036zM184 524H112c-26.508 0-48-21.492-48-48v-342.688c0-26.512 21.492-48 48-48h116v-101.276c0-25.24 27.86-40.544 49.16-27.008l164.84 104.748 34.532 23.536h87.528v64h-107.264l-49.992-34.072L292 42.284v107.028H128V460h56V524zM696 644l-76-256h64l46 154.948L776 388h64l-76 256h-68zM532 518c0 34.24-27.76 62-62 62-34.24 0-62-27.76-62-62 0-34.24 27.76-62 62-62 34.24 0 62 27.76 62 62z m9.808-103.548A125.4 125.4 0 0 0 470 392C400.412 392 344 448.412 344 518S400.412 644 470 644 596 587.588 596 518c0-19.692-4.516-38.328-12.572-54.932l31.832-27.216-41.592-48.644-31.86 27.244z" horiz-adv-x="1024" />
<glyph glyph-name="a-typeshujuzhongxinstatenormal" unicode="&#60076;" d="M920 624a16 16 0 0 1-16 16h-64a16 16 0 0 1-16-16v-480a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16V624z m-176 88a16 16 0 0 0 16-16v-624a16 16 0 0 0-16-16h-64a16 16 0 0 0-16 16V696a16 16 0 0 0 16 16h64z m-160 72a16 16 0 0 0 16-16v-768a16 16 0 0 0-16-16H128a16 16 0 0 0-16 16V768a16 16 0 0 0 16 16h456z m-116-136H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8V640a8 8 0 0 1-8 8z m8-160a8 8 0 0 1-8 8H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56z m-8-144H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56a8 8 0 0 1-8 8z m8-160a8 8 0 0 1-8 8H244a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h224a8 8 0 0 1 8 8v56z" horiz-adv-x="1024" />
@ -1888,7 +1892,7 @@
<glyph glyph-name="normal63" unicode="&#59160;" d="M725.333333 704h85.333334a85.333333 85.333333 0 0 0 85.333333-85.333333v-512a85.333333 85.333333 0 0 0-85.333333-85.333334H213.333333a85.333333 85.333333 0 0 0-85.333333 85.333334v512a85.333333 85.333333 0 0 0 85.333333 85.333333h85.333334V725.333333a21.333333 21.333333 0 0 0 42.666666 0v-21.333333h341.333334V725.333333a21.333333 21.333333 0 1 0 42.666666 0v-21.333333z m0-42.666667V640a21.333333 21.333333 0 1 0-42.666666 0v21.333333H341.333333V640a21.333333 21.333333 0 0 0-42.666666 0v21.333333H213.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-85.333334h682.666666v85.333334a42.666667 42.666667 0 0 1-42.666666 42.666666h-85.333334z m-370.389333-237.824a159.530667 159.530667 0 0 0-34.56-27.264c-13.824-7.68-26.496-13.056-38.784-16.128v-41.472c25.344 7.296 46.464 18.816 62.976 34.56V149.333333h41.856v274.176h-31.488z m213.12 40.704l-134.4-353.28h35.712l134.016 353.28h-35.328z m135.552-40.704a159.530667 159.530667 0 0 0-34.56-27.264c-13.824-7.68-26.496-13.056-38.784-16.128v-41.472c25.344 7.296 46.464 18.816 62.976 34.56V149.333333h41.856v274.176h-31.488z" horiz-adv-x="1024" />
<glyph glyph-name="ditupeizhi_fangda" unicode="&#59023;" d="M480 704a8 8 0 0 1-8-8v-272H200a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h272v-272a8 8 0 0 1 8-8h64a8 8 0 0 1 8 8v272h272a8 8 0 0 1 8 8v64a8 8 0 0 1-8 8h-272V696a8 8 0 0 1-8 8h-64z" horiz-adv-x="1024" />
<glyph glyph-name="ditupeizhi_fangda" unicode="&#59023;" d="M552 736a8 8 0 0 1-8 8h-64a8 8 0 0 1-8-8v-312H160a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h312v-312a8 8 0 0 1 8-8h64a8 8 0 0 1 8 8v312h312a8 8 0 0 1 8 8v64a8 8 0 0 1-8 8h-312V736z" horiz-adv-x="1024" />
<glyph glyph-name="cengjiziduan" unicode="&#59495;" d="M526.532 799.156a8 8 0 0 0 7.156 0L975.8 578.096c5.896-2.948 5.896-11.36 0-14.308l-442.112-221.056a8.016 8.016 0 0 0-7.156 0L84.424 563.788c-5.9 2.948-5.9 11.36 0 14.308L526.532 799.16zM229.548 570.944l300.564-150.28 300.56 150.28-300.56 150.28-300.56-150.28zM98.112 401.784a8 8 0 0 0 11.504 7.192l420.496-204.84 420.496 204.84a8 8 0 0 0 11.504-7.192v-59.216c0-3.048-1.732-5.832-4.468-7.176l-427.532-210.448-427.532 210.448a7.996 7.996 0 0 0-4.468 7.176v59.216zM109.62 190.53200000000004c-5.312 2.592-11.508-1.276-11.508-7.188v-57.724c0-3.032 1.712-5.804 4.424-7.16l427.576-213.516 427.572 213.516a8.008 8.008 0 0 1 4.428 7.16v57.724a8 8 0 0 1-11.508 7.188l-420.492-205.248-420.492 205.248z" horiz-adv-x="1024" />
@ -1900,7 +1904,7 @@
<glyph glyph-name="normal65" unicode="&#59162;" d="M725.333333 704h85.333334a85.333333 85.333333 0 0 0 85.333333-85.333333v-512a85.333333 85.333333 0 0 0-85.333333-85.333334H213.333333a85.333333 85.333333 0 0 0-85.333333 85.333334v512a85.333333 85.333333 0 0 0 85.333333 85.333333h85.333334V725.333333a21.333333 21.333333 0 0 0 42.666666 0v-21.333333h341.333334V725.333333a21.333333 21.333333 0 1 0 42.666666 0v-21.333333z m0-42.666667V640a21.333333 21.333333 0 1 0-42.666666 0v21.333333H341.333333V640a21.333333 21.333333 0 0 0-42.666666 0v21.333333H213.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-85.333334h682.666666v85.333334a42.666667 42.666667 0 0 1-42.666666 42.666666h-85.333334zM384 426.666667v-42.666667h384v42.666667H384z m-128-256v-42.666667h384v42.666667H256z m0 128v-42.666667h512v42.666667H256z" horiz-adv-x="1024" />
<glyph glyph-name="ditupeizhi_suoxiao" unicode="&#59025;" d="M192 416a8 8 0 0 0 8 8h624a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H200a8 8 0 0 0-8 8v64z" horiz-adv-x="1024" />
<glyph glyph-name="ditupeizhi_suoxiao" unicode="&#59025;" d="M152 416a8 8 0 0 0 8 8h704a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H160a8 8 0 0 0-8 8v64z" horiz-adv-x="1024" />
<glyph glyph-name="yunhangzhong" unicode="&#59497;" d="M729.088 586.496a24 24 0 0 0 33.472-1.792c58.432-62.08 95.872-179.2 84.864-268.928a23.68 23.68 0 1 0-47.104 5.76c9.344 75.968-22.848 175.68-73.024 231.488a23.68 23.68 0 0 0 1.792 33.472zM810.368 318.08a142.336 142.336 0 1 0-54.272-279.488 142.336 142.336 0 0 0 54.272 279.424z m-12.16-62.912a78.336 78.336 0 1 1-29.952-153.728 78.336 78.336 0 0 1 29.888 153.728zM601.792 67.2a23.68 23.68 0 0 0-15.808-29.632c-84.736-25.856-169.6-18.24-246.272 29.632a23.68 23.68 0 1 0 25.088 40.192c64.896-40.512 135.616-46.336 207.36-24.448a23.68 23.68 0 0 0 29.632-15.744zM352.32 92.864a142.336 142.336 0 1 1-230.272 167.36 142.336 142.336 0 0 1 230.272-167.36z m-51.776 37.632a78.336 78.336 0 1 0-126.72 92.096 78.336 78.336 0 0 0 126.72-92.096zM194.88 415.232a23.68 23.68 0 0 0-16.704 29.056 307.648 307.648 0 0 0 162.624 197.248 23.68 23.68 0 0 0 20.8-42.624A260.224 260.224 0 0 1 224 432a23.68 23.68 0 0 0-29.12-16.768zM355.904 617.216A142.336 142.336 0 1 1 619.84 723.84 142.336 142.336 0 0 1 355.84 617.216z m59.328 23.936a78.336 78.336 0 1 0 145.28 58.688 78.336 78.336 0 0 0-145.28-58.688z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 1012 KiB

After

Width:  |  Height:  |  Size: 1013 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.

458
packages/fineui/src/base/foundation/message.js

@ -21,254 +21,250 @@ import {
} from "../../core";
import { Toast } from "../single";
export const Msg = (() => {
let $mask, $pop;
let $mask, $pop;
const messageShows = [];
const messageShows = [];
const toastStack = [];
const toastStack = [];
const defaultConfig = {
buttonHeight: 24,
};
const defaultConfig = {
buttonHeight: 24,
};
return {
alert(title, message, callback, config = defaultConfig) {
this._show(false, title, message, callback, config);
},
confirm(title, message, callback, config = defaultConfig) {
this._show(true, title, message, callback, config);
},
prompt(title, message, value, callback, min_width) {
// Msg.prompt(title, message, value, callback, min_width);
},
toast(message, options, context) {
isString(options) && (options = { level: options });
options = options || {};
context = context || Widget._renderEngine.createElement("body");
const level = options.level || "common";
const autoClose = isNull(options.autoClose) ? true : options.autoClose;
const callback = isFunction(options.callback) ? options.callback : emptyFn;
const toast = createWidget({
type: "bi.toast",
cls: "bi-message-animate bi-message-leave",
level,
autoClose,
closable: options.closable,
text: message,
listeners: [
{
eventName: Toast.EVENT_DESTORY,
action() {
remove(toastStack, toast.element);
let _height = SIZE_CONSANTS.TOAST_TOP;
each(toastStack, (i, element) => {
element.css({ top: _height });
_height += element.outerHeight() + 10;
});
callback();
},
}
],
});
let height = SIZE_CONSANTS.TOAST_TOP;
each(toastStack, (i, element) => {
height += element.outerHeight() + 10;
});
createWidget({
type: "bi.absolute",
element: context,
items: [
{
el: toast,
left: "50%",
top: height,
}
],
});
toastStack.push(toast.element);
toast.element.css({ "margin-left": (-1 * toast.element.outerWidth()) / 2 });
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
export const Msg = {
alert(title, message, callback, config = defaultConfig) {
_show(false, title, message, callback, config);
},
confirm(title, message, callback, config = defaultConfig) {
_show(true, title, message, callback, config);
},
toast(message, options, context) {
isString(options) && (options = { level: options });
options = options || {};
context = context || Widget._renderEngine.createElement("body");
const level = options.level || "common";
const autoClose = isNull(options.autoClose) ? true : options.autoClose;
const callback = isFunction(options.callback) ? options.callback : emptyFn;
const toast = createWidget({
type: "bi.toast",
cls: "bi-message-animate bi-message-leave",
level,
autoClose,
closable: options.closable,
text: message,
listeners: [
{
eventName: Toast.EVENT_DESTORY,
action() {
remove(toastStack, toast.element);
let _height = SIZE_CONSANTS.TOAST_TOP;
each(toastStack, (i, element) => {
element.css({ top: _height });
_height += element.outerHeight() + 10;
});
callback();
},
}
],
});
let height = SIZE_CONSANTS.TOAST_TOP;
each(toastStack, (i, element) => {
height += element.outerHeight() + 10;
});
createWidget({
type: "bi.absolute",
element: context,
items: [
{
el: toast,
left: "50%",
top: height,
}
],
});
toastStack.push(toast.element);
toast.element.css({ "margin-left": (-1 * toast.element.outerWidth()) / 2 });
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose &&
delay(() => {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
toast.destroy?.();
}, 5000);
autoClose &&
delay(() => {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
toast.destroy?.();
}, 5000);
return function() {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
toast.destroy?.();
};
},
_show(hasCancel, title, message, callback, config) {
isNull($mask) &&
($mask = Widget._renderEngine
.createElement("<div class=\"bi-z-index-mask\">")
.css({
position: "absolute",
zIndex: zIndex_tip - 2,
top: 0,
left: 0,
right: 0,
bottom: 0,
opacity: 0.5,
})
.appendTo("body"));
$pop = Widget._renderEngine
.createElement("<div class=\"bi-message-depend\">")
.css({
position: "absolute",
zIndex: zIndex_tip - 1,
top: 0,
left: 0,
right: 0,
bottom: 0,
})
.appendTo("body");
return function() {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
toast.destroy?.();
};
},
};
function close() {
messageShows[messageShows.length - 1].destroy();
messageShows.pop();
if (messageShows.length === 0) {
$mask.remove();
$mask = null;
}
}
function _show(hasCancel, title, message, callback, config) {
isNull($mask) &&
($mask = Widget._renderEngine
.createElement("<div class=\"bi-z-index-mask\">")
.css({
position: "absolute",
zIndex: zIndex_tip - 2,
top: 0,
left: 0,
right: 0,
bottom: 0,
opacity: 0.5,
})
.appendTo("body"));
$pop = Widget._renderEngine
.createElement("<div class=\"bi-message-depend\">")
.css({
position: "absolute",
zIndex: zIndex_tip - 1,
top: 0,
left: 0,
right: 0,
bottom: 0,
})
.appendTo("body");
function close() {
messageShows[messageShows.length - 1].destroy();
messageShows.pop();
if (messageShows.length === 0) {
$mask.remove();
$mask = null;
}
}
const controlItems = [];
if (hasCancel === true) {
controlItems.push({
el: {
type: "bi.button",
height: config.buttonHeight,
text: i18nText("BI-Basic_Cancel"),
light: true,
handler() {
const controlItems = [];
if (hasCancel === true) {
controlItems.push({
el: {
type: "bi.button",
height: config.buttonHeight,
text: i18nText("BI-Basic_Cancel"),
light: true,
handler() {
close();
if (isFunction(callback)) {
callback.apply(null, [false]);
}
},
},
});
}
controlItems.push({
el: {
type: "bi.button",
height: config.buttonHeight,
text: i18nText("BI-Basic_OK"),
handler() {
close();
if (isFunction(callback)) {
callback.apply(null, [true]);
}
},
},
});
const conf = {
element: $pop,
type: "bi.center_adapt",
items: [
{
type: "bi.border",
attributes: {
tabIndex: 1,
},
mounted() {
this.element.keyup(e => {
if (e.keyCode === KeyCode.ENTER) {
close();
if (isFunction(callback)) {
callback.apply(null, [false]);
callback.apply(null, [true]);
}
},
},
});
}
controlItems.push({
el: {
type: "bi.button",
height: config.buttonHeight,
text: i18nText("BI-Basic_OK"),
handler() {
close();
if (isFunction(callback)) {
callback.apply(null, [true]);
}
},
},
});
const conf = {
element: $pop,
type: "bi.center_adapt",
items: [
{
type: "bi.border",
attributes: {
tabIndex: 1,
},
mounted() {
this.element.keyup(e => {
if (e.keyCode === KeyCode.ENTER) {
close();
if (isFunction(callback)) {
callback.apply(null, [true]);
}
} else if (e.keyCode === KeyCode.ESCAPE) {
close();
if (hasCancel === true) {
if (isFunction(callback)) {
callback.apply(null, [false]);
}
}
} else if (e.keyCode === KeyCode.ESCAPE) {
close();
if (hasCancel === true) {
if (isFunction(callback)) {
callback.apply(null, [false]);
}
});
try {
this.element.focus();
} catch (e) {
}
},
cls: "bi-card",
items: {
north: {
el: {
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: {
type: "bi.label",
cls: "bi-font-bold",
text: title || i18nText("BI-Basic_Prompt"),
textAlign: "left",
hgap: 20,
height: 40,
},
},
east: {
el: {
type: "bi.icon_button",
cls: "bi-message-close close-font",
// height: 50,
handler() {
close();
if (isFunction(callback)) {
callback.apply(null, [false]);
}
},
},
width: 56,
},
},
},
height: 40,
},
center: {
el: isPlainObject(message)
? message
: {
}
});
try {
this.element.focus();
} catch (e) {
}
},
cls: "bi-card",
items: {
north: {
el: {
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: {
type: "bi.label",
vgap: 10,
cls: "bi-font-bold",
text: title || i18nText("BI-Basic_Prompt"),
textAlign: "left",
hgap: 20,
whiteSpace: "normal",
text: message,
height: 40,
},
},
south: {
el: {
type: "bi.absolute",
items: [
{
el: {
type: "bi.right_vertical_adapt",
lgap: 10,
items: controlItems,
},
top: 0,
left: 20,
right: 20,
bottom: 0,
}
],
},
height: 44,
east: {
el: {
type: "bi.icon_button",
cls: "bi-message-close close-font",
// height: 50,
handler() {
close();
if (isFunction(callback)) {
callback.apply(null, [false]);
}
},
},
width: 56,
},
},
},
width: 450,
height: 200,
}
],
};
messageShows[messageShows.length] = createWidget(conf);
},
height: 40,
},
center: {
el: isPlainObject(message)
? message
: {
type: "bi.label",
vgap: 10,
hgap: 20,
whiteSpace: "normal",
text: message,
},
},
south: {
el: {
type: "bi.absolute",
items: [
{
el: {
type: "bi.right_vertical_adapt",
lgap: 10,
items: controlItems,
},
top: 0,
left: 20,
right: 20,
bottom: 0,
}
],
},
height: 44,
},
},
width: 450,
height: 200,
}
],
};
})();
messageShows[messageShows.length] = createWidget(conf);
}

48
packages/fineui/src/base/layer/layer.popover.js

@ -64,30 +64,7 @@ export class Popover extends Widget {
// var self = this;
const { header, headerHeight, closable, logic, footer, footerHeight, body, bodyTgap, bodyHgap } = this.options;
const c = this._constant;
this.startX = 0;
this.startY = 0;
const size = this._calculateSize();
const bodyDom = getOuterBody();
this.tracker = new MouseMoveTracker(
(deltaX, deltaY) => {
const W = Widget._renderEngine.createElement(bodyDom).width();
const H = Widget._renderEngine.createElement(bodyDom).height();
this.startX += deltaX;
this.startY += deltaY;
this.element.css({
left: `${clamp(this.startX, 0, W - this.element.width())}px`,
top: `${clamp(this.startY, 0, H - this.element.height())}px`,
});
// BI-12134 没有什么特别好的方法
Resizers._resize({
target: this.element[0],
});
},
() => {
this.tracker.releaseMouseMoves();
},
_global
);
const items = [
{
el: {
@ -219,7 +196,30 @@ export class Popover extends Widget {
// mounted之后绑定事件
mounted() {
this.dragger.element.mousedown(e => {
this.startX = 0;
this.startY = 0;
const bodyDom = getOuterBody();
this.tracker = new MouseMoveTracker(
(deltaX, deltaY) => {
const W = Widget._renderEngine.createElement(bodyDom).width();
const H = Widget._renderEngine.createElement(bodyDom).height();
this.startX += deltaX;
this.startY += deltaY;
this.element.css({
left: `${clamp(this.startX, 0, W - this.element.width())}px`,
top: `${clamp(this.startY, 0, H - this.element.height())}px`,
});
// BI-12134 没有什么特别好的方法
Resizers._resize({
target: this.element[0],
});
},
() => {
this.tracker.releaseMouseMoves();
},
_global
);
this.dragger?.element.mousedown(e => {
if (this.options.draggable !== false) {
this.startX = this.element[0].offsetLeft;
this.startY = this.element[0].offsetTop;

2
packages/fineui/src/case/button/item.multiselect.js

@ -19,6 +19,7 @@ export class MultiSelectItem extends BasicButton {
},
height: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
iconWrapperWidth: 26,
el: {},
});
}
@ -55,6 +56,7 @@ export class MultiSelectItem extends BasicButton {
keyword: o.keyword,
value: o.value,
py: o.py,
...o.el
},
}
],

1
packages/fineui/src/case/colorchooser/colorchooser.js

@ -24,7 +24,6 @@ export class ColorChooser extends Widget {
height: 24,
el: {},
simple: false,
colorItems: null,
colorBoardHeight: 80,
});
}

1
packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js

@ -47,7 +47,6 @@ export class HexColorChooserPopup extends Widget {
width: 300,
recommendColorsGetter: emptyFn, // 推荐色获取接口
simple: false, // 简单模式, popup中没有自动和透明
colorItems: null,
colorBoardHeight: 80,
};

2
packages/fineui/typescript/base/foundation/message.ts

@ -14,7 +14,5 @@ export declare namespace Msg {
[key: string]: any
}, callback?: (result: boolean) => void): void
function prompt(title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number): void
function toast(message: string | Obj, options?: toastOptions | string, context?: HTMLElement): Function
}

Loading…
Cancel
Save