<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="./userList.css">
    <style type="text/css">
        [v-cloak]{
            display: none;
        }
    </style>
    <!--<script type="text/javascript" src="../../lib/js/start.js"></script>-->
    <script type="text/javascript" src="../../lib/js/p.js"></script>
    <script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">

    <div id="app" v-cloak>
        <div class="header">
            <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
            <p>{{ $t('title.doorlockUser') }}</p>
            <v-touch tag="span" class="header-right icon" v-on:tap="onAddUserTap" v-show="!role">&#xe600;</v-touch>
        </div>
        <div class="user-list">
            <ul class="user-list-scroll" v-show="userList.length">
                <v-touch tag="li" class="user-list-row"  v-for="(item, index) in userList" :key="index" >
                    <v-touch tag="div" class="user-list-handle"
                            v-on:tap="onTapUserList(index)">
                        <img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image">
                        <div>
                            <p class="user-list-title">{{ item.title == (null || '')?  $t('userList.defaultName'):item.title}}</p>                            
                            <p class="user-list-subtitle">
                                <img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image">
                                <span v-if="item.subtitle">{{ item.subtitle }}</span>
                            </p>
                        </div>
                    </v-touch>
                    <div class="user-list-button">
                        <v-touch tag="div" v-on:tap="onTapButton(index)">&#xe66d;</v-touch>
                    </div>
                </v-touch>
                <v-touch tag="li" class="user-list-load" v-on:tap="onTapLoad" v-show="loadShowFlag">{{ loadText }}</v-touch>
            </ul>
            <p class="user-list-tip" v-show="(userList.length == 0)">{{ tip }}</p>
        </div>   
        <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
        <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
    </div>

    <script type="text/javascript" src="./index.js" defer async></script>
    
</body>
</html>