update&add 增加了选房及片区service
This commit is contained in:
@@ -39,9 +39,7 @@ export default {
|
||||
methods: {
|
||||
|
||||
onLoading() {
|
||||
this.loading = {
|
||||
indicator: <a-icon type="loading" spin />
|
||||
}
|
||||
this.loading = true
|
||||
},
|
||||
|
||||
onLoaded() {
|
||||
@@ -80,7 +78,6 @@ export default {
|
||||
|
||||
render() {
|
||||
const props = {
|
||||
loading: this.loading,
|
||||
dataSource: this.data,
|
||||
rowKey: record => record.id,
|
||||
...this.$attrs
|
||||
@@ -100,19 +97,22 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
<div class="yo-list">
|
||||
<a-list {...{ props, on, scopedSlots: { ...this.$scopedSlots } }}>
|
||||
{Object.keys(this.$slots).map((name) => (
|
||||
<template slot={name}>{this.$slots[name]}</template>
|
||||
))}
|
||||
</a-list>
|
||||
{
|
||||
!!this.data && !!this.data.length && <a-pagination
|
||||
size="small"
|
||||
{... { props: this.pagination }}
|
||||
onChange={this.onListChange}
|
||||
onShowSizeChange={this.onListChange}
|
||||
/>
|
||||
}
|
||||
<a-spin spinning={this.loading}>
|
||||
<a-icon slot="indicator" type="loading" spin />
|
||||
<a-list {...{ props, on, scopedSlots: { ...this.$scopedSlots } }}>
|
||||
{Object.keys(this.$slots).map((name) => (
|
||||
<template slot={name}>{this.$slots[name]}</template>
|
||||
))}
|
||||
</a-list>
|
||||
{
|
||||
!!this.data && !!this.data.length && <a-pagination
|
||||
size="small"
|
||||
{... { props: this.pagination }}
|
||||
onChange={this.onListChange}
|
||||
onShowSizeChange={this.onListChange}
|
||||
/>
|
||||
}
|
||||
</a-spin>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
@@ -21,6 +21,10 @@ export default {
|
||||
},
|
||||
moreQuery: {
|
||||
type: Function
|
||||
},
|
||||
autoLoad: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -52,7 +56,8 @@ export default {
|
||||
},
|
||||
|
||||
created() {
|
||||
this.onLoadData()
|
||||
if (this.autoLoad)
|
||||
this.onLoadData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user