Skip to content

Commit

Permalink
Remove dependency on vue-axios
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Sep 11, 2023
1 parent b0178e8 commit 9ca19b8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
4 changes: 0 additions & 4 deletions app/assets/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import VueAxios from 'vue-axios'

const app = createApp(App)
app.use(router)
app.use(VueAxios, axios)
app.provide('axios', app.config.globalProperties.axios) // provide 'axios'
app.mount('#app')
5 changes: 3 additions & 2 deletions app/assets/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script>
import axios from 'axios'
export default {
data() {
return {
Expand All @@ -9,8 +11,7 @@ export default {
methods: {
getList() {
this.loading = true
this.axios.get('/api').then((response) => {
// console.log(response.data)
axios.get('/api').then((response) => {
this.resources = response.data
this.loading = false
})
Expand Down
10 changes: 0 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"axios": "^1.5.0",
"uikit": "^3.16.26",
"vue": "^3.3.4",
"vue-axios": "^3.5.2",
"vue-router": "^4.2.4"
},
"devDependencies": {
Expand Down

0 comments on commit 9ca19b8

Please sign in to comment.