123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <template>
- <view class="income-main">
- <view class="income-header card-box">
- <text class="income-title" @click="onShow">
- 2025年4月
- </text>
- <view class="income-header-right">
- <text>收入:1212</text>
- <text>支出:233</text>
- </view>
- </view>
- <view class="card-box icome-item" v-for="item in list" :key="item.code">
- <view class="card-left">
- <img :src="baseUrl" alt="" class="income-img">
- <view class="card-left-text">
- <view class="card-left-name">{{ item.name }}</view>
- <view class="card-left-date">{{ item.date }}</view>
- </view>
- </view>
- <view class="card-rigth">
- {{ item.price }}
- </view>
- </view>
- <up-picker :show="show" ref="uPickerRef" :columns="columns" @confirm="confirm"
- @change="changeHandler"></up-picker>
- </view>
- </template>
- <script setup>
- import { ref, reactive } from 'vue';
- import config from '@/config'
- const baseUrl = config.baseUrl
- const list = ref([
- {
- name: '交易提现-到银行卡',
- date: '2022-03-20 20:00',
- code: '88888888888888888',
- price: '+1212'
- },
- {
- name: '交易提现-到银行卡',
- date: '2022-03-20 20:00',
- code: '343434343434',
- price: '-1212'
- }
- ])
- const show = ref(false);
- const columns = reactive([
- ['中国', '美国'],
- ['深圳', '厦门', '上海', '拉萨']
- ]);
- const columnData = reactive([
- ['深圳', '厦门', '上海', '拉萨'],
- ['得州', '华盛顿', '纽约', '阿拉斯加']
- ]);
- const uPickerRef = ref(null)
- const changeHandler = (e) => {
- const {
- columnIndex,
- value,
- values,
- index,
- } = e;
- if (columnIndex === 0) {
- uPickerRef.value.setColumnValues(1, columnData[index]);
- }
- };
- const onShow = () => {
- show.value = true;
- };
- const confirm = (e) => {
- console.log('confirm', e);
- show.value = false;
- };
- </script>
- <style lang="scss" scoped>
- .card-box {
- border-radius: 8px;
- background: rgba(255, 255, 255, 1);
- padding: 12px;
- margin-bottom: 12px;
- }
- .income-main {
- position: fixed;
- top: 0px;
- left: 0px;
- right: 0px;
- bottom: 0px;
- background: rgba(245, 245, 245, 1);
- padding: 12px;
- overflow: auto;
- .income-title {
- font-size: 16px;
- font-weight: 500;
- line-height: 23.17px;
- color: rgba(0, 0, 0, 1);
- }
- .income-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .income-header-right {
- font-size: 14px;
- font-weight: 500;
- line-height: 20.27px;
- color: rgba(0, 0, 0, 1);
- display: flex;
- align-items: flex-start;
- flex-direction: column;
- justify-content: center;
- }
- }
- }
- .icome-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .card-left {
- display: flex;
- align-items: center;
- .income-img {
- width: 40px;
- height: 40px;
- }
- .card-left-text {
- margin-left: 12px;
- .card-left-name {
- font-size: 16px;
- font-weight: 700;
- line-height: 23.17px;
- color: rgba(0, 0, 0, 1);
- margin-bottom: 6px;
- }
- .card-left-date {
- font-size: 14px;
- font-weight: 500;
- line-height: 16.41px;
- color: rgba(153, 153, 153, 1);
- }
-
- }
- .card-rigth {
- font-size: 20px;
- font-weight: 700;
- line-height: 23.44px;
- color: rgba(51, 51, 51, 1);
- }
- }
- }
- </style>
|