revolist / revogrid

Powerful virtual data grid smartsheet with advanced customization. Best features from excel plus incredible performance 🔋
https://revolist.github.io/revogrid
MIT License
2.68k stars 167 forks source link

Revogrid new component for cellTemplate #424

Closed jfloww closed 10 months ago

jfloww commented 10 months ago

const myVue = Vue.component('my-component', { props: ['rowIndex'], data: function () { return { count: 0 } }, methods: { iAmClicked(e: any) { this.count++ } }, template: '' }) const columns = [ { name: 'DELIVERY NO', prop: 'deliveryNumber', size: 150 }, { name: 'DETAIL', cellTemplate: TableContainer.VGridVueTemplate(myVue), size: 200 } ]

I want to test for cell onclick action. but have several errors. I have stucked on this error for 3days.. There are two error in my console.

  1. Property 'component' does not exist on type 'typeof import("D:/Projects/.../node_modules/vue/dist/vue")'.
  2. Property 'count' does not exist on type '{ iAmClicked(e: any): void; }'.

Do you guys have any solution for these errors? Thanks in advance.

jfloww commented 10 months ago

Solved the problem