提交 20def4fe 编写于 作者: tony001's avatar tony001

调整状态向导面板 --- fix8

上级 acadbcd9
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<template> <template>
<layout class="app-wizard"> <layout class="app-wizard">
<#if ctrl.getPSDEWizard?? && ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardSteps?? && ctrl.getPSDEWizard().getPSDEWizardSteps()??> <#if ctrl.getPSDEWizard?? && ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardSteps?? && ctrl.getPSDEWizard().getPSDEWizardSteps()??>
<el-steps class="wizard-steps" :active="wizardForms.indexOf(activeForm)" finish-status="success"> <el-steps class="wizard-steps" :active="(wizardForms.indexOf(activeForm) + 1)" finish-status="success">
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step> <#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
<el-step> <el-step :class="{'app-active-step':activeForm==='<@getStepForm ctrlmodel=ctrl step=step />'?true:false}">
<template v-slot:title> <template v-slot:title>
<div v-popover:<@getStepForm ctrlmodel=ctrl step=step />_popover @click="hanleClick('<@getStepForm ctrlmodel=ctrl step=step />')">${step.getTitle()}</div> <div v-popover:<@getStepForm ctrlmodel=ctrl step=step />_popover @click="hanleClick('<@getStepForm ctrlmodel=ctrl step=step />')">${step.getTitle()}</div>
</template> </template>
...@@ -383,10 +383,10 @@ ...@@ -383,10 +383,10 @@
} }
this.setPopVisiable(name,false); this.setPopVisiable(name,false);
if (this.getNextForm(name)) { if (this.getNextForm(name)) {
let nextForm:any = this.getNextForm(name); this.activeForm = this.getNextForm(name);
this.setPopVisiable(nextForm,true); this.setPopVisiable(this.activeForm,true);
setTimeout(() => { setTimeout(() => {
this.formLoad(nextForm); this.formLoad(this.activeForm);
}, 1); }, 1);
} else { } else {
this.doFinish(); this.doFinish();
...@@ -469,7 +469,7 @@ ...@@ -469,7 +469,7 @@
const length = this.historyForms.length; const length = this.historyForms.length;
if(length > 1) { if(length > 1) {
this.curState = 'PREV'; this.curState = 'PREV';
let curIndex:number = this.historyForms.indexOf(name); let curIndex:number = this.wizardForms.indexOf(name);
this.setPopVisiable(name,false); this.setPopVisiable(name,false);
setTimeout(() => { setTimeout(() => {
this.setPopVisiable(this.historyForms[curIndex - 1],true); this.setPopVisiable(this.historyForms[curIndex - 1],true);
...@@ -523,7 +523,7 @@ ...@@ -523,7 +523,7 @@
*/ */
public isVisiable(name:string,type: string) { public isVisiable(name:string,type: string) {
const actions: Array<string> = this.stepActions[name]; const actions: Array<string> = this.stepActions[name];
if(actions && actions.indexOf(type) !== -1) { if(actions && actions.indexOf(type) !== -1 && Object.is(name,this.activeForm)) {
return true; return true;
}else{ }else{
return false; return false;
......
...@@ -21,6 +21,16 @@ ...@@ -21,6 +21,16 @@
.el-step__title:hover{ .el-step__title:hover{
cursor: pointer; cursor: pointer;
} }
.app-active-step{
.el-icon-check:before {
content: "";
width: 12px;
height: 12px;
border-radius: 8px;
background-color: #1890ff;
display: block;
}
}
} }
} }
.app-wizard-popover-container{ .app-wizard-popover-container{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册