手册版本 V3.0
结构说明
不适合封装组件故使用样式来实现 :
<view class="grace-grids">
<!-- 图片 -->
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/1.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<!-- 图标 -->
<view class="grace-grids-items">
<text class="grace-grids-icon grace-icons icon-wifi"></text>
<text class="grace-grids-text">wifi</text>
</view>
</view>
演示代码
UNI 普通版本
NVUE 版本
微信小程序独立版本
<template>
<gracePage :customHeader="false">
<!-- 页面主体 -->
<view slot="gBody" class="grace-body">
<view class="grace-title grace-margin-top">
<view class="grace-title-border"></view>
<text class="grace-title-text grace-blue">五格图片</text>
<text class="grace-text-small grace-gray">grace.hcoder.net</text>
</view>
<view class="grace-grids grace-margin-top five">
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/1.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/1.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
</view>
<view class="grace-title grace-margin-top">
<view class="grace-title-border"></view>
<text class="grace-title-text grace-blue">四格图标 + 边框</text>
<text class="grace-text-small grace-gray">grace.hcoder.net</text>
</view>
<view class="grace-grids demoForIcon grace-margin-top grids-border-wrap">
<view class="grace-grids-items grids-border-item grace-relative">
<text class="grace-grids-icon grace-icons icon-wifi"></text>
<text class="grace-grids-text">wifi</text>
<view class="grace-badge grace-bg-red grace-badge-absolute grace-white" style="top:15rpx; right:15rpx;">8</view>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons icon-weibo"></text>
<text class="grace-grids-text">微博</text>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons icon-weixin"></text>
<text class="grace-grids-text">微信</text>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons icon-qq"></text>
<text class="grace-grids-text">QQ</text>
</view>
</view>
</view>
</gracePage>
</template>
<script>
import gracePage from "../../graceUI/components/gracePage.vue";
import graceFlex from "../../graceUI/components/graceFlex.vue";
export default {
data() {
return {}
},
onLoad:function(){},
components:{
gracePage, graceFlex
}
}
</script>
<style>
/* 演示了如何修改组件宽度 */
.five > .grace-grids-items{width:140rpx;}
.grids-border-wrap{border-top:1px solid #F1F2F3; border-left:1px solid #F1F2F3;}
.grids-border-item{border-bottom:1px solid #F1F2F3; border-right:1px solid #F1F2F3;}
</style>
<template>
<gracePage :customHeader="false">
<!-- 页面主体 -->
<view slot="gBody" class="grace-body">
<view class="grace-title grace-margin-top">
<view class="grace-title-border"></view>
<text class="grace-title-text grace-blue">五格图片</text>
<text class="grace-text-small grace-gray">grace.hcoder.net</text>
</view>
<view class="grace-grids grace-margin-top">
<view class="grace-grids-items five">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/1.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items five">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items five">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/1.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items five">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items five">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
</view>
<view class="grace-title grace-margin-top">
<view class="grace-title-border"></view>
<text class="grace-title-text grace-blue">四格图标 + 边框</text>
<text class="grace-text-small grace-gray">grace.hcoder.net</text>
</view>
<view class="grace-grids grids-border-wrap demoForIcon grace-margin-top">
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons"></text>
<text class="grace-grids-text">wifi</text>
<text class="grace-badge grace-bg-red grace-badge-absolute grace-white" style="width:36rpx; top:15rpx; right:15rpx;">8</text>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons"></text>
<text class="grace-grids-text">微博</text>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons"></text>
<text class="grace-grids-text">微信</text>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons"></text>
<text class="grace-grids-text">QQ</text>
</view>
</view>
</view>
</gracePage>
</template>
<script>
import gracePage from "../../graceUI/weexComponents/gracePage.nvue";
import graceFlex from "../../graceUI/weexComponents/graceFlex.nvue";
export default {
data() {
return {}
},
onLoad:function(){},
components:{
gracePage, graceFlex
}
}
</script>
<style>
/* 演示了如何修改组件宽度 */
.five{width:140rpx;}
.grids-border-wrap{border-top-width:1px; border-left-width:1px; border-style:solid; border-color:#F1F2F3;}
.grids-border-item{border-bottom-width:1px; border-right-width:1px; border-style:solid; border-color:#F1F2F3;}
</style>
.wxml
<gracePage customHeader="{{false}}">
<!-- 页面主体 -->
<view slot="gBody" class="grace-body">
<view class="grace-title grace-margin-top">
<view class="grace-title-border"></view>
<text class="grace-title-text grace-blue">五格图片</text>
<text class="grace-text-small grace-gray">grace.hcoder.net</text>
</view>
<view class="grace-grids grace-margin-top five">
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/1.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/1.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
<view class="grace-grids-items">
<image class="grace-grids-icon-img" src="https://graceui.oss-cn-beijing.aliyuncs.com/faces/2.png" mode="widthFix"></image>
<text class="grace-grids-text">文字</text>
</view>
</view>
<view class="grace-title grace-margin-top">
<view class="grace-title-border"></view>
<text class="grace-title-text grace-blue">四格图标 + 边框</text>
<text class="grace-text-small grace-gray">grace.hcoder.net</text>
</view>
<view class="grace-grids demoForIcon grace-margin-top grids-border-wrap">
<view class="grace-grids-items grids-border-item grace-relative">
<text class="grace-grids-icon grace-icons icon-wifi"></text>
<text class="grace-grids-text">wifi</text>
<view class="grace-badge grace-bg-red grace-badge-absolute grace-white" style="top:15rpx; right:15rpx;">8</view>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons icon-weibo"></text>
<text class="grace-grids-text">微博</text>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons icon-weixin"></text>
<text class="grace-grids-text">微信</text>
</view>
<view class="grace-grids-items grids-border-item">
<text class="grace-grids-icon grace-icons icon-qq"></text>
<text class="grace-grids-text">QQ</text>
</view>
</view>
</view>
</gracePage>.wxss
/* 演示如何修改组件宽度 */
.five > .grace-grids-items{width:140rpx;}
.grids-border-wrap{border-top:1px solid #F1F2F3; border-left:1px solid #F1F2F3;}
.grids-border-item{border-bottom:1px solid #F1F2F3; border-right:1px solid #F1F2F3;}