<template>
	<view class="mask-model" v-show="showMask">
		<view class="mask" @click="hide"></view>
		<view class="model-count">
			<view class="amen-tit">{{ headername }}</view>
			<view class="count" :style="{'color':titleColoe}">{{maskTitle}}</view>
			<button form-type="submit" class="switchBtn" v-if="typeShow">切换{{tabname}}</button>
			<button form-type="submit" class="switchBtn" v-if="typeShow">强制装载</button>
			<button form-type="submit" class="eleBtn" @click="hide" v-if="typeShow">取消</button>
			<view class="bot"  v-if="!typeShow">
				<button form-type="submit" class="eleBtns" @click="hide">取消</button>
				<button form-type="submit" class="switchBtndel" >确定</button>
				</view>
			<!-- <view class="btm-box">
				<view v-show="btnType==1" class="btn cancel" @click="hide" :style="{'color':cancelColor}">取消</view>
				<view class="btn confirm" @click="confirm" :style="{'color':confirmColor}">确定</view>
			</view> -->
		</view>
	</view>
</template>
<script>
	export default {
		props: {
			maskTitle: {//提示内容
				type: String,
				default:'提示消息'
			},
			titleColoe:{//提示信息字体颜色
				type: String,
				default:'#666666'
			},
			confirmColor:{//确定按钮字体颜色
				type: String,
				default:'#007AFF'
			},
			cancelColor:{//取消按钮字体颜色
				type: String,
				default:'#666666'
			},
			btnType:{//1显示取消按钮
				type: String,
				default:'1'
			},
			tabname:{//名称
				type: String,
				default:'1'
			},
			typeShow: {
				type: Boolean,
			},
			headername: {//标题
				type: String,
			}
		},
		data() {
			return {
				showMask:false,
			};
		},
		mounted() {
			
		},
		created() {

		},
		computed: {
			
		},
		methods: {
			show:function(){
				this.showMask = true;
			},
			hide:function(){
				this.$emit('cancel');
				this.showMask = false;
			},
			confirm:function(e){
				this.showMask = false;
				this.$emit('confirm');
			},
		}
	}
</script>

<style scoped>
	.mask-model{
		position: fixed;
		width: 100%;
		height: 100%;
		left: 0;
		top: 0;
		z-index: 999;
	}
	.bot{
		width: 100%;
		/* padding: 0 .55rem 0 .55rem; */
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 1.25rem;
	}
	.mask-model .mask{
		width: 100%;
		height: 100%;
		background: rgba(0,0,0,0.65);
	}
	.switchBtn{
		width: 12rem;
    height: 2.125rem;
		background: linear-gradient(179.11deg, rgba(51,161,165,1.00) 1.866%,rgba(59,111,142,1.00) 137.144%,rgba(59,111,142,1.00) 137.144%,rgba(59,111,142,1.00) 137.144%);
		border-radius:
		4px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: rgb(255, 255, 255);
		font-family: Noto Sans SC;
		font-size: 15px;
		font-weight: 700;
		margin-bottom: 1rem;
	}
	.switchBtndel{
		width: 5rem;
    height: 2rem;
		background: linear-gradient(179.11deg, rgba(51,161,165,1.00) 1.866%,rgba(59,111,142,1.00) 137.144%,rgba(59,111,142,1.00) 137.144%,rgba(59,111,142,1.00) 137.144%);
		border-radius:
		4px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: rgb(255, 255, 255);
		font-family: Noto Sans SC;
		font-size: 15px;
		font-weight: 700;
	}
	.eleBtns{
		width: 5rem;
    height: 2rem;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgb(243, 253, 255);
		border: 1px solid rgb(172, 218, 230);
		border-radius:
		4px;
		color: rgb(59, 150, 159);
		font-family: Noto Sans SC;
		font-size: 15px;
		font-weight: 500;
	}
	.eleBtn{
		width: 12rem;
    height: 2.125rem;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgb(243, 253, 255);
		border: 1px solid rgb(172, 218, 230);
		border-radius:
		4px;
		color: rgb(59, 150, 159);
		font-family: Noto Sans SC;
		font-size: 15px;
		font-weight: 500;
	}
	.model-count{
		width: 14.5rem;
		border-radius: 20rpx;
		background: #FFFFFF;
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%,-50%);
		z-index: 9;
		min-height: 9.375rem;
		padding: 1.5rem 0 1.5rem 0;
		overflow: hidden;
	}
	.amen-tit{
		text-align: center;
		color: rgb(48, 51, 57);
		font-family: Noto Sans SC;
		font-size: 1rem;
		font-weight: 700;
		line-height: 80rpx;
	}
	.count{
		/* text-align: center; */
		/* padding:30rpx; */
		padding: .625rem .875rem 1.875rem .875rem;
		color: rgb(106, 113, 125);
		font-family: Noto Sans SC;
		font-size: 14px;
		font-weight: 500;
		max-height: 300rpx;
		overflow-y: scroll;
	}
	.btm-box{
		position: absolute;
		width: 100%;
		left: 0;
		bottom: 0;
		z-index: 9;
		display: flex;
		border-top: 1px solid #F5F5F5;
	}
	.btm-box .btn{
		flex: 1;
		box-sizing: border-box;
		height: 96rpx;
		line-height: 96rpx;
		text-align: center;
		font-size: 30rpx;
	}
	.btm-box .btn.confirm{
		color: #007AFF;
	}
	.btm-box .btn.cancel{
		color: #666666;
		border-right: 1px solid #F5F5F5;
	}
</style>