easyui의 DataGrid 셀에 ProgressBar 진행률 막대 추가
2328 단어 ProgressBar
<div id="p" class="easyui-progressbar" style="width:400px;"></div>
이것을 통해 페이지의 실제 코드를 관찰할 수 있다
<div id="p" class="easyui-progressbar progressbar" style="width: 118px; height: 20px;" value="90" text="90%">
<div class="progressbar-text" style="width: 118px; height: 20px; line-height: 20px;">90%</div>
<div class="progressbar-value" style="width: 90%; height: 20px; line-height: 20px;">
<div class="progressbar-text" style="width: 118px; height: 20px; line-height: 20px;">90%</div>
</div>
</div>
데이터grid에서 자신의 수치를 위의 90으로 바꾸면 됩니다
내가 여기에 페이지에 전달한 것은 수치이지 백분율이 아니다
{field: 'status', title: ' ', width: getWidth(0.12), align: 'center',
formatter: function (value, rec) {
//rec.status*100/4
var tempval=rec.status*100/4;
var htmlstr = '<div class="easyui-progressbar progressbar" style="width: 196px; height: 20px;" value="'+tempval +'" text="'+tempval+'%">'+
'<div class="progressbar-text" style="width: 196px; height: 20px; line-height: 20px;">'+tempval+'%</div>'+
'<div class="progressbar-value" style="width: '+tempval+'%; height: 20px; line-height: 20px;">'+
'<div class="progressbar-text" style="width: 196px; height: 20px; line-height: 20px;">'+tempval+'%</div>'+
'</div>'+
'</div>';
return htmlstr;
}
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Bootstrap4에서 진행률 막대 만들기프런트 엔드 프레임 워크로 Bootstrap을 사용해 보았으므로 메모 해 둡니다. 만든 코드는 아래와 같습니다. HTML 부분 처리를 객체로 합친다. ※ 외부 파일로 분리할 수 있도록 캡슐화 객체 스크립트 위의 객체...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.