提交 7dd09e28 编写于 作者: Neuromancer255's avatar Neuromancer255

多数据控件关闭滑动项逻辑调整

上级 af5002e2
...@@ -456,7 +456,7 @@ ...@@ -456,7 +456,7 @@
if (response && response.status === 200 && response.data.records) { if (response && response.status === 200 && response.data.records) {
this.$notice.success((this.$t('app.message.deleteSccess') as string)); this.$notice.success((this.$t('app.message.deleteSccess') as string));
this.load(); this.load();
this.closeSliding(); this.closeSlidings();
resolve(response); resolve(response);
} else { } else {
this.$notice.error(response.message?response.message:"删除失败"); this.$notice.error(response.message?response.message:"删除失败");
...@@ -837,12 +837,7 @@ ...@@ -837,12 +837,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public activated() { public activated() {
this.items.forEach((item:any)=>{ this.closeSlidings()
let curr:any = this.$refs[item.srfkey];
if (curr && curr[0]) {
curr[0].close();
}
})
} }
/** /**
...@@ -873,9 +868,19 @@ ...@@ -873,9 +868,19 @@
} }
</#list> </#list>
</#if> </#if>
let curr :any = this.$refs[item.srfkey]; this.closeSlidings();
if (curr && curr[0]) { }
curr[0].closeOpened();
/**
* 关闭列表项左滑右滑
* @memberof ${srfclassname('${ctrl.name}')}
*/
public closeSlidings () {
let slidings:any = this.$refs.sliding;
if (slidings) {
slidings.forEach((sliding:any) => {
sliding.close()
})
} }
} }
...@@ -947,22 +952,6 @@ ...@@ -947,22 +952,6 @@
* @memberof ${srfclassname('${ctrl.name}')} * @memberof ${srfclassname('${ctrl.name}')}
*/ */
public selectAllIschecked = false; public selectAllIschecked = false;
/**
* 关闭滑动项
*
* @memberof Mdctrl
*/
public closeSliding(){
let sliding :any = this.$refs.sliding;
if(sliding){
sliding.forEach((item:any) => {
item.closeOpened();
});
}
}
<#macro getAction item actionName> <#macro getAction item actionName>
<#t> <#t>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册