<van-tabs active="{{ active }}" tab-active-class='tab-active' color='#3874F6' bind:change="onChange">
    <view class="linear" />
    <Yl_ListBox id='ListBox' pullDown='{{active == "群组"}}' safety='{{active == "群组"}}' bind:getlist='updatedb'>
        <van-tab title="{{language['联系人']||'联系人'}}" name="联系人">
            <list id='list' allGroup='{{allGroup}}' />
        </van-tab>
        <van-tab title="{{language['群组']||'群组'}}" name="群组">
            <navigator class="insert-group" url="#" bindtap="insertGroup">
                <view class="title">
                    <text class="iconfont icon-tianjiaqunzu" />
                    <text class="text">{{language['添加新群组']||'添加新群组'}}</text>
                </view>
                <text class="iconfont icon-a-wodetiaozhuan" />
            </navigator>
            <block wx:if="{{defaultGroup.length}}">
                <view class="group-label">
                    {{language['系统群组']||'系统群组'}}
                </view>
                <navigator class="group-box" url="/packageA/contacts/group?id={{item.sys_phonebookgroupid}}&name={{language[item.groupname]||item.groupname}}" wx:for="{{defaultGroup}}" wx:key="rowindex">
                    <view class="icon-box" style="background-color: #FA8C16;">
                        <text class="iconfont icon-xiaochengxu_qunzu" />
                    </view>
                    <view class="text-box">
                        <view class="title">{{language[item.groupname]||item.groupname}}</view>
                        <view class="count">{{language['已有']||'已有'}}{{item.count}}{{language['人']||'人'}}</view>
                    </view>
                    <text class="iconfont icon-a-wodetiaozhuan" />
                </navigator>
            </block>

            <block wx:if="{{myGroup.length}}">
                <view class="group-label">
                    {{language['自定义群组']||'自定义群组'}}
                </view>
                <van-swipe-cell wx:for="{{myGroup}}" wx:key="rowindex" right-width="{{ 120 }}">
                    <van-cell-group>
                        <navigator class="group-box" url="/packageA/contacts/group?id={{item.sys_phonebookgroupid}}&name={{language[item.groupname]||item.groupname}}">
                            <view class="icon-box" style="background-color: #52C41A;">
                                <text class="iconfont icon-xiaochengxu_qunzu" />
                            </view>
                            <view class="text-box">
                                <view class="title line-1">{{language[item.groupname]||item.groupname}}</view>
                                <view class="count">{{language['已有']||'已有'}}{{item.count}}{{language['人']||'人'}}</view>
                            </view>
                            <text class="iconfont icon-a-wodetiaozhuan" />
                        </navigator>
                    </van-cell-group>
                    <view slot="right" class="van-swipe-cell__right">
                        <navigator style="background-color: #FA8C16;" data-item="{{item}}" bindtap="editGroup" url="#">{{language['编辑']||'编辑'}}</navigator>
                        <navigator style="background-color: #FF3B30;" data-item="{{item}}" bindtap="deleteGroup" url="#">{{language['删除']||'删除'}}</navigator>
                    </view>
                </van-swipe-cell>
            </block>
        </van-tab>
    </Yl_ListBox>
</van-tabs>

<van-dialog confirmButtonText="{{language['确定']||'确定'}}" cancelButtonText="{{language['取消']||'取消'}}" use-slot id="van-dialog" confirm-button-color='#3874F6' cancel-button-color='#999999'>
    <view class="dialog">
        <view class="dialog-title">
            <text wx:if="{{updateGroup.sys_phonebookgroupid==0}}">
                {{language['新建群组']||'新建群组'}}
            </text>
            <text wx:else>
                {{language['编辑群组']||'编辑群组'}}
            </text>
        </view>
        <input class="dialog-input" value="{{updateGroup.groupname}}" placeholder="{{language['请输入群组名称']||'请输入群组名称'}}" type="text" bindinput="onInput" />
    </view>
</van-dialog>