Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
505 views
in Technique[技术] by (71.8m points)

vue.js怎么写@@的路径绑定拼接方式?

在vue中使用绑定字符拼接的方式:

 <source :src="'@@/assets/imgs/' + mp4" type="video/mp4">

报错:

GET http://localhost:3000/@@/assets/imgs/trocal.mp4 net::ERR_ABORTED 404 (Not Found)

请问下,这里应该怎么写呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
<source :src="require('@@/assets/imgs/' + mp4)" type="video/mp4">

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...