Ver Fonte

空状态

zhaoxiaohai há 3 anos atrás
pai
commit
1353153ccc

+ 38 - 0
components/My_empty/index.js

@@ -0,0 +1,38 @@
+// components/My_empty/index.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        text: {
+            type: String,
+            value: "暂无数据"
+        },
+        marTop: {
+            type: String,
+            value: "150rpx"
+        },
+        icon: {
+            type: String,
+            value: 'icon-zanwushuju'
+        }
+    },
+
+    options: {
+        addGlobalClass: true
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
components/My_empty/index.json

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

+ 9 - 0
components/My_empty/index.scss

@@ -0,0 +1,9 @@
+.empty {
+    width: 100vw;
+    text-align: center;
+    color: #BBBBBB;
+
+    .iconfont {
+        font-size: 150rpx;
+    }
+}

+ 4 - 0
components/My_empty/index.wxml

@@ -0,0 +1,4 @@
+<view class="empty" style="margin-top: {{marTop}};">
+    <view class="iconfont {{icon}}"></view>
+    <view style="margin-top: 20rpx;">{{text}}</view>
+</view>