dfish-widget 1.0.86 → 1.0.88
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 +29 -13
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -3534,7 +3534,7 @@ const O = {},
|
|
|
3534
3534
|
'position', 'snap', 'indent', 'offsetRange', 'local', 'fullScreen', 'hoverShowDrop', 'visible',
|
|
3535
3535
|
...boundary
|
|
3536
3536
|
],
|
|
3537
|
-
emits: ['show', 'close', '
|
|
3537
|
+
emits: ['show', 'close', 'update:visible'],
|
|
3538
3538
|
data() {
|
|
3539
3539
|
return {
|
|
3540
3540
|
isDialog: true,
|
|
@@ -3787,7 +3787,8 @@ const O = {},
|
|
|
3787
3787
|
if (this.x.cover && this.x.visible !== false && !this.isDeactivated) {
|
|
3788
3788
|
let coverProps = {
|
|
3789
3789
|
ref: 'cover',
|
|
3790
|
-
class: 'w-dialog-cover f-abs-full'
|
|
3790
|
+
class: 'w-dialog-cover f-abs-full',
|
|
3791
|
+
...this.scope_props
|
|
3791
3792
|
};
|
|
3792
3793
|
if (this.x.coverProps) {
|
|
3793
3794
|
coverProps = mergeProps(coverProps, this.x.coverProps);
|
|
@@ -4471,7 +4472,7 @@ script$13.__file = "src/widgets/Img.vue";
|
|
|
4471
4472
|
var script$12 = {
|
|
4472
4473
|
pubParentName: 'w-buttonbar',
|
|
4473
4474
|
mixins: [script$1h],
|
|
4474
|
-
props: ['text', 'icon', 'focusIcon', 'face', 'target', 'closable', 'loading', 'disabled', 'vertical', 'hoverShowDrop', 'dropProps', 'dropIcon', 'showDropIcon'],
|
|
4475
|
+
props: ['text', 'icon', 'focusIcon', 'face', 'target', 'closable', 'dropToggle', 'loading', 'disabled', 'vertical', 'hoverShowDrop', 'dropProps', 'dropIcon', 'showDropIcon'],
|
|
4475
4476
|
inject: ['providePubParent', 'provideMenu_w'],
|
|
4476
4477
|
emits: ['click:close', 'dropClose'],
|
|
4477
4478
|
data() {
|
|
@@ -4481,7 +4482,7 @@ var script$12 = {
|
|
|
4481
4482
|
mouses: {
|
|
4482
4483
|
onmouseenter: e => {
|
|
4483
4484
|
if (!this.showDrop) {
|
|
4484
|
-
if (this.pubParent && menuRelate(this.pubParent) && !menuRelate()) ;
|
|
4485
|
+
if (this.pubParent && menuRelate(this.pubParent) && !menuRelate(this)) closeMenu();
|
|
4485
4486
|
if(this.x.hoverShowDrop) {
|
|
4486
4487
|
this.drop();
|
|
4487
4488
|
this.$nextTick(() => e.currentTarget.classList.add('z-hv'));
|
|
@@ -4508,14 +4509,23 @@ var script$12 = {
|
|
|
4508
4509
|
drop() {
|
|
4509
4510
|
if (this.hasChild) {
|
|
4510
4511
|
this.showDrop = true;
|
|
4512
|
+
} else {
|
|
4513
|
+
closeMenu();
|
|
4511
4514
|
}
|
|
4515
|
+
},
|
|
4516
|
+
isShowDrop() {
|
|
4517
|
+
return this.showDrop
|
|
4512
4518
|
},
|
|
4513
4519
|
closeDrop() {
|
|
4514
4520
|
this.showDrop = false;
|
|
4515
4521
|
},
|
|
4516
4522
|
onclick(e) {
|
|
4517
4523
|
if (this.isMore) {
|
|
4518
|
-
this.
|
|
4524
|
+
if (this.showDrop && this.x.dropToggle) {
|
|
4525
|
+
this.closeDrop();
|
|
4526
|
+
} else {
|
|
4527
|
+
this.drop();
|
|
4528
|
+
}
|
|
4519
4529
|
}
|
|
4520
4530
|
if (this.pubParent)
|
|
4521
4531
|
this.pubParent.$emit('click:item', e);
|
|
@@ -4787,8 +4797,15 @@ script$10.__file = "src/widgets/Button.vue";
|
|
|
4787
4797
|
|
|
4788
4798
|
let inst = null;
|
|
4789
4799
|
|
|
4800
|
+
function closeMenu() {
|
|
4801
|
+
if (inst) {
|
|
4802
|
+
$$1.close(inst);
|
|
4803
|
+
inst = null;
|
|
4804
|
+
}
|
|
4805
|
+
}
|
|
4806
|
+
|
|
4790
4807
|
function menuRelate(ctx) {
|
|
4791
|
-
return inst
|
|
4808
|
+
return inst && (ctx.hasBubble(inst.context) || inst.hasBubble(ctx))
|
|
4792
4809
|
}
|
|
4793
4810
|
|
|
4794
4811
|
var script$$ = {
|
|
@@ -4827,7 +4844,6 @@ let inst = null;
|
|
|
4827
4844
|
// implement
|
|
4828
4845
|
setVisibleSub(a) {
|
|
4829
4846
|
if (a === false && this.currentMenuButton) {
|
|
4830
|
-
console.log('setVisibleSub');
|
|
4831
4847
|
this.currentMenuButton.showDrop = false;
|
|
4832
4848
|
// this.subMenu.setVisibleSub(a)
|
|
4833
4849
|
}
|
|
@@ -4916,12 +4932,12 @@ let inst = null;
|
|
|
4916
4932
|
}
|
|
4917
4933
|
},
|
|
4918
4934
|
mounted() {
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4935
|
+
if (!this.context || (this.context.$options && this.context.$options.name !== 'w-menubutton')) {
|
|
4936
|
+
if (inst && inst.context !== this.context) {
|
|
4937
|
+
$$1.close(inst);
|
|
4938
|
+
}
|
|
4939
|
+
inst = this;
|
|
4940
|
+
}
|
|
4925
4941
|
}
|
|
4926
4942
|
};
|
|
4927
4943
|
|