diff --git a/src/mixins/DataSource.js b/src/mixins/DataSource.js index 929ac69f3..29c28d2d7 100644 --- a/src/mixins/DataSource.js +++ b/src/mixins/DataSource.js @@ -33,6 +33,9 @@ export default { // treeDisplay: { type: Boolean, default: false }, // 由组件自己定义 parentField: { type: String, default: 'parentId' }, childrenField: { type: String, default: 'children' }, + + // 其他 + // needAllRemoteData: { type: Boolean, default: false }, // 由组件自己定义 }, data() { return { @@ -48,6 +51,13 @@ export default { currentData() { return this.currentDataSource && this.currentDataSource.viewData; }, + allRemoteData() { + if (this.currentDataSource.remote) { + return this.currentDataSource.allData; + } + + return this.currentDataSource.data; + }, paging() { if (this.pageable) { const paging = {}; @@ -134,6 +144,8 @@ export default { filtering: this.filtering, sorting: this.currentSorting, + needAllData: this.needAllRemoteData, + getExtraParams: this.getExtraParams, }; diff --git a/src/pickerson/demo/index.vue b/src/pickerson/demo/index.vue index d5188eff9..4f70f467b 100644 --- a/src/pickerson/demo/index.vue +++ b/src/pickerson/demo/index.vue @@ -11,31 +11,33 @@ title="标题" :show-toolbar="true" - labelField="左侧标题" - input-align="left" :pvalue.sync="pickerValue" :data-source="load" - :columnsprop="[1, 2, 3, 4]" :pageable="true" :pageSize="10" :filterable="true" @confirm="confirm111" @change="change111"> -