Skip to content

Commit

Permalink
Merge branch 'master' of github.com:szuprefix/vue-django
Browse files Browse the repository at this point in the history
  • Loading branch information
szuprefix committed Dec 11, 2020
2 parents 30213d7 + 5195b26 commit c318cdc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions src/components/mobile/model/List.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template>
<div v-infinite-scroll="loadMore" infinite-scroll-disabled="$attrs.infiniteScrollDisabled || loading"
infinite-scroll-distance="10">
<panel v-bind="[$attrs,$props]" v-model="data" v-if="layout === 'panel'"></panel>
<cells v-bind="[$attrs,$props]" v-model="data" v-if="layout === 'cells'">
<template slot="icon" v-if="$scopedSlots.icon" slot-scope="scope">
<slot name="icon" v-bind="scope"></slot>
</template>
</cells>

<slot v-bind:data="data">
<panel v-bind="[$attrs,$props]" v-model="data" v-if="layout === 'panel'"></panel>
<cells v-bind="[$attrs,$props]" v-model="data" v-else-if="layout === 'cells'">
<template v-if="$scopedSlots.icon" v-slot:icon="scope">
<slot name="icon" v-bind="scope"></slot>
</template>
</cells>
</slot>
<load-more :tip="tip" :show-loading="loading" v-if="currentPageSize < count"></load-more>
<div v-if="!loading && count<=0" style="text-align: center;margin: 2rem 0;">暂无数据</div>
</div>
Expand All @@ -24,7 +25,7 @@
appModel: String,
owner: Object,
queries: {type: Object, default: {}},
layout: {type: String, default: 'panel'},
layout: {type: [String, Object], default: 'panel'},
prepare: Function,
pageSize: {type: Number, default: 20},
url: String
Expand Down
2 changes: 1 addition & 1 deletion src/components/mobile/model/Panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
ls.push(d)
})
this.list = ls
console.log(this.list)
// console.log(this.list)
}
},
created () {
Expand Down

0 comments on commit c318cdc

Please sign in to comment.