vue.resource()方法和api.json文件

问题描述 投票:0回答:1

https://coding.net/u/benbenshi/p/vue-admin-test/git


DataService.js

现在,我有一个具有这样的结构的文件:我应该根据

// baseConfig.vue <template> <div class="system-base"> <el-input type="text"> <template slot="prepend">userInput:</template> </el-input> </div> <div> <el-button @click="somefunction">confirm</el-button> </div> </template> <script> import dataservice from '../../services/DataService' export default { components: {}, data () { return {} }, computed: {}, methods: { // what should I do here? Should I write some function to handle the confirm event? }, } </script> 文件中提供的API在api.json

文件中写入该功能吗?
dataServices.js
任何帮助都将不胜感激!

	
您可以从
-Hackernews-2.0
代码中获取参考,您可以执行任何要做的操作,而不是致电
api.json

重定向到所需的页面。这是
雷普
的剥离代码:

//api.json { "id": "", "name": "api", "description": "", "order": [], "folders": [], "timestamp": 1234567, "owner": "1234567", "public": false, "requests": [ // a lot of request api here. ] }
javascript vue.js web-services postman
1个回答
0
投票
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.