Refused to execute inline script because it violates the following Content Security Policy directive

1.前端页面报错

2.造成原因

        是因为我们iframe的本地页面的位置放错了,我们vue页面是spa单页面,我把本地iframe的页面放置到了src里面去了,所以报错了。

3.解决方案

         把iframe放置在public里面就行了。

猜你喜欢

转载自blog.csdn.net/xiao_ju_ju/article/details/138206919