this.$http.get('#/a.txt').then(function(res){
console.log(res.body);
})
这个值是这样 
可是我的txt内容是几个文字啊,我要怎么才能获取到那个txt里面的数据呢?
还有就是这个a.txt的路径,前面的加上‘#/’,很奇怪,不加的话直接路径报错了。但是我都是放在同一目录下的
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
浏览的路径问题,因为vue-router 默认hash模式,你切换成 history 模式就行了,关于输出内容的问题不太清楚,可能是路径的原因造成的