以下是代码:
let args = {
"wz_nav_style": "dots", // dots, tabs, progress
"buttons": true,
"navigation": 'all' // buttons, nav, all
};
const wizard = new wizard(args);
wizard.init();
document.addEventListener("submitWizard", function (e) {
alert("Form Submit");
});我知道错误:
块-作用域变量“向导”在其declaration.ts(2448)之前使用
如何解决这个问题?
发布于 2021-10-16 05:53:02
常量名称wizard将名称相同的构造函数的引用阴影起来。将常量名称更改为构造函数以外的其他名称可以解决这个问题。
const wiz = new wizard(args);
wiz.init();https://stackoverflow.com/questions/69592984
复制相似问题