@xtdev/xt-miniprogram-ui 1.2.27 → 1.2.30
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/libs/xt-dialog/index.js
CHANGED
|
@@ -8,6 +8,10 @@ Component({
|
|
|
8
8
|
type:Boolean,
|
|
9
9
|
value:true
|
|
10
10
|
},
|
|
11
|
+
showCloseIcon:{
|
|
12
|
+
type:Boolean,
|
|
13
|
+
value:false
|
|
14
|
+
},
|
|
11
15
|
type:{
|
|
12
16
|
type:String,
|
|
13
17
|
value:'nomal'
|
|
@@ -90,6 +94,10 @@ Component({
|
|
|
90
94
|
})
|
|
91
95
|
console.log('触发选择',this.data.curChoosedItemVal);
|
|
92
96
|
},
|
|
97
|
+
// 点击右上角确认按钮
|
|
98
|
+
closeDialog() {
|
|
99
|
+
this.triggerEvent('close',{})
|
|
100
|
+
},
|
|
93
101
|
|
|
94
102
|
|
|
95
103
|
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
<view class="dialog_mask" wx:if="{{type=='nomal'}}">
|
|
5
5
|
<view class="dialog_box">
|
|
6
6
|
<view class="title" wx:if="{{title}}">{{title}}</view>
|
|
7
|
-
<
|
|
7
|
+
<image catch:tap="closeDialog" src="https://img.tanjiu.cn/home/z8CZkrd2Cm4xyfmMTFbjQpFcdSXQTEk6.png" class="close_icon" wx:if="{{showCloseIcon}}"></image>
|
|
8
|
+
<view class="content" style="font-weight:{{title?400:800}};">{{message}}
|
|
9
|
+
<slot />
|
|
10
|
+
</view>
|
|
11
|
+
<slot name="btn"></slot>
|
|
8
12
|
<view class="default_btn" catchtap="confirmBtn" data-confirmtype="nomalDialog" wx:if="{{showConfirmButton}}">{{confirmButtonText}}</view>
|
|
9
13
|
<view class="cancel_btn" catchtap="cancelBtn" wx:if="{{showCancelButton}}">{{cancelButtonText}}</view>
|
|
10
14
|
</view>
|
|
@@ -13,8 +17,12 @@
|
|
|
13
17
|
<view class="dialog_mask" wx:if="{{type=='imageText'}}">
|
|
14
18
|
<view class="dialog_box">
|
|
15
19
|
<view class="title" wx:if="{{title}}">{{title}}</view>
|
|
20
|
+
<image catch:tap="closeDialog" src="https://img.tanjiu.cn/home/z8CZkrd2Cm4xyfmMTFbjQpFcdSXQTEk6.png" class="close_icon" wx:if="{{showCloseIcon}}"></image>
|
|
16
21
|
<image class="image" wx:if="{{imageUrl}}" src="{{imageUrl}}"></image>
|
|
17
|
-
<view class="content">{{message}}
|
|
22
|
+
<view class="content">{{message}}
|
|
23
|
+
<slot />
|
|
24
|
+
</view>
|
|
25
|
+
<slot name="btn"></slot>
|
|
18
26
|
<view class="default_btn" catchtap="confirmBtn" data-confirmtype="imageTextDialog" wx:if="{{showConfirmButton}}">{{confirmButtonText}}</view>
|
|
19
27
|
<view class="cancel_btn" catchtap="cancelBtn" wx:if="{{showCancelButton}}">{{cancelButtonText}}</view>
|
|
20
28
|
</view>
|
|
@@ -23,10 +31,12 @@
|
|
|
23
31
|
<view class="dialog_mask" wx:if="{{type=='inputText'}}">
|
|
24
32
|
<view class="dialog_box">
|
|
25
33
|
<view class="title" winp_boxx:if="{{title}}">{{title}}</view>
|
|
34
|
+
<image catch:tap="closeDialog" src="https://img.tanjiu.cn/home/z8CZkrd2Cm4xyfmMTFbjQpFcdSXQTEk6.png" class="close_icon" wx:if="{{showCloseIcon}}"></image>
|
|
26
35
|
<view class="inp_wrapper">
|
|
27
|
-
<textarea class="inp_content" value="{{inpVal}}" maxlength="{{48}}" disable-default-padding adjust-position auto-height auto-focus placeholder="{{placeholder}}" placeholder-style="color: #999;" bindblur="onInputBlur"/>
|
|
36
|
+
<textarea class="inp_content" value="{{inpVal}}" maxlength="{{48}}" disable-default-padding adjust-position auto-height auto-focus placeholder="{{placeholder}}" placeholder-style="color: #999;" bindblur="onInputBlur" />
|
|
28
37
|
</view>
|
|
29
38
|
<slot />
|
|
39
|
+
<slot name="btn"></slot>
|
|
30
40
|
<view class="default_btn" catchtap="confirmBtn" data-confirmtype="inputDialog" wx:if="{{showConfirmButton}}">{{confirmButtonText}}</view>
|
|
31
41
|
<view class="cancel_btn" catchtap="cancelBtn" wx:if="{{showCancelButton}}">{{cancelButtonText}}</view>
|
|
32
42
|
</view>
|
|
@@ -35,6 +45,7 @@
|
|
|
35
45
|
<view class="dialog_mask" wx:if="{{type=='choose'}}">
|
|
36
46
|
<view class="dialog_box">
|
|
37
47
|
<view class="title" wx:if="{{title}}">{{title}}</view>
|
|
48
|
+
<image catch:tap="closeDialog" src="https://img.tanjiu.cn/home/z8CZkrd2Cm4xyfmMTFbjQpFcdSXQTEk6.png" class="close_icon" wx:if="{{showCloseIcon}}"></image>
|
|
38
49
|
<view class="radio_box">
|
|
39
50
|
<view class="radio_item" wx:for="{{chooiceItems}}" wx:key="index" catchtap="chooseItem" data-chooseitem="{{item}}">
|
|
40
51
|
<image class="radio_icon" src="{{item.value!==curChoosedItemVal?'https://img.tanjiu.cn/home/SBaYKEs2iJiF3564zwRPtHAfB2Hfy7ZW.png':'https://img.tanjiu.cn/home/AD3tpDYJiGjGimY25sCSanJsEYXnEHFk.png'}}"></image>
|
|
@@ -45,9 +56,9 @@
|
|
|
45
56
|
</view>
|
|
46
57
|
</view>
|
|
47
58
|
<slot />
|
|
59
|
+
<slot name="btn"></slot>
|
|
48
60
|
<view class="default_btn" catchtap="confirmBtn" data-confirmtype="chooseDialog" wx:if="{{showConfirmButton}}">{{confirmButtonText}}</view>
|
|
49
61
|
<view class="cancel_btn" catchtap="cancelBtn" wx:if="{{showCancelButton}}">{{cancelButtonText}}</view>
|
|
50
62
|
</view>
|
|
51
63
|
</view>
|
|
52
|
-
</block>
|
|
53
|
-
|
|
64
|
+
</block>
|
|
@@ -20,6 +20,14 @@
|
|
|
20
20
|
width: 654rpx;
|
|
21
21
|
/* margin: 100rpx auto; */
|
|
22
22
|
background-color: rgba(255, 255, 255);
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
.close_icon {
|
|
26
|
+
position: absolute;
|
|
27
|
+
right: 20rpx;
|
|
28
|
+
top: 20rpx;
|
|
29
|
+
width: 40rpx;
|
|
30
|
+
height: 40rpx;
|
|
23
31
|
}
|
|
24
32
|
.title{
|
|
25
33
|
line-height: 56rpx;
|