常规小优化
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
<image v-if="item.icon" :src="item.icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
||||
<text class="itemTxt">{{ item.text }}</text>
|
||||
<text class="itemTxt" :class="(config.textAlign=='flex-start'&&!item.icon)?'txtIndent':''">{{ item.text }}</text>
|
||||
</view>
|
||||
|
||||
|
||||
@ -139,8 +139,8 @@
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.itemTxt{
|
||||
text-indent: 20rpx;
|
||||
.txtIndent{
|
||||
text-indent: 30rpx;
|
||||
}
|
||||
.message-popup {
|
||||
position: relative;
|
||||
|
||||
@ -14,7 +14,13 @@
|
||||
<view v-if="!visiblePrompt">
|
||||
<image v-if="iconUrl" :src="iconUrl" mode="aspectFit" class="popup-icon"
|
||||
:style="{ tintColor: textColor || getTypeStyle('textColor') }"></image>
|
||||
<view class="popup-message" :class="showSlot?'displayNone':''">{{ message }}</view>
|
||||
<view :class="showSlot?'displayNone':''">
|
||||
<view class="popup-message" v-if="typeof(message)=='string'">{{ message }}</view>
|
||||
<view class="popup-message" v-else>
|
||||
<view v-for="item,i in message">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="popup-message" :class="showSlot?'':'displayNone'">
|
||||
<slot></slot>
|
||||
</view>
|
||||
@ -83,7 +89,7 @@
|
||||
buttonTextColor: String,
|
||||
iconUrl: String,
|
||||
message: {
|
||||
type: String,
|
||||
type: String|Array,
|
||||
default: ''
|
||||
},
|
||||
buttonText: {
|
||||
|
||||
@ -141,27 +141,35 @@
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
bgColor:'#383934cc',
|
||||
buttonTextColor:'#FFFFFFde'
|
||||
buttonTextColor:'#FFFFFFde',
|
||||
showCancel:true,
|
||||
buttonCancelText:'取消'
|
||||
},
|
||||
succ: {
|
||||
icoUrl: '/static/images/common/success.png',
|
||||
borderColor: "#BBE6004d",
|
||||
buttonBgColor: "#BBE600",
|
||||
buttonTextColor:'#232323de',
|
||||
bgColor:'#383934cc'
|
||||
bgColor:'#383934cc',
|
||||
showCancel:true,
|
||||
buttonCancelText:'取消'
|
||||
},
|
||||
warn: {
|
||||
icoUrl: '/static/images/common/warning.png',
|
||||
borderColor: "#FFC84E4d",
|
||||
buttonBgColor: "#FFC84E",
|
||||
buttonTextColor:'#FFFFFFde',
|
||||
bgColor:'#383934cc'
|
||||
bgColor:'#383934cc',
|
||||
showCancel:true,
|
||||
buttonCancelText:'取消'
|
||||
},
|
||||
info:{
|
||||
borderColor: "#BBE6004d",
|
||||
buttonBgColor: "#BBE600",
|
||||
bgColor:'#383934cc',
|
||||
buttonTextColor:'#232323de'
|
||||
buttonTextColor:'#232323de',
|
||||
showCancel:true,
|
||||
buttonCancelText:'取消'
|
||||
},
|
||||
prompt:{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user