vue element ui el-popover组件改造滚动显示信息

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue element ui el-popover组件改造滚动显示信息相关的知识,希望对你有一定的参考价值。

参考技术A <template>
<div>
<ul>
<li v-for="org in orgs" :key="org" style="list-style-type: none">
<el-popover placement="right" width="800" trigger="hover">
<el-table
v-loading="listLoading"
:data="orglist"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column
:label=" t('table.location')"
prop="username"
>
<template slot-scope=" row ">
<span> row.location </span>
</template>
</el-table-column>
<el-table-column :label=" t('table.role')" prop="role">
<template slot-scope=" row ">
<span> row.role </span>
</template>
</el-table-column>
</el-table>
<el-button slot="reference" width="180" @click="getText">
org
</el-button>
</el-popover>
</li>
</ul>
</div></template>
<script>

export default
name: 'UserTable',
data()
return
orglist: null

methods:
getText(e)
this.orglist = null
var temp = null
console.log(e.target.innerText)
this.orgQuery.filterValue = e.target.innerText
if (e.target.innerText !== this.orgs[0])
this.orgQuery = this.getAllUsers

console.log(this.orgQuery)
fetchUsers(this.orgQuery).then(response =>
temp = response.data.data.list
console.log('temp', temp)
if (e.target.innerText === this.orgs[0])
this.orglist = temp

if (e.target.innerText === this.orgs[1])
this.orglist = temp.filter((item) => item.organization['name'] !== this.orgs[0])

this.orgQuery =
filterField: 'organizationName',
filterValue: ''

)


</scipt>

以上是关于vue element ui el-popover组件改造滚动显示信息的主要内容,如果未能解决你的问题,请参考以下文章

element UI .el-popover 样式修改

Element-UI的el-popover实现同一个popover重复使用多次(类似MessageBox)

element-ui的el-popover挂载问题

element-ui解决el-popover的边界重新计算元素位置的问题

element-ui Popover offset

Vue element下拉菜单实现键盘事件上下移