@xtdev/xt-miniprogram-ui 1.0.19 → 1.0.21

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.
@@ -45,6 +45,7 @@
45
45
  | 参数 | 说明 | 类型 |
46
46
  | ----------- | ----------- | ---------- |
47
47
  | item | 卡片内容 | `ItemProps` |
48
+ | headerSlot | 卡片顶部插槽 | `slot` |
48
49
  | contentSlot | 卡片底部插槽 | `slot` |
49
50
 
50
51
  #### ItemProps
@@ -1,25 +1,27 @@
1
1
  Component({
2
2
  options: {
3
- multipleSlots: true
3
+ multipleSlots: true,
4
4
  },
5
5
  properties: {
6
6
  contentSlot: {
7
7
  type: Boolean,
8
- value: false
8
+ value: false,
9
+ },
10
+ headerSlot: {
11
+ type: Boolean,
12
+ value: false,
9
13
  },
10
14
  item: {
11
15
  type: Object,
12
- value: false
13
- }
16
+ value: false,
17
+ },
14
18
  },
15
19
 
16
20
  /**
17
21
  * 组件的初始数据
18
22
  */
19
- data: {
20
- },
21
- attached: function () {
22
- },
23
+ data: {},
24
+ attached: function () {},
23
25
 
24
26
  /**
25
27
  * 组件的方法列表
@@ -30,12 +32,12 @@ Component({
30
32
  wx.makePhoneCall({
31
33
  phoneNumber: tel, // 这里是电话号码[假的]可以调用自己的数据this.data.xxx
32
34
  success: function () {
33
- console.log('拨打电话成功!');
35
+ console.log("拨打电话成功!");
34
36
  },
35
37
  fail: function () {
36
- console.log('拨打电话失败!');
37
- }
38
+ console.log("拨打电话失败!");
39
+ },
38
40
  });
39
- }
40
- }
41
+ },
42
+ },
41
43
  });
@@ -1,20 +1,20 @@
1
1
  <view class="list-item">
2
- <!-- 列表标题 -->
3
- <view class="head">
4
- <!-- 标题 -->
2
+ <slot wx:if="{{headerSlot}}" name="header"></slot>
3
+ <view wx:else class="head">
5
4
  <view class="flex-between ac">
6
5
  <view class="ft20 c000 bold title-width">{{item.title}}</view>
7
- <view class="sub-title" style="color: {{item.subTitleColor}};">{{item.subTitle}}</view>
6
+ <view wx:if="{{item.subTitle}}" class="sub-title" style="color: {{item.subTitleColor}};">
7
+ {{item.subTitle}}
8
+ </view>
8
9
  </view>
9
- <!-- 下单时间 -->
10
10
  </view>
11
- <!-- 列表中间 -->
12
- <!-- 除非可申请宴席状态列表 -->
13
11
  <slot wx:if="{{contentSlot}}" name="content"></slot>
14
12
  <view wx:else class="card-cell-content">
15
13
  <view class="flex-between center" wx:for="{{item.dataList}}" wx:for-item="_item" wx:key="index">
16
14
  <view class="center-left">{{_item.label}}</view>
17
- <view wx:if="{{_item.valueType === 'text' || !_item.valueType}}" class="center-right">{{_item.value}}</view>
15
+ <view wx:if="{{_item.valueType === 'text' || !_item.valueType}}" class="center-right">
16
+ {{_item.value}}
17
+ </view>
18
18
  <view bindtap="call" data-tel="{{_item.value}}" wx:elif="{{_item.valueType === 'tel'}}" class="center-right">
19
19
  {{_item.value}}
20
20
  <view class="call-box">
@@ -49,6 +49,10 @@
49
49
  flex: 1;
50
50
  }
51
51
 
52
+ .ac {
53
+ align-items: center;
54
+ }
55
+
52
56
  .flex-end {
53
57
  display: flex;
54
58
  justify-content: flex-end;
@@ -497,9 +501,9 @@
497
501
  }
498
502
 
499
503
  .card-cell-content{
500
- padding-bottom: 32rpx;
504
+ /* padding-bottom: 32rpx; */
501
505
  }
502
506
  .card-cell-footer{
503
- text-align: right;
504
- border-top: 1rpx solid #ededed;
507
+ /* text-align: right;
508
+ border-top: 1rpx solid #ededed; */
505
509
  }
@@ -163,7 +163,7 @@ Component({
163
163
  signature,
164
164
  },
165
165
  header: {
166
- "Content-Type": "multipart/form-data",
166
+ // "Content-Type": "multipart/form-data",
167
167
  },
168
168
  success: (res) => {
169
169
  if (res.statusCode == 200) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtdev/xt-miniprogram-ui",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "miniprogram": "libs",
6
6
  "publishConfig": {