6331前端功能初步完成,扩展msgPop支持自定义插槽
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
:style="{color:textColor || getTypeStyle('textColor')}"
|
||||
@click="closeClick"
|
||||
>x</view>
|
||||
|
||||
<view v-if="!visiblePrompt">
|
||||
<image
|
||||
v-if="iconUrl"
|
||||
@ -25,7 +26,10 @@
|
||||
class="popup-icon"
|
||||
:style="{ tintColor: textColor || getTypeStyle('textColor') }"
|
||||
></image>
|
||||
<view class="popup-message">{{ message }}</view>
|
||||
<view class="popup-message" :class="showSlot?'displayNone':''">{{ message }}</view>
|
||||
<view class="popup-message" :class="showSlot?'':'displayNone'">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@ -40,16 +44,18 @@
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="popBtnContent">
|
||||
<view class="popBtnContent" v-show="showCancel || buttonText">
|
||||
|
||||
<view
|
||||
class="popup-button-cancel"
|
||||
|
||||
:style="{display:showCancel?'block':'none'}"
|
||||
@click="handleCancelClick"
|
||||
>{{ buttonCancelText?buttonCancelText:'取消' }}</view>
|
||||
|
||||
<view
|
||||
class="popup-button"
|
||||
:class="buttonText?'':'displayNone'"
|
||||
:style="{
|
||||
backgroundColor: buttonBgColor || getTypeStyle('buttonBgColor'),
|
||||
color: buttonTextColor || getTypeStyle('buttonTextColor')
|
||||
@ -125,6 +131,10 @@ export default {
|
||||
headerTxt:{
|
||||
type:String,
|
||||
default:""
|
||||
},
|
||||
showSlot:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -202,6 +212,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.displayNone{
|
||||
display: none !important
|
||||
}
|
||||
.message-popup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
||||
Reference in New Issue
Block a user