一,创建组件
二,组件传入参数
三,组件接收参数
四,组件渲染参数
五,组件代码
<!--components/daoHangLan/daoHangLan.wxml-->
<view class="titles">
<block wx:for="{
{titles}}" wx:key="*this">
<view class="item {
{index === indexs ? 'active':''}}"
<!--components/daoHangLan/daoHangLan.wxml-->
<view class="titles">
<block wx:for="{
{titles}}" wx:key="*this">
<view class="item {
{index === indexs ? 'active':''}}"