36 lines
1.8 KiB
Plaintext
36 lines
1.8 KiB
Plaintext
<!-- index.wxml -->
|
|
<view class="container">
|
|
<view class="col">
|
|
<block wx:for="{{users}}" wx:key="index">
|
|
<view class="card-view">
|
|
<block wx:if="{{item.avatar}}">
|
|
<image class="avatar" src="{{item.avatar}}" mode="aspectFit" />
|
|
</block>
|
|
<block wx:else>
|
|
<view class="img-view">
|
|
<t-icon name="image" size="xl" />
|
|
</view>
|
|
</block>
|
|
<view class="row">
|
|
<view class="col">
|
|
<text class="nickname">{{item.nickname || '未设置'}}</text>
|
|
<text class="mobile">姓名: {{item.name || '未设置'}}</text>
|
|
<text class="mobile">手机: {{item.mobile || '未设置'}}</text>
|
|
</view>
|
|
<t-tag theme="{{item.hasRelation ? 'danger' :'primary'}}" shape="round" size="large" data-index="{{index}}" bind:tap="{{item.hasRelation ? 'onRemove': 'onAdd'}}">
|
|
<block wx:if="{{item.hasRelation}}">
|
|
<t-icon name="delete" size="16px" slot="icon" />
|
|
移除
|
|
</block>
|
|
<block wx:else>
|
|
<t-icon name="add" size="16px" slot="icon" />
|
|
增加
|
|
</block>
|
|
</t-tag>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<t-button theme="primary" size="large" disabled="{{!oakDirty}}" bind:tap="confirm" block>确认</t-button>
|
|
<t-dialog visible="{{show}}" title="确定移除吗" confirm-btn="确定" cancel-btn="取消" bind:cancel="cancelDelete" bind:confirm="confirmDelete"></t-dialog>
|
|
</view> |