文件
xionggeshop/xgsc.gynhc.com_wx/pages/index/components/sh-cell.vue
2026-09-14 17:24:53 +08:00

67 行
1.4 KiB
Vue

<template>
<view class="sh-user-menu-box u-m-b-10">
<view class="menu-item u-flex u-row-between u-border-bottom" hover-stay-time="150" hover-class="u-cell-hover" v-for="(item, index) in displayList" :key="index" @tap="jump(item)">
<view class="menu-head u-flex u-col-center">
<image class="menu-img u-m-r-10" :src="item.image" mode=""></image>
<view class="menu-title ">{{ item.name }}</view>
</view>
<view class="u-iconfont uicon-arrow-right" style="color: #969799;font-size: 28rpx;"></view>
</view>
</view>
</template>
<script>
import { isHiddenTool } from '@/shopro/utils/hidden-tools';
/**
*shCell-功能列表
* @property {Array} list - 列表信息
*/
export default {
components: {},
data() {
return {};
},
props: {
list: {
type: Array,
default: () => {
return [];
}
}
},
computed: {
displayList() {
return (this.list || []).filter(item => !isHiddenTool(item));
}
},
methods: {
jump(data) {
if (isHiddenTool(data)) {
uni.showToast({ title: '功能已关闭', icon: 'none' });
return;
}
this.$tools.routerTo(data.path);
}
}
};
</script>
<style lang="scss" scoped>
.menu-item {
background-color: #fff;
width: 100%;
padding: 26rpx 32rpx;
font-size: 28rpx;
line-height: 54rpx;
.menu-img {
width: 36rpx;
height: 36rpx;
}
.menu-title {
font-size: 26rpx;
color: #999;
}
}
</style>