提交
This commit is contained in:
97
pages/component/commonComponents/goodsNav.vue
Normal file
97
pages/component/commonComponents/goodsNav.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<view class="goods_nav">
|
||||
<view class="left">
|
||||
<view v-for="(v,i) in iconList" class="icon_item" v-if="iconList.length>0">
|
||||
<u-icon :name="v.icon" :color="v.infoColor" size="22" v-if="v.iconType" style="margin:0 auto"
|
||||
@click="clickIcon(v)"></u-icon>
|
||||
|
||||
<uni-icons :type="v.icon" size="22" :color="v.infoColor" style="margin:0 auto" v-else> </uni-icons>
|
||||
<view :style="`color:${v.infoColor};`">{{ v.text }}</view>
|
||||
</view>
|
||||
<slot name="leftSlot"></slot>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="button" v-for="(v,i) in customButton"
|
||||
:style="`background:${v.backgroundColor} !important;color:${v.color};width:${v.width}`"
|
||||
@click="submit(v)">
|
||||
{{ v.text }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<slot name="bottomSlot"></slot>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
export default {
|
||||
props: ['iconList', 'customButton'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
methods: {
|
||||
submit(v) {
|
||||
this.$emit('submit', v)
|
||||
},
|
||||
clickIcon(v) {
|
||||
this.$emit('clickIcon', v)
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.goods_nav {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
padding: 20rpx 30rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
height: 100%;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.richDetail {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.button {
|
||||
float: right;
|
||||
width: 240rpx;
|
||||
border-radius: 100rpx;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(90deg, rgb(254, 96, 53), rgb(239, 18, 36));
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.icon_item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
@@ -24,7 +24,7 @@
|
||||
<u-empty v-else-if="noDataIcon && isLoadingHide" :mode="noDataIcon"
|
||||
:icon="`http://cdn.uviewui.com/uview/empty/${noDataIcon}.png`">
|
||||
</u-empty>
|
||||
<u-divider style="width: 100%;" v-else-if="!isOrderList" text="暂无数据"></u-divider>
|
||||
<text class="null_text" v-else-if="!isOrderList">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -126,4 +126,12 @@
|
||||
.list_item:last-child {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
.null_text{
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding-top: 150rpx;
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user