dfish-widget 1.0.124 → 1.0.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -3619,7 +3619,9 @@ const O = {},
3619
3619
  axis() {
3620
3620
  let f = this.x.position || this.defaultSnapPosition;
3621
3621
  let r = f;
3622
- if (typeof f === 'string' || !f) {
3622
+ if (this.slotTarget && !this.x.visible) {
3623
+ r = {top: 0, left: 0};
3624
+ } else if (typeof f === 'string' || !f) {
3623
3625
  let el = this.el();
3624
3626
  if (!el || this.x.fullScreen) return;
3625
3627
  let c = this.x.local;
@@ -3677,8 +3679,8 @@ const O = {},
3677
3679
  closeRelease() {
3678
3680
  this.x.autoHide && this.listenHide(F);
3679
3681
  let f = this.x.position;
3680
- if (f && typeof f === 'string' && this.el()) { // 当前窗口关闭后,有相同position的dialog依次移动补空位
3681
- let lc = this._pos;
3682
+ let lc = this._pos;
3683
+ if (f && typeof f === 'string' && lc && this.el()) { // 当前窗口关闭后,有相同position的dialog依次移动补空位
3682
3684
  let ps = $$1.q(`~[w-dialog-position="${lc.type}"]`, this.el());
3683
3685
  ps.each((i, el) => {
3684
3686
  const g = $$1(el);
@@ -3719,7 +3721,7 @@ const O = {},
3719
3721
  let evs = $$1.br.mobile ? ['touchend'] : ['mousedown', wl];
3720
3722
  evs.forEach(v => document[n](v, this.bind('listenHideClose', (e) => {
3721
3723
  let c;
3722
- if (this.x.visible !== false && (e.target.classList.contains('w-dialog-cover') || e.type === wl || !(this.hasBubble(e.target) || (!this.x.independent && ((c = this.getCommander()).isWidget ? c.hasBubble(e.target) : c.contains(e.target)))))) {
3724
+ if (this.x.visible !== false && (e.target.classList.contains('w-dialog-cover') || (this.isForceWheelHide && e.type === wl) || !(this.hasBubble(e.target) || (!this.x.independent && ((c = this.getCommander()).isWidget ? c.hasBubble(e.target) : c.contains(e.target)))))) {
3723
3725
  if (e.target.id == this.id + 'cvr') e.stopPropagation();
3724
3726
  this.close();
3725
3727
  }
@@ -3835,6 +3837,9 @@ const O = {},
3835
3837
  defaultSnapPosition() {
3836
3838
  return 'cc'
3837
3839
  },
3840
+ isForceWheelHide() {
3841
+ return false
3842
+ },
3838
3843
  slotTarget() {
3839
3844
  return this.$slots.target
3840
3845
  },
@@ -3905,8 +3910,8 @@ const O = {},
3905
3910
  this.$watch(() => this.x.visible, (vis) => {
3906
3911
  if (vis !== false) {
3907
3912
  this.x.autoHide && this.listenHide(T);
3908
- this.axis();
3909
3913
  }
3914
+ this.axis();
3910
3915
  }, {immediate: true});
3911
3916
  setTimeout(() => {
3912
3917
  this.axis();
@@ -4382,6 +4387,7 @@ let inst$1 = null;
4382
4387
  escape: true,
4383
4388
  }
4384
4389
  },
4390
+ // implement
4385
4391
  html_slots_default() {
4386
4392
  return h(script$17, {text: this.x.text, escape: this.x.escape}, this.$slots)
4387
4393
  },
@@ -4397,7 +4403,11 @@ let inst$1 = null;
4397
4403
  },
4398
4404
  },
4399
4405
  computed: {
4400
- slotTarget() {
4406
+ // 当滚鼠标轮滚动,是否强制隐藏
4407
+ isForceWheelHide() {
4408
+ return true
4409
+ },
4410
+ slotTarget() {
4401
4411
  return this.$slots.default
4402
4412
  },
4403
4413
  defaultSnapTargetElem() {
@@ -4623,7 +4633,7 @@ var script$14 = {
4623
4633
  const title = this.pubParent && this.pubParent.x.flexSize && t;
4624
4634
  r.push(h('div', {
4625
4635
  class: 'w-button-text'
4626
- }, h('span', {class: 'w-button-text-line f-line-1', title}, t)));
4636
+ }, h('span', {class: 'w-button-text-line f-line-1', title: title || ''}, t)));
4627
4637
  }
4628
4638
  if (this.isMore && this.x.showArrowIcon) {
4629
4639
  r.push(h(script$15, {
@@ -12144,9 +12154,11 @@ var script$7 = {
12144
12154
  onblur(e) {
12145
12155
  this.trigger('blur');
12146
12156
  setTimeout(() => {
12147
- if (!this.$.isUnmounted && !this.$.isDeactivated) this.valid('blur');
12148
- if (!this.$refs.list.contains(document.activeElement)) {
12149
- this.isFocus = false;
12157
+ if (!this.$.isUnmounted && !this.$.isDeactivated) {
12158
+ this.valid('blur');
12159
+ if (!this.$refs.list.contains(document.activeElement)) {
12160
+ this.isFocus = false;
12161
+ }
12150
12162
  }
12151
12163
  }, 100);
12152
12164
  },