VisActor / VisActor/VTable

[Bug] Vue版不触发SelectedClear事件

Open
#3,859 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
TypeScript
Stars
3.7k
Forks
486
Avg merge
1d 19h
Merged PRs (30d)
16

Description

Version

1.18.2

Link to Minimal Reproduction

https://visactor.io/vtable/demo-vue/grammatical-tag/list-table

Steps to Reproduce

复现步骤:

1、打开官网示例
https://visactor.io/vtable/demo-vue/grammatical-tag/list-table

2、使用如下代码
const app = createApp({ template:
<ListTable :options="tableOptions" @onSelectedClear="handleTableSelectedClear" @onSelectedCell="onSelectCell">






`,
data() {
return {
columns: [
{ field: '0', title: '名字1' },
{ field: '1', title: '年龄' },
{ field: '2', title: '性别' },
{ field: '3', title: '爱好' }
],
tableOptions: {
records: new Array(1000).fill(['张三', 18, '男', '🏀', '@example', 'xxx.xxx.xxx.xxx', '12345678901', '正常'])
}
};
},
methods:{
handleTableSelectedClear:function (args) {
alert('SELECTED_CLEAR')
},
onSelectCell:function(args){
alert('SELECTED_SELECT')
}
}
});

app.component('ListTable', VueVTable.ListTable);
app.component('ListColumn', VueVTable.ListColumn);

app.mount(#${CONTAINER_ID});

// release Vue instance, do not copy
window.customRelease = () => {
app.unmount();
};
`

Current Behavior

3、点击单元格,可以正常触发selectedCell事件;点击空白处,没有任何alert提示;非Vue版可以正常触发clear事件

Expected Behavior

期望可以正常触发 selected_clear 事件

Environment
- OS:
- Browser:
- Framework:
Any additional comments?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Vue demo at https://visactor.io/vtable/demo-vue/grammatical-tag/list-table and reproduce the difference between selecting a cell and clicking blank space. Compare the Vue event behavior with the non-Vue version; done means clicking blank space triggers the selected_clear event and the provided alert.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.