Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

目前想实现根据后台传过来的值,修改对应的进度条,不知道如何实现,等大佬们帮助
想用angularjs写
代码如下:

 <dd class="project-people">
  {{p.__c679.statusName}}
    </dd>
 <div class="progress progress-striped active m-b-sm">
 <div id="progress" style="width: 20%;" class="progress-bar">
   </div>
   </div>    

dd中为我从后台取到的值,是一个字符串,
假设这个字符串有三个状态 : 生成中/出货中/已完成,
想将进度条更改为: 20%/60%/100%

求求了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
402 views
Welcome To Ask or Share your Answers For Others

1 Answer

<dd class="project-people">
  {{p.__c679.statusName}}
    </dd>
 <div class="progress progress-striped active m-b-sm">
 <div id="progress" :style="{width: mapStatus[p.__c679.statusName]}"
   </div>
   </div>    
   
   mapStatus = {
    生成中: 20%,
    出货中: 60%,
    已完成: 100%
   }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...