新增DropdownTable组件
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-popover v-model="popVisible" width="700" trigger="click" placement="bottom">
|
||||
<el-popover v-model="popVisible" :width="width" trigger="click" placement="bottom">
|
||||
<div>
|
||||
<FBATable
|
||||
ref="countryTableRef"
|
||||
@@ -10,7 +10,7 @@
|
||||
@rowClick="handleRowClick"
|
||||
></FBATable>
|
||||
</div>
|
||||
<el-input v-model="keyWords" :placeholder="placeholder" slot="reference"/>
|
||||
<el-input v-model="name" :placeholder="placeholder" slot="reference"/>
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
@@ -22,6 +22,10 @@
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
default: 700
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择'
|
||||
@@ -36,11 +40,6 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pagination: {
|
||||
TotalCount: 0,
|
||||
PageIndex: 1,
|
||||
PageSize: 10
|
||||
},
|
||||
countryColumns: [
|
||||
{
|
||||
prop: 'NameCn',
|
||||
@@ -64,35 +63,15 @@
|
||||
}
|
||||
],
|
||||
popVisible: false,
|
||||
selected: [],
|
||||
timer: null
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
computed: {
|
||||
keyWords: {
|
||||
get() {
|
||||
return this.name
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:name', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleRowClick(val) {
|
||||
this.$emit('selectedData', val)
|
||||
this.timer = setTimeout(() => {
|
||||
this.popVisible = false
|
||||
}, 200)
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pagination.PageSize = val
|
||||
this.getList()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pagination.PageIndex = val
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
Reference in New Issue
Block a user