props组件传值(子串子)

父组件

<version :show="versionShow" @closeVersion="versionShow = false" @data="onData"></version>
<footBar url="index" :footShow="footShow"></footBar>

第一个version 组件

this.$emit('data', false); // false 隐藏tabbar,true显示tabbar

第二个footBar组件

<template>
	<view class="footBar" v-if="footShow">
		footBar
	</view>
</template>
<script>
	export default {
		props: {
			footShow: {
				type: Boolean,
			}
		},
	}
</script>

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-13 05:04:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-13 05:04:01       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-13 05:04:01       87 阅读
  4. Python语言-面向对象

    2024-04-13 05:04:01       96 阅读

热门阅读

  1. postgresql命令

    2024-04-13 05:04:01       32 阅读
  2. SQL Server详细使用教程

    2024-04-13 05:04:01       41 阅读
  3. 干货分享|TensorFlow构建神经网络

    2024-04-13 05:04:01       39 阅读
  4. hive sql一直跑到reduce=100%,然后挂掉重新跑

    2024-04-13 05:04:01       96 阅读
  5. 【CMake】CMake打包Dll

    2024-04-13 05:04:01       34 阅读
  6. python内置函数compile(),complex()详解

    2024-04-13 05:04:01       34 阅读
  7. AWS被误扣费了,怎么解决?

    2024-04-13 05:04:01       39 阅读
  8. python字符切片的规则

    2024-04-13 05:04:01       43 阅读