this.$refs.element.style.display = 'none', ts提示类型报错问题

2,071 阅读1分钟

上代码

问题原因

没有声明this.$refs.detailWrapper的类型, 所以ts会出现错误

解决方法: 如下图