"style" is not defined on the instance

来源:6-2 notification之通过方法调用

wsq_wsq

2021-04-26

老师,我写notification,调用的的时候 一直报这个错,
Property or method “style” is not defined on the instance but referenced during render
图片描述
我代码里面都声明了这属性
图片描述
图片描述

写回答

2回答

Jokcy

2021-04-26

你在mounted里面写方法?methods写错了吧?

1
1
wsq_wsq
谢谢老师,我明白了。
2021-04-26
共1条回复

wsq_wsq

提问者

2021-04-26

老师,我知道你意思了,我把style写错地方了,应该写到computed里面。谢谢

1
0

Vue核心技术 Vue+Vue-Router+Vuex+SSR实战精讲

深入讲解Vue核心技术,展示Vue应用开发中的各种问题和解决方案

3168 学习 · 853 问题

查看课程