Open keochoi opened 1 year ago
+1
+1,如果是run dev没有问题。run build后放在nginx中,会出现这个问题,不知道怎么解决。
修改方法:const settings = () => { //console.log(currentInstance.ctx.$refs.settingsDialog.visible); currentInstance.proxy.$refs.settingsDialog.visible = true; //不要使用ctx,改成proxy,ctx只在dev时有效。 };
index-27ea1498.js:1 TypeError: Cannot read properties of undefined (reading 'settingsDialog') at n (index-27ea1498.js:199:97) at createBaseVNode.onClick.e..e. (index-27ea1498.js:199:1102)
at callWithErrorHandling (index-27ea1498.js:1:20642)
at callWithAsyncErrorHandling (index-27ea1498.js:1:20764)
at HTMLButtonElement.a (index-27ea1498.js:1:94699)