scTableSelect add params
This commit is contained in:
parent
17b75dcd5a
commit
22d98bfee9
|
@ -33,6 +33,7 @@
|
|||
props: {
|
||||
modelValue: null,
|
||||
apiObj: { type: Object, default: () => {} },
|
||||
params: { type: Object, default: () => {} },
|
||||
placeholder: { type: String, default: "请选择" },
|
||||
multiple: { type: Boolean, default: false },
|
||||
disabled: { type: Boolean, default: false },
|
||||
|
@ -93,6 +94,7 @@
|
|||
[this.defaultProps.pageSize]: this.pageSize,
|
||||
[this.defaultProps.keyword]: this.keyword
|
||||
}
|
||||
Object.assign(reqData, this.params)
|
||||
var res = await this.apiObj.get(reqData);
|
||||
var parseData = config.parseData(res)
|
||||
this.tableData = parseData.rows;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<el-main>
|
||||
<el-alert title="select深度改造的表格选择器, 非常适用于大量数据选择的场景" type="success" style="margin-bottom:20px;"></el-alert>
|
||||
<el-card shadow="never" header="单选">
|
||||
<sc-table-select v-model="value2" :apiObj="apiObj" :table-width="600" :props="props">
|
||||
<sc-table-select v-model="value2" :apiObj="apiObj" :params="params" :table-width="600" :props="props">
|
||||
<el-table-column prop="id" label="ID" width="150"></el-table-column>
|
||||
<el-table-column prop="user" label="姓名"></el-table-column>
|
||||
</sc-table-select>
|
||||
|
@ -32,6 +32,9 @@
|
|||
data() {
|
||||
return {
|
||||
apiObj: this.$API.demo.page,
|
||||
params: {
|
||||
name: 'demoName'
|
||||
},
|
||||
value: [
|
||||
{
|
||||
id: "410000199512025445",
|
||||
|
|
Loading…
Reference in New Issue