Encapsulating aixos into template syntax
What problem does this feature solve?
When I was using axios and Vue to complete API requests, I had a sudden idea: could I encapsulate axios into Vue's template syntax to increase code readability, so can I propose a pull request to complete this function?
What does the proposed API look like?
<div v-get="api" v-response="data" request-type="json" error-code="err">
<!--Or <div v-post="api">-->
<div v-if="err">
Error: {{ err }}
</div>
<div v-else>
The data is {{ data.xxx }}
</div>
</div>