<template lang="pug">
<!-- #ifdef MP-WEIXIN -->
JumpApplet(@jumpApplet="jumpApplet")
<!-- #endif -->
</template>
按照上面写的不生效
<template lang="pug">
<!-- #ifdef MP-WEIXIN -->
JumpApplet(@jumpApplet="jumpApplet")
<!-- #endif -->
</template>
按照上面写的不生效
最佳回复
DCloud_UNI_OttoJi - 日常回复 uni-app/x 问题,如果艾特我没看到,请主动私信
demo 地址 https://gitcode.net/xiurensha5731/uni-app-questions/-/tree/q/pug-ifdef
<template lang="pug">
div
// #ifdef MP-WEIXIN
div weixin
// #endif
// #ifdef H5
div h5 web
// #endif
</template>
1***@qq.com (作者)
好的,已经使用上了,谢谢
2024-01-22 10:02