this.$refs.element.style.display = 'none', ts提示类型报错问题 一心想润 2019-02-14 2,071 阅读1分钟 上代码 问题原因 没有声明this.$refs.detailWrapper的类型, 所以ts会出现错误 解决方法: 如下图