123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <template>
- <uni-popup ref="popupRef" type="bottom">
- <view class="popup-box">
- <view class="title-box">
- <text class="title-name">选择币种</text>
- <image class="title-close" src="../../../static/logo.png" mode="aspectFit"></image>
- </view>
- <view class="content-box">
- <view class="search-box">
- <input class="search-input" placeholder-class="search-input-placeholder" placeholder="搜索您要的币种" />
- <image class="search-icon" src="../../../static/logo.png" mode="aspectFit"></image>
- </view>
- <scroll-view scroll-y class="scroll-view-list">
- <view class="content-item" v-for="(item , index) in selectList" @click.stop="selectItem(item)" :key="`content_${index}`">
- <image class="item-icon" :src="item.logo" mode="aspectFit"></image>
- <text class="item-text hide_1">{{item.name}}</text>
- </view>
- </scroll-view>
- </view>
- </view>
- </uni-popup>
- </template>
- <script>
- export default {
- name: "exchangeSelectCoin",
- props: {
- activeVal:{
- type:Object,
- default: () => {
- return {}
- }
- },
- selectList: {
- type: Array,
- default: () => []
- }
- },
- data() {
- return {
- contentList: [{
- icon: require('../../../static/icon/icon_01.png'),
- name: 'BTC'
- }, {
- icon: require('../../../static/icon/icon_02.png'),
- name: 'FIL'
- }, {
- icon: require('../../../static/icon/icon_03.png'),
- name: 'ETH'
- }, {
- icon: require('../../../static/icon/icon_04.png'),
- name: 'SHIB'
- }]
- };
- },
- mounted() {
- // this.$refs.popupRef.open()
- },
- methods: {
- open() {
- this.$nextTick(() => {
- this.$refs.popupRef.open();
- })
- },
- close() {
- this.$refs.popupRef.close();
- },
- selectItem(item){
- this.$emit('update:activeVal', item);
- this.close();
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .popup-box {
- width: 100%;
- border-radius: 50rpx 50rpx 0px 0px;
- background-color: #fff;
- .scroll-view-list{
- width: 100%;
- height: 35vh;
- }
- .title-box {
- width: 100%;
- height: 113rpx;
- border-radius: 50rpx 50rpx 0px 0px;
- background-color: #F7F7F7 !important;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 $pages-padding;
- .title-name {
- font-size: 34rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- text-align: center;
- color: #1a1a1a;
- line-height: 48rpx;
- }
- .title-close {
- width: 25rpx;
- height: 25rpx;
- // background-color: #666666;
- }
- }
- .content-box {
- width: 100%;
- padding: 0 $pages-padding 20rpx;
- .search-box {
- margin: 30rpx 0 20rpx;
- width: 100%;
- height: 60rpx;
- display: flex;
- align-items: center;
- background-color: #dbdce0;
- border-radius: 30rpx;
- padding: 0 30rpx;
- // <view class="search-box">
- // <input class="search-input" placeholder-class="search-input-placeholder" placeholder="请输入密码"/>
- // <image class="search-icon" src="../../../static/logo.png" mode="aspectFit"></image>
- // </view>
- .search-input {
- flex: 1;
- height: 100%;
- }
- .search-input,
- .search-input-placeholder {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- text-align: left;
- color: #333333;
- }
- .search-icon {
- width: 38rpx;
- height: 38rpx;
- flex-shrink: 0;
- }
- }
- .content-item {
- width: 100%;
- height: 66rpx;
- display: flex;
- align-items: center;
- .item-icon {
- width: 46rpx;
- height: 46rpx;
- flex-shrink: 0;
- }
- .item-text {
- font-size: 26rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- text-align: left;
- color: #343434;
- line-height: 37rpx;
- padding-left: 14rpx;
- }
- }
- }
- }
- </style>
|