<l-segment
active-key="{{defaultRootId}}"
height="{{scrollHeight}}"
wx:if="{{showSegment}}"
item-height="90"
even="{{false}}"
width="160"
scrollable
bind:linchange="onSegChange"
l-class="segment-container"
l-active-class="segment-item-active"
l-inactive-class="segment-item"
l-line-class="l-seg-line"
placement="left">
<block wx:for="{{oneShopData}}" wx:key="id">
<l-segment-item key="{{item.id}}" tab="{{item.project}}"></l-segment-item>
</block>
</l-segment>
data: {
showSegment: true,
},
this.setData({
showSegment: false
});
this.setData({
oneShopData: shopdate._oneShopData
});
this.setData({
showSegment: true
});
组件加个 wx:if=“{{showSegment}}” 然后用两个 this.setData({
showSegment: false
});