+
## Features
- 🦾 Full [axios](https://github.com/axios/axios) feature support
@@ -61,7 +67,7 @@ app.mount('#app')
```javascript
// main.js
-import Vue, { h } from 'vue'
+import Vue from 'vue'
import axios from 'axios'
import { createAxues } from 'axues'
import App from './App.vue'
@@ -70,7 +76,7 @@ const axues = createAxues(axios)
Vue.use(axues.vue2Plugin)
new Vue({
- render: () => h(App)
+ render: h => h(App)
}).$mount('#app')
```
@@ -146,7 +152,7 @@ const { loading: loading3, data: bookData } = useAxues({
})
```
-### Manual execute
+### Manually execute
The above examples all pass an `immediate` configuration, which means it will be executed immediately. If want to execute it manually, we need to call the `action` method returned by `useAxues`.
@@ -186,6 +192,10 @@ const { loading, action } = useAxues({
```
+> ### Why named as `action` instead of `execute` or others?
+>
+> The process from the beginning of a request to the completion of rendering is like a play, where the browser serves as the theater, the JS code as the script, HTML as the actors, and CSS as the props and costumes. As long as the director issues `action` instructions, the actors will perform according to the script. So who is the director? Of course, it's our user.
+
### Built-in debounce
By default, when the `action` is called frequently, it will only be executed if the previous request is completed, otherwise it will be ignored.
@@ -242,7 +252,7 @@ const { error, action, retryTimes, retryCountdown, retry, retrying } = useAxues(
-
Something went error: {{ error }}
+
Something went error: {{ error.message }}
retryTimes: {{ retryTimes }}
@@ -308,7 +318,7 @@ const { loading: loading2, abort: abort2 } = useAxues({ promise: fetchBooks, imm
### Pagination query
-Pagination queries are a very common scenario in web development and using Axios to do pagination is also very simple.
+Pagination queries are a very common scenario in web development and using axues to do pagination is also very simple.
```vue
+
+
+
## Features
- 🦾 Full [axios](https://github.com/axios/axios) feature support
@@ -61,7 +67,7 @@ app.mount('#app')
```javascript
// main.js
-import Vue, { h } from 'vue'
+import Vue from 'vue'
import axios from 'axios'
import { createAxues } from 'axues'
import App from './App.vue'
@@ -70,7 +76,7 @@ const axues = createAxues(axios)
Vue.use(axues.vue2Plugin)
new Vue({
- render: () => h(App)
+ render: h => h(App)
}).$mount('#app')
```
@@ -146,7 +152,7 @@ const { loading: loading3, data: bookData } = useAxues({
})
```
-### Manual execute
+### Manually execute
The above examples all pass an `immediate` configuration, which means it will be executed immediately. If want to execute it manually, we need to call the `action` method returned by `useAxues`.
@@ -186,6 +192,10 @@ const { loading, action } = useAxues({
```
+> ### Why named as `action` instead of `execute` or others?
+>
+> The process from the beginning of a request to the completion of rendering is like a play, where the browser serves as the theater, the JS code as the script, HTML as the actors, and CSS as the props and costumes. As long as the director issues `action` instructions, the actors will perform according to the script. So who is the director? Of course, it's our user.
+
### Built-in debounce
By default, when the `action` is called frequently, it will only be executed if the previous request is completed, otherwise it will be ignored.
@@ -242,7 +252,7 @@ const { error, action, retryTimes, retryCountdown, retry, retrying } = useAxues(
-
Something went error: {{ error }}
+
Something went error: {{ error.message }}
retryTimes: {{ retryTimes }}
@@ -308,7 +318,7 @@ const { loading: loading2, abort: abort2 } = useAxues({ promise: fetchBooks, imm
### Pagination query
-Pagination queries are a very common scenario in web development and using Axios to do pagination is also very simple.
+Pagination queries are a very common scenario in web development and using axues to do pagination is also very simple.
```vue