<PaiVideoSeries v-model="seriesModle" key="1" type="douyin1" @select="changeCurrentSwiperVideo"></PaiVideoSeries>
<!-- 充值解锁 -->
<PaiRechargeNew v-model="rechargeModle" key="2" type="douyin2" @success="go2UnlockVideo"></PaiRechargeNew>
分别使用 监听
PaiVideoSeries
const Props2= defineProps({
// 充值弹窗显示
modelValue: {
type: Boolean,
default: false,
},
type: {
type: String,
default: 'weixin',
},
});
const stopModelValueWatch = watchEffect(() => {
console.log('我要打印的值:充值组件watchEffect', Props2.modelValue);
});
PaiRechargeNew
const Props1= defineProps({
// 充值弹窗显示
modelValue: {
type: Boolean,
default: false,
},
type: {
type: String,
default: 'weixin',
},
});
const stopModelValueWatch = watchEffect(() => {
console.log('我要打印的值:充值组件watchEffect', Props1.modelValue);
});
t***@163.com (作者)
不用,在抖音小程序里,你写两个子组件,在父组件引入下,在子组件内使用 watchEffect 来检测 moduleValue 的值,就能复现
2024-07-25 14:17