ModelTrain.wxml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!-- 数据种类选择标题 -->
  2. <view class="picker-title">数据集种类:</view>
  3. <!-- 数据种类选择下拉框 -->
  4. <picker mode="selector" range="{{types}}" range-key="name" bindchange="onTypeChange">
  5. <view class="picker-container">
  6. <view class="picker">
  7. {{currentType === 'all' ? '全部数据' : currentType}}
  8. </view>
  9. <view class="picker-arrow"></view> <!-- 三角形样式 -->
  10. </view>
  11. </picker>
  12. <!-- 滚动区域 -->
  13. <scroll-view class="table-container" scroll-x="true" scroll-with-animation="true">
  14. <!-- 数据加载中 -->
  15. <view wx:if="{{loading}}" class="loading">数据加载中,请稍候...</view>
  16. <!-- 无数据提示 -->
  17. <view wx:if="{{!loading && filteredRows.length === 0}}" class="no-data">暂无数据</view>
  18. <!-- 表格 -->
  19. <view class="table-body">
  20. <view class="table-header">
  21. <!-- 添加单选框 -->
  22. <view class="table-cell"></view>
  23. <view class="table-cell" wx:for="{{tableHeaders}}" wx:key="index">{{item}}</view>
  24. </view>
  25. <block wx:for="{{filteredRows}}" wx:key="index">
  26. <view class="table-row" bindtap="onRowClick" data-index="{{index}}">
  27. <!-- 单选框列 -->
  28. <view class="table-cell">
  29. <radio
  30. value="{{index}}" checked="{{currentRow && currentRow.index === index}}"
  31. class="{{currentRow && currentRow.index === index ? 'radio-checked' : 'radio-unchecked'}}"
  32. />
  33. </view>
  34. <!-- 数据列 -->
  35. <view class="table-cell">{{item.name}}</view>
  36. <view class="table-cell">{{item.description}}</view>
  37. <view class="table-cell">{{item.type}}</view>
  38. <view class="table-cell">{{item.count}}</view>
  39. <view class="table-cell">{{item.status}}</view>
  40. <view class="table-cell">{{item.uploadTime}}</view>
  41. </view>
  42. </block>
  43. </view>
  44. </scroll-view>
  45. <view class="button-container">
  46. <button bindtap="trainModel">训练</button>
  47. </view>