position copy.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view style="padding-bottom: 150rpx;">
  3. <u-subsection class="subsection" :list="list" :current="current" @change="sectionChange" height="100"
  4. button-color="#EBC384" active-color="red" inactive-color="#FFFFFF" bg-color="#36373F"></u-subsection>
  5. <view class="lists" v-for="(item, k) in 10" key=k"">
  6. <u-row gutter="16">
  7. <u-col span="6">
  8. <view class="custom">澳洲红酒</view>
  9. <view class="custom">2021-04-05 12:50:00</view>
  10. <view class="custom">2021-04-05 12:50:00</view>
  11. </u-col>
  12. <u-col span="6" style="text-align: right;">
  13. <view>
  14. <u-row gutter="16">
  15. <u-col span="4">
  16. <u-image width="50rpx" height="50rpx" src="/static/index/down.png"
  17. style="float: right;"></u-image>
  18. </u-col>
  19. <u-col span="8" class="upturn" style="text-align: right;">
  20. <text>买跌(¥100)</text>
  21. </u-col>
  22. </u-row>
  23. </view>
  24. <view style="font-size: 50rpx; font-weight: bold;">0</view>
  25. <view>0.9078976976786</view>
  26. </u-col>
  27. </u-row>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. name: "position",
  34. data() {
  35. return {
  36. list: [{
  37. name: '持仓明细'
  38. },
  39. {
  40. name: '历史明细'
  41. }
  42. ],
  43. current: 0
  44. };
  45. },
  46. methods: {
  47. sectionChange(index) {
  48. this.current = index;
  49. console.log(index);
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. .subsection {
  56. margin: 100rpx 50rpx 40rpx 40rpx;
  57. border-radius: 20rpx;
  58. }
  59. .lists {
  60. color: #FFFFFF;
  61. margin: 20rpx 40rpx;
  62. padding: 20rpx;
  63. border-radius: 20rpx;
  64. // background-color: #36373F;
  65. background: linear-gradient(275deg, rgba(45, 45, 53, 0.1) 0%, #505058 100%);
  66. }
  67. .custom {
  68. margin: 10rpx 0rpx;
  69. }
  70. .upturn {
  71. color: red;
  72. font-weight: bold;
  73. }
  74. </style>