setting-bi.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <uni-popup ref="popupRef" type="bottom">
  3. <view class="popup-box">
  4. <view class="popup-title">
  5. <text class="title-side"></text>
  6. <text class="title-name">选择账户</text>
  7. <text class="title-side iconfont">&#xe621;</text>
  8. </view>
  9. <view class="stocks-content">
  10. <block v-for="(item,index) in BiType">
  11. <view class="stocks-item" @click.stop="settingBiType(item)">
  12. <text class="stocks-text">{{ getBiName(item) }}账户</text>
  13. <text v-if="item === activeBiType" class="active-stocks iconfont">&#xe627;</text>
  14. </view>
  15. </block>
  16. </view>
  17. </view>
  18. </uni-popup>
  19. </template>
  20. <script>
  21. import {
  22. mapGetters
  23. } from 'vuex'
  24. import { biName } from "../card.js"
  25. export default {
  26. name: 'setting-color',
  27. props:{
  28. activeBiType:{
  29. type:String,
  30. default:''
  31. }
  32. },
  33. data() {
  34. return {
  35. BiType:[
  36. 'legal',
  37. 'lever',
  38. ]
  39. };
  40. },
  41. computed: {
  42. getBiName(){
  43. return function(key){
  44. return biName[key]
  45. }
  46. },
  47. },
  48. mounted() {
  49. // this.open()
  50. },
  51. methods: {
  52. open() {
  53. this.$nextTick(() => {
  54. this.$refs.popupRef.open();
  55. })
  56. },
  57. settingBiType(item){
  58. this.$emit('update:activeBiType' , item)
  59. this.$refs.popupRef.close();
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .popup-box {
  66. width: 100%;
  67. background-color: #Fff;
  68. border-radius: 50rpx 50rpx 0px 0px;
  69. .popup-title {
  70. width: 100%;
  71. height: 106rpx;
  72. border-radius: 50rpx 50rpx 0px 0px;
  73. background-color: #F7F7F7 !important;
  74. display: flex;
  75. justify-content: space-between;
  76. align-items: center;
  77. padding: 0 40rpx;
  78. font-weight: 700;
  79. .title-side {
  80. flex-shrink: 0;
  81. font-size: 28rpx;
  82. width: 40rpx;
  83. height: 100%;
  84. line-height: 106rpx;
  85. color: #666;
  86. font-weight: 400;
  87. }
  88. }
  89. // <view class="stocks-content">
  90. // <block v-for="(val,key,index) in stocksColorObj">
  91. // <view class="stocks-item">
  92. // <text class="stocks-text">{{ val }}</text>
  93. // <text v-if="stocksColor === key" class="active-stocks iconfont">&#xe627;</text>
  94. // </view>
  95. // </block>
  96. // </view>
  97. .stocks-content{
  98. width: 100%;
  99. background-color: #Fff;
  100. .stocks-item{
  101. width: 100%;
  102. height: 90rpx;
  103. display: flex;
  104. justify-content: space-between;
  105. align-items: center;
  106. padding: 0 $pages-padding 0 60rpx;
  107. border-bottom: 1rpx solid $border-color;
  108. font-size: 28rpx;
  109. }
  110. .active-stocks{
  111. color: $Theme-Color;
  112. }
  113. }
  114. }
  115. </style>