提交 f7e22721 编写于 作者: KK's avatar KK

抽屉调整

上级 04afc9c5
<template>
<div >
<ion-menu
<div :id="uuid"></div>
<ibiz-drawer
:content-id="uuid"
:ref="this.uuid+'drawer'"
@ionWillClose="close"
@dropClick="close"
:myObject="myObject"
@confirmToClose="confirmToClose"
:close-view="closeView"
@on-visible-change="onVisibleChange($event)">
<component
:is="viewname"
......@@ -16,7 +20,8 @@
@close="close($event)"
:ref="viewname">
</component>
</ion-menu>
</ibiz-drawer>
</div>
</template>
......@@ -28,7 +33,6 @@ import { Subject } from "rxjs";
})
export default class AppDrawerCompponent extends Vue {
/**
* 视图UI参数
*
......@@ -37,6 +41,15 @@ export default class AppDrawerCompponent extends Vue {
*/
@Prop() public view!: any;
/**
* 是否关闭view
*
* @type {any}
* @memberof AppDrawerCompponent
*/
public closeView = false;
/**
* 视图上下文
*
......@@ -53,10 +66,6 @@ export default class AppDrawerCompponent extends Vue {
*/
@Prop() public uuid?: any;
public ionWillClose(value:any){
console.log(value);
}
/**
* 视图参数
*
......@@ -71,7 +80,7 @@ export default class AppDrawerCompponent extends Vue {
* @type {(null | Subject<any>)}
* @memberof AppDrawerCompponent
*/
public subject: null | Subject<any> = new Subject<any>();
public subject: Subject<any> = new Subject<any>();
/**
......@@ -82,8 +91,6 @@ export default class AppDrawerCompponent extends Vue {
*/
public placement: string = '';
/**
* 是否显示
*
......@@ -166,7 +173,7 @@ export default class AppDrawerCompponent extends Vue {
}
}
}
/**
* Vue生命周期mounted
*
......@@ -221,8 +228,8 @@ export default class AppDrawerCompponent extends Vue {
Object.assign(this.tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) });
}
this.isShow = false;
// (this.$refs.drawer as any).dismiss();
this.onVisibleChange(true);
}
/**
......@@ -267,15 +274,16 @@ export default class AppDrawerCompponent extends Vue {
this.$store.commit('viewaction/setViewDataChange', { viewtag: _viewtag, viewdatachange: false });
this.isShow = false;
this.handleShowState($event);
this.closeView = true;
} else {
this.closeView = false;
this.isShow = true;
let drawer :any = this.$refs[this.uuid+'drawer'];
if(drawer){
const re = drawer.toggle(true);
}
}
}else{
this.handleShowState($event);
this.closeView = true;
}
}
}
......@@ -289,17 +297,15 @@ export default class AppDrawerCompponent extends Vue {
if (!$event) {
return;
}
if (this.subject) {
if (this.subject && this.subject!=null) {
if (this.tempResult && Object.is(this.tempResult.ret, 'OK')) {
}
setTimeout(() => {
this.subject.next(this.tempResult);
}, 500)
}
// setTimeout(() => {
// // document.body.removeChild(this.$el);
// this.$destroy();
// this.subject = null;
// }, 500)
}
}
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册