1
0
forked from dyf/APP

6331前端功能初步完成,扩展msgPop支持自定义插槽

This commit is contained in:
liub
2025-10-17 17:29:08 +08:00
parent b114f6690d
commit 90cee62df1
16 changed files with 574 additions and 1031 deletions

View File

@ -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;