父组件:
<template>
<swiper><sub> <!-- 引入子组件 --></sub></swiper>
</template>
子组件
<template>
<swiper-item><text>123</text></swiper-item>
</template>
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10
HBuilderX类型: 正式
HBuilderX版本号: 3.2.1
手机系统: Android
手机系统版本号: Android 7.1.1
手机厂商: 模拟器
手机机型: 雷电
页面类型: nvue
打包方式: 离线
项目创建方式: HBuilderX
父组件:
<template>
<swiper><sub> <!-- 引入子组件 --></sub></swiper>
</template>
子组件
<template>
<swiper-item><text>123</text></swiper-item>
</template>
见代码示例
子组件swiper-item有效
子组件swiper-item无效
swiper的子组件swiper-item放在自定义组件中无效,很影响组件抽象
0 个回复