103 lines
1.7 KiB
Vue
103 lines
1.7 KiB
Vue
<template>
|
|
<view>
|
|
<view class="workbench-title">{{ title }}</view>
|
|
<view class="toolbar">
|
|
<u-grid class="grid" :col="3" :border="false">
|
|
<u-grid-item v-for="(item,index) in workbenchItems" v-bind:key="index" :index="index" @click="navTo(item.navTo)">
|
|
<view :class="item.viewClass">
|
|
<i :class="item.iconClass"></i>
|
|
</view>
|
|
<view class="grid-text">{{item.description}}</view>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "workbenchMenu",
|
|
props: {
|
|
//文字标题
|
|
title: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
//功能列表
|
|
workbenchItems: {
|
|
type: Array,
|
|
default: new Array()
|
|
}
|
|
},
|
|
data(){
|
|
return {
|
|
|
|
}
|
|
},
|
|
methods: {
|
|
navTo(url){
|
|
uni.navigateTo({
|
|
url: url.indexOf('/') == 0 ? url : '/' + url,
|
|
success(res) {
|
|
console.log('SUCCESS',res);
|
|
},
|
|
fail(error) {
|
|
console.log('ERROR',error);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import 'index.scss';
|
|
|
|
.banner-box {
|
|
padding: 0 2%;
|
|
width: 96%;
|
|
height: 170rpx;
|
|
margin: 30rpx 0 30rpx;
|
|
}
|
|
|
|
.u-swiper-wrap {
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.banner-pic {
|
|
width: 47%;
|
|
float: left;
|
|
display: inline-block;
|
|
margin: 0 1.5%;
|
|
}
|
|
|
|
.banner-pic image {
|
|
width: 100%;
|
|
height: 170rpx;
|
|
border-radius: 12rpx;
|
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.u-mode-light-info {
|
|
background-color: #ffffff;
|
|
color: #666666;
|
|
border: 1px solid #e9ecf6;
|
|
font-size: 12px;
|
|
padding: 2px 8px;
|
|
position: relative;
|
|
top: -3px;
|
|
}
|
|
|
|
.workbench-title {
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
color: #333333;
|
|
padding: 15px 30rpx;
|
|
}
|
|
|
|
.home-icon i.icon-tongzhi {
|
|
font-size: 22px;
|
|
}
|
|
</style>
|
|
|