123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <view class="common-list">
- <view class="common-list-box" v-for="(i,index) in data" :key="i.index" @click="toDtl(data[index])">
- <view class="text">
- <view class="text-list" v-for="(j,jndex) in config" :key="jndex">
- <span class="label">
- {{j.label}}
- </span>
- <span class="value">
- {{i[j.key]}}
- </span>
- </view>
- </view>
- <view class="more">
- <uni-icons type="forward" class="icon" size="30"></uni-icons>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default{
- name:"common-list",
- props:{
- config:{
- type:Array
- },
- data:{
- type:Array
- },
- },
- methods:{
- toDtl(i){
- this.$emit('listClick',i)
- },
- },
- }
- </script>
- <style lang="less">
- .common-list{
- .common-list-box{
- background-color: #fff;
- padding: 24rpx;
- margin-top: 6rpx;
- display: flex;
- justify-content: space-between;
- .text{
- .text-list{
- line-height: 60rpx;
- .label{
- color: #999999;
- }
- .value{
- color: #000;
- margin-left: 20rpx;
- }
- }
- }
- .more{
- display: flex;
- align-items: center;
- }
- }
- }
- </style>
|