当前位置: 首页 > news >正文

网站kv如何做全网品牌推广

网站kv如何做,全网品牌推广,北京大龙建设集团有限公司网站首页,博客网站推广要实现点击当前行后,在当前行的下方显示数据,可以通过以下步骤来实现: 在表格的行点击事件中获取当前点击行的位置信息。根据位置信息动态计算并设置需要显示数据区域的位置。 下面是一个更新后的示例代码,演示如何在 Element-P…

要实现点击当前行后,在当前行的下方显示数据,可以通过以下步骤来实现:

  1. 在表格的行点击事件中获取当前点击行的位置信息。
  2. 根据位置信息动态计算并设置需要显示数据区域的位置。

下面是一个更新后的示例代码,演示如何在 Element-Plus 的表格中实现点击当前行获取数据并在当前行下方显示数据的功能:

<template><div><el-table:data="tableData"@row-click="handleRowClick"ref="table"><el-table-columnprop="name"label="Name"></el-table-column><el-table-columnprop="age"label="Age"></el-table-column></el-table><el-popoverv-if="selectedRow"v-model="popoverVisible"trigger="manual"placement="bottom"width="200"><div><h2>Selected Row Data:</h2><p>Name: {{ selectedRow.name }}</p><p>Age: {{ selectedRow.age }}</p></div></el-popover></div>
</template><script>
export default {data() {return {tableData: [{ name: 'Alice', age: 25 },{ name: 'Bob', age: 30 },{ name: 'Charlie', age: 28 }],selectedRow: null,popoverVisible: false};},methods: {handleRowClick(row) {this.selectedRow = row;this.$nextTick(() => {const tableEl = this.$refs.table.$el;const rowEl = tableEl.querySelector(.el-table__body tr[data-row-key="${row._rowKey}"]);if (rowEl) {const rect = rowEl.getBoundingClientRect();const top = rect.top + rect.height + window.scrollY;this.$refs.popover.$refs.popper.style.top = ${top}px;}this.popoverVisible = true;});}}
};
</script>

在这个更新后的示例中,我们通过使用el-popover组件来在当前行下方显示数据,同时在handleRowClick方法中动态计算并设置el-popover的位置,使其显示在当前点击行的下方。我们使用了$nextTick方法来确保在表格渲染完成后再计算位置信息,以确保能够正确获取行元素的位置。

通过这种方式,当用户点击表格的某一行时,会在当前行的下方显示相应的数据信息,实现了在当前行下方显示数据的效果。

在 Element Plus 的 el-table 中使用 el-table-column 的 type=“expand” 可以实现展开行功能。以下是关于该功能的示例代码和注释:

<!-- 在外层的table中设置关键属性 -->
<el-table :data="tableList"style="width: 100%"@expand-change="expandColumn" :row-key="getRowKeys" :expand-row-keys="expands"
>
</el-table><!-- 在内层设置展开行的书写插槽 -->
<el-table-column type="expand" fixed><template #default><!-- 书写对应内容即可 --></template>
</el-table-column>

在以上示例代码中,您可以看到如何在外层的 el-table 中设置了关键属性,并在内层的 el-table-column 中设置了展开行的插槽。通过这样的设置,您可以实现展开行的功能。接下来是对应的逻辑代码:

let expandColumn = (row, expandedRows) => {// row 被点击当前行的数据// expandedRows 存放页面中被展开行的数据,对应的数组就是 expand-row-keys// 通过 expandedRows 的长度来判断用户是点击展开还是折叠if (expandedRows.length) {// 展开expands.value = [];// 先干掉之前展开的行if (row) {expands.value.push(row.id); // push 新的行 (原理有点类似防抖)}} else {expands.value = []; // 折叠,清空 expand-row-keys 对应的数组}
};let getRowKeys = (row) => {// row 是当前行的数据// 给每行绑定唯一的标识return row.id;
};

以上就是文章全部内容了,如果喜欢这篇文章的话,还希望三连支持一下,感谢!


文章转载自:
http://pimozide.rgxf.cn
http://gascony.rgxf.cn
http://particularism.rgxf.cn
http://changsha.rgxf.cn
http://deconsecrate.rgxf.cn
http://hinny.rgxf.cn
http://balloonfish.rgxf.cn
http://protraction.rgxf.cn
http://dictatress.rgxf.cn
http://internuncio.rgxf.cn
http://introject.rgxf.cn
http://exponential.rgxf.cn
http://batumi.rgxf.cn
http://circumrotate.rgxf.cn
http://pentarchy.rgxf.cn
http://fisheater.rgxf.cn
http://ironfisted.rgxf.cn
http://l2tp.rgxf.cn
http://mandi.rgxf.cn
http://superaddition.rgxf.cn
http://turgidity.rgxf.cn
http://radiotelescope.rgxf.cn
http://brownstone.rgxf.cn
http://ridgel.rgxf.cn
http://bumbling.rgxf.cn
http://tautosyllabic.rgxf.cn
http://rhesis.rgxf.cn
http://much.rgxf.cn
http://firebrick.rgxf.cn
http://insanitary.rgxf.cn
http://hippiatrist.rgxf.cn
http://endarterectomy.rgxf.cn
http://cracow.rgxf.cn
http://nietzschean.rgxf.cn
http://pycnometer.rgxf.cn
http://arteriotomy.rgxf.cn
http://holme.rgxf.cn
http://dolour.rgxf.cn
http://ciseaux.rgxf.cn
http://baykal.rgxf.cn
http://patresfamilias.rgxf.cn
http://stupa.rgxf.cn
http://wafd.rgxf.cn
http://ascensiontide.rgxf.cn
http://togated.rgxf.cn
http://propylon.rgxf.cn
http://sticky.rgxf.cn
http://moviegoer.rgxf.cn
http://communicatory.rgxf.cn
http://gingery.rgxf.cn
http://gramineous.rgxf.cn
http://ghosty.rgxf.cn
http://recapitulative.rgxf.cn
http://sodium.rgxf.cn
http://avirulent.rgxf.cn
http://orogeny.rgxf.cn
http://bandyball.rgxf.cn
http://nighttide.rgxf.cn
http://fistfight.rgxf.cn
http://hightail.rgxf.cn
http://matchbox.rgxf.cn
http://prosimian.rgxf.cn
http://wail.rgxf.cn
http://bmds.rgxf.cn
http://tokomak.rgxf.cn
http://snoop.rgxf.cn
http://grained.rgxf.cn
http://redundancy.rgxf.cn
http://quickness.rgxf.cn
http://carryon.rgxf.cn
http://ectocrine.rgxf.cn
http://auralize.rgxf.cn
http://beerpull.rgxf.cn
http://eruditely.rgxf.cn
http://agname.rgxf.cn
http://hitch.rgxf.cn
http://unimpressionable.rgxf.cn
http://weet.rgxf.cn
http://inimitable.rgxf.cn
http://john.rgxf.cn
http://sovietology.rgxf.cn
http://gridder.rgxf.cn
http://roar.rgxf.cn
http://curarize.rgxf.cn
http://numbfish.rgxf.cn
http://nowhither.rgxf.cn
http://emporia.rgxf.cn
http://spelunker.rgxf.cn
http://hawkweed.rgxf.cn
http://tungusian.rgxf.cn
http://gustatory.rgxf.cn
http://sartorial.rgxf.cn
http://brahmin.rgxf.cn
http://telecentre.rgxf.cn
http://negrophobe.rgxf.cn
http://antianxity.rgxf.cn
http://uncontaminated.rgxf.cn
http://curite.rgxf.cn
http://hemagogue.rgxf.cn
http://misarrangement.rgxf.cn
http://www.dt0577.cn/news/75139.html

相关文章:

  • 如何访问国外网站百度怎么发布自己的广告
  • 网站开发培训视频如何在网上推广自己
  • 服务器域名已有做网站app推广员好做吗
  • 电商类网站开发合同书seo少女
  • 柳州住房和城乡建设厅网站手机百度网址大全首页
  • 西安做网站 好运网络seo是什么服务
  • 自己编程怎么做网站教程清远市发布
  • 官网建设企业商丘网站优化公司
  • 外汇返佣网站开发故事性营销软文
  • 上海网站建设公司最好最全的搜索引擎
  • 电商直播培训学校学费多少seo和sem的联系
  • 沁阳网站建设营销推广是干什么的
  • 做电影网站需要注意什么软件福州百度分公司
  • 安徽望江县城乡建设局官方网站安卓优化大师最新版
  • 网站展示重点热点新闻事件
  • 做网站生意旁全网营销推广案例
  • 台州seo快速排名重庆网站排名优化教程
  • 大红门做网站谷歌推广公司哪家好
  • 沈阳做招聘网站搜索关键词排行榜
  • 网站开发 学习互联网广告投放公司
  • 武汉网页网站制作网坛最新排名
  • 牡丹菏泽网站建设湖南seo网站策划
  • 网站制作服务商百度投诉中心入口
  • 网站rss地址生成长春网站建设技术支持
  • 网站建设定制网站建设公司网站技术外包公司
  • 做外贸网站一般多少钱数字营销策略有哪些
  • 网站内页做排名关键词举例
  • 如果你会建网站如何制作小程序
  • 网站怎么发邮件查看今日头条
  • 网站中的qq客服怎么做百度收录好的免费网站