jmash-core-mp 0.1.32 → 0.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-core-mp",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "private": false,
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,12 +1,23 @@
1
+ /**
2
+ * 暂无数据组件
3
+ * @param {Number} props.imgTextGap - 图片与文本之间的间距 - 默认值为0
4
+ * @param {Number} props.marginTop - 上外边距 - 默认值为300rpx
5
+ * @param {Number} props.paddingTop - 上内边距 - 默认值为0
6
+ * @param {String} props.content - 文本内容 - 默认值为暂无数据
7
+ * @param {String} props.contentColor - 文本颜色 - 默认值为#b6b6b6
8
+ * @param {String} props.imgWidth - 图片的宽 - 默认值为auto
9
+ * @param {String} props.imgHeight - 图片的高 - 默认值为125px
10
+ * @param {String} props.imgUrl - 图片的路径 - 默认值为/components/contacts_nomore2x.png
11
+ */
1
12
  <template>
2
13
  <view class="auth-none-data" style="margin-top: {{ marginTop }}rpx; padding-top: {{ paddingTop }}rpx;">
3
- <image src="{{ resourceUrl + imgUrl }}" mode="heightFix" style="width: {{ imgWidth }};height: {{ imgHeight }};" />
14
+ <image wx:if="{{ imgUrl }}" src="{{ resourceUrl + imgUrl }}" mode="heightFix"
15
+ style="width: {{ imgWidth }};height: {{ imgHeight }};" />
4
16
  <view class="holder-text" style="color: {{ contentColor }};margin-top: {{ imgTextGap }}rpx;">{{ content }}</view>
5
17
  </view>
6
18
  </template>
7
19
  <script lang="ts">
8
- import { createComponent } from "@mpxjs/core"
9
-
20
+ import { createComponent } from "@mpxjs/core";
10
21
 
11
22
  createComponent({
12
23
  properties: {
@@ -52,11 +63,12 @@ createComponent({
52
63
  },
53
64
  },
54
65
  setup() {
66
+ // 图片路径
55
67
  let config = getApp().globalData.config;
56
- let resourceUrl = config.resourceUrl + "/images/"
57
- return {
58
- resourceUrl
59
- }
68
+ // 图片路径
69
+ let resourceUrl = config.resourceUrl + "/images/";
70
+
71
+ return { resourceUrl }
60
72
  }
61
73
  })
62
74
  </script>