uni-app 解决video组件层级过高的问题

使用video组件时,弹出框总是在video下方。

需要的效果如图:

解决方法:

使用subNvue子窗体:

1。在使用video组件的页面同级建立一个子目录subNVue,创建一个DialogNet.nvue页面,

<template>
    <view class="my-confirm-notice" id="netDialog">
        <view class="confirm-content-wrap1">
            <!-- 标题 -->
            <div class="unipop__ui_tit">
				<text class="unipop__ui_tit_text">查询条件</text>
				<image src="../../../static/images/workbeach/icon_close.png" class="close_image" @click="close()"></image>
			</div>
            <!-- 内容 -->
            <div class="content_margin">
            	<div class="flex_row_center label_text label_margin">
					<text style="font-size: 16px;">实体名称:</text>
            		<input type="text" class="inputStyle" placeholder="实体名称" @input="onKeyInput" :value="userName" >
            	</div>
            </div>
            <div v-if="btns" class="unipop__ui_btns">
                <text v-for="(item,index) in btns" :key="index" class="btn" :style="item.style" @tap="btnTaped(item)">{
  
  {item.text}}</text>
            </div>
        </view>
    </view>
</template>


<script>
	export default {
		data() {
		    return {
		        btns:[
					{
						text: '重置',
						style: 'color: #ffffff',
					},
					{
						text: '确定',
						style: 'color: #ffffff',
					}
				],
				selectCondition:{},
				userName:'',
		    }
		},
		mounted() {
			console.log('mounted==================1111111111111111')
		},
		methods: {
			close(){
				this.userName = '';
				this.selectCondition = {};
				const subNvue = uni.getSubNVueById('netDialog');
				subNvue.hide();
			},
			btnTaped(item) {
				console.log(item);
				if(item.text == '重置') {
					this.userName = '';
					this.selectCondition = {};
				} else {
					uni.$emit('receiveData',this.selectCondition);
					this.close();
				}
			},
			onKeyInput(event) {
				this.userName = event.detail.value;
				this.selectCondition['nickName'] = this.userName;
			},
		}
	}
</script>

<style lang="scss">
	.my-confirm-notice {
		position: fixed;
		top: 0;
		left: 0;
		ri
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值