props组件传值(子串子)

父组件

html 复制代码
<version :show="versionShow" @closeVersion="versionShow = false" @data="onData"></version>
<footBar url="index" :footShow="footShow"></footBar>

第一个version 组件

js 复制代码
this.$emit('data', false); // false 隐藏tabbar,true显示tabbar

第二个footBar组件

html 复制代码
<template>
	<view class="footBar" v-if="footShow">
		footBar
	</view>
</template>
<script>
	export default {
		props: {
			footShow: {
				type: Boolean,
			}
		},
	}
</script>
相关推荐
bush45 小时前
嵌入式linux学习记录七,中断
linux·嵌入式
nuIl5 小时前
实现一个 Coding Agent(3):工具调用
前端·agent·cursor
RisunJan5 小时前
Linux命令-nologin(用于系统账户或需要禁止交互式登录的场景)
linux·运维
nuIl5 小时前
实现一个 Coding Agent(4):ReAct 循环
前端·agent·cursor
nuIl5 小时前
实现一个 Coding Agent(1):一次 LLM 调用
前端·agent·cursor
nuIl5 小时前
实现一个 Coding Agent(2):让 LLM 流式响应
前端·agent·cursor
copyer_xyf5 小时前
Python 异常处理
前端·后端·python
是阿建吖!5 小时前
【Linux】信号
android·linux·c语言·c++
城北徐宫5 小时前
Linux信号深度解剖:5种产生、3张表、4次切换
linux·c++·学习
sugar__salt5 小时前
从栈队列数据结构到JS原型面向对象全解
前端·javascript·数据结构