Browse Source

no message

feature/v1.0
xpz2018 5 years ago
parent
commit
a6dbcb2a36
5 changed files with 1 additions and 41 deletions
  1. 20
      components/empty/index.js
  2. 4
      components/empty/index.json
  3. 15
      components/empty/index.wxml
  4. 1
      components/empty/index.wxss
  5. 2
      pages/message/index/index.wxml

20
components/empty/index.js

@ -1,20 +0,0 @@
import { VantComponent } from '../common/component';
const PRESETS = ['error', 'search', 'default', 'network'];
VantComponent({
props: {
description: String,
image: {
type: String,
value: 'default',
},
},
created() {
if (PRESETS.indexOf(this.data.image) !== -1) {
this.setData({
imageUrl: `https://img.yzcdn.cn/vant/empty-image-${this.data.image}.png`,
});
} else {
this.setData({ imageUrl: this.data.image });
}
},
});

4
components/empty/index.json

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

15
components/empty/index.wxml

@ -1,15 +0,0 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<view class=" custom-class van-empty">
<view class="van-empty__image">
<image wx:if="{{ imageUrl }}"
class="van-empty__image__img"
src="{{ imageUrl }}" />
</view>
<p class="van-empty__description">
{{ description }}
</p>
<view class="van-empty__bottom">
<slot></slot>
</view>
</view>

1
components/empty/index.wxss

@ -1 +0,0 @@
@import '../common/index.wxss';.van-empty{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:32px 0}.van-empty__image{width:160px;height:160px}.van-empty__image__img{width:100%;height:100%}.van-empty__description{margin-top:16px;padding:0 60px;color:#969799;font-size:14px;line-height:20px}.van-empty__bottom{margin-top:24px}

2
pages/message/index/index.wxml

@ -1,7 +1,7 @@
<!--pages/mall/index/index.wxml--> <!--pages/mall/index/index.wxml-->
<cu-custom bgColor="bg-white"> <cu-custom bgColor="bg-white">
<view slot="right" class="text-cut text-black text-xl margin-l" wx:if="{{userInfo.enterpriseName}}">{{userInfo.enterpriseName}}</view> <view slot="right" class="text-cut text-black text-xl margin-l" wx:if="{{userInfo.enterpriseName}}">{{userInfo.enterpriseName}}</view>
<view slot="content" style="color:black;font-size:36rpx" wx:else>原纸商场</view>
<view slot="content" style="color:black;font-size:36rpx" wx:else>消息</view>
</cu-custom> </cu-custom>
<view class="bg-white" style="height:90rpx;" wx:if="{{tabList.length}}"> <view class="bg-white" style="height:90rpx;" wx:if="{{tabList.length}}">

Loading…
Cancel
Save