Browse Source

BI-129824 fix: 控件优化

research/test
jian 10 months ago
parent
commit
04f12cdf17
  1. 4
      packages/fineui/src/base/foundation/message.js
  2. 4
      packages/fineui/src/case/button/switch.js

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

@ -199,7 +199,9 @@ function _show(hasCancel, title, message, callback, config = {}) {
items: [ items: [
{ {
type: VerticalLayout.xtype, type: VerticalLayout.xtype,
cls: "bi-card bi-border-radius",
width: 450, width: 450,
hgap: 32,
attributes: { attributes: {
tabIndex: 1, tabIndex: 1,
}, },
@ -224,8 +226,6 @@ function _show(hasCancel, title, message, callback, config = {}) {
} catch (e) { } catch (e) {
} }
}, },
cls: "bi-card",
hgap: 32,
items: [ items: [
{ {
el: { el: {

4
packages/fineui/src/case/button/switch.js

@ -39,7 +39,7 @@ export class Switch extends BasicButton {
width: 12, width: 12,
height: 12, height: 12,
top: tgap, top: tgap,
left: o.selected ? 28 : 4, left: o.selected ? o.width - 16 : 4,
}, },
{ {
type: Label.xtype, type: Label.xtype,
@ -78,7 +78,7 @@ export class Switch extends BasicButton {
setSelected(v) { setSelected(v) {
super.setSelected(...arguments); super.setSelected(...arguments);
this.layout.attr("items")[0].left = v ? 28 : 4; this.layout.attr("items")[0].left = v ? this.options.width - 16 : 4;
this.layout.resize(); this.layout.resize();
this.options.showTip && this.openTip.setVisible(v); this.options.showTip && this.openTip.setVisible(v);
this.options.showTip && this.closeTip.setVisible(!v); this.options.showTip && this.closeTip.setVisible(!v);

Loading…
Cancel
Save