position.vue 1.8 KB

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