如何识别在类星体表中选择的单元格? [英] How do I identify the cell selected in a Quasar table?

查看:25
本文介绍了如何识别在类星体表中选择的单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何识别 Quasar 表中选定的单元格?

How do I identify the cell selected in a Quasar table?

我的目标是,一旦我确定了选定的单元格,如果用户单击自定义按钮,我会将选定的单元格信息传递到弹出页面.

My goal is that once I identify the cell selected, if the user clicks on a custom button, I pass the selected cell information to a pop up page.

注意我没有使用行选择复选框.

Note I'm not using the row selection checkboxes.

我们希望能够从类星体表的给定列中选择多个单元格.我相信这将需要自定义选择功能.

we want to be able to select multiple cells from a given column in a quasar table. I believe that this will take a custom selection capability.

推荐答案

您可以使用数据 index 存档选择.多行选择请参考以下codepen.

You can archive the selection using the data index. Please refer the following codepen for multiple row selection.

https://codepen.io/anon/pen/PrNBpV

对于单元格选择,请参考这个.

And for cell selection refer this.

https://codepen.io/anon/pen/gNrdyL?editors=1010

试试这个

  <q-td key="desc" :props="props" v-for="col in props.cols" :key="col.name" @click.native="selectRow(props.row.__index,col.name)" :class="selected.hasOwnProperty(props.row.__index) && selected[props.row.__index].indexOf(col.name)!=-1?'bg-grey-2':''">
              {{ props.row[col.field] }}
            </q-td>

这篇关于如何识别在类星体表中选择的单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆