vue读取本地json文件
方法一(我用的):import test_mcc_json from '@/assets/data/test_mcc.json'方法二:import axios from 'axios'Vue.prototype.$http=axiosthis.$http.get('../../static/data.json').then((response) => {c...
·
方法一(我用的):
import test_mcc_json from '@/assets/data/test_mcc.json'
方法二:
import axios from 'axios'
Vue.prototype.$http=axios
this.$http.get('../../static/data.json').then((response) => {
console.log(response);
});}
更多推荐



所有评论(0)