我有一个 MetroUI 框架的表格组件;在 Electron 应用程序的 Svelte 组件中,我尝试从表中获取所选项目,该组件为它公开了 data-on-check-click;尝试调用与事件关联的函数会引发错误
metro.js:6704 Uncaught ReferenceError: onCheckClick is not defined at HTMLInputElement.eval (eval at func (metro.js:6687), <anonymous>:3:1)
at Object.exec (metro.js:6700) at HTMLInputElement.<anonymous> (metro.js:26206) at HTMLTableElement.func_event_click_94 (metro.js:1770)
欢迎任何帮助
<script>
function onCheckClick(){
console.log("Click !!");
}
</script>
<p>Brands</p>
<input type="text" data-role="input" data-reveal-button="false">
<p>Select image</p>
<input type="file" data-role="file" data-button-title="...">
<button class="button">Save</button>
<br/>
<table class="table" data-role="table"
data-rows="5"
data-check="true"
data-rows-steps="5, 10"
data-show-activity="false"
data-source="./../public/data/brands.json"
data-on-check-click="onCheckClick()"
>
</table>