CodePartail.cshtml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. 
  2. @model CodePartailModel
  3. <div class="tab-pane @(Model.IsActive ? "active" : "")" id="tab_@(Model.Index)">
  4. <div class="portlet box grey">
  5. <div class="portlet-title">
  6. <div class="caption">示例代码</div>
  7. <div class="tools">
  8. <a class="copybtn icon-copy white" data-clipboard-acetarget="code_@(Model.Index)"></a>
  9. </div>
  10. </div>
  11. <div class="portlet-body">
  12. <div id="code_@(Model.Index)" class="aceEditor ace_editor ace-tm">@(Model.Code())</div>
  13. </div>
  14. @if (Model.ShowTestButtons)
  15. {
  16. <div class="portlet-body">
  17. <button class="btn blue btn-block" onclick="sendDemoCode(this, '@Model.Api');">发送测试代码</button>
  18. </div>
  19. <div class="portlet-body apiresult">
  20. <div class="portlet-title">
  21. <div class="caption">测试结果</div>
  22. </div>
  23. <div class="portlet-body">
  24. <div class="search-result">
  25. </div>
  26. </div>
  27. </div>
  28. }
  29. </div>
  30. </div>