var vueModel = new Vue({ el: '#tbodyJsID', data: { tsgList: [] }, watch: { 'tsgList': function() { this.$nextTick(function () { $('#tbodyShowJsID').append($('#tbodyJsID').html()); }) } } })
var commClass = { currentPage:1, pagesize: 2, loadData: function (page, sk) { $.getJSON('/F/MyFKList', { _pageIndex: page, _pageSize: commClass.pagesize }, function (res) { $.each(res.List, function (idx, ele) { ele['index'] = idx + 1 + (page - 1) * commClass.pagesize; }) vueModel.tsgList = res.List; var totalCount = 0; if (res.List.length > 0) { totalCount = res.List[0].TotalCount; } if (commClass.currentPage * commClass.pagesize >= totalCount) { $('#moreItemJsID').hide(); } }) } }
<ul class="list-group" id="tbodyJsID" style="display:none"> <li class="list-group-item" v-for="dinner in tsgList" v-bind:id="dinner.ID"> <span class="badge">{{dinner.HFlag}}</span> <div>名称:{{dinner.Title}}</div> <h5>联系人:{{dinner.FKDBName}} 联系人电话:{{dinner.FKDBMobie}}</h5> <h5>填写日期:{{dinner.CreateTime}}</h5> <div> <a v-bind:href="'/F/code?itemID='+dinner.ID">我的码</a> <a v-bind:href="'/F/MyDetail?FKAID='+dinner.ID" style="margin-left:22px;">详情</a> </div> </li> </ul>