AlanLee1996 / wenda-webui

专为 l15y/wenda 闻达平台设计的webui
MIT License
447 stars 67 forks source link

编译完右上角的设置按钮点击后无效 #21

Open keochoi opened 1 year ago

keochoi commented 1 year ago

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)

pengber commented 1 year ago

+1

wertyac commented 1 year ago

+1,如果是run dev没有问题。run build后放在nginx中,会出现这个问题,不知道怎么解决。

wertyac commented 1 year ago

修改方法:const settings = () => { //console.log(currentInstance.ctx.$refs.settingsDialog.visible); currentInstance.proxy.$refs.settingsDialog.visible = true; //不要使用ctx,改成proxy,ctx只在dev时有效。 };