1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
| export function useFetch() {
| let backData = ref([])
| let error = ref(null)
|
|
| async function request(url,param){
| const tempData = ref([])
| tempData.value = await this.$http.get(url,{params:param}).then( res => {
| return res.data.data.rows
| })
|
| return tempData.value
| }
| return { backData, error, request }
| }
|
|