Last active
April 26, 2024 08:46
-
-
Save ocpinfo/3b50d23224d032f3e134a8dfb0fb0f22 to your computer and use it in GitHub Desktop.
Use renderjs to support Fetch usage for APP.vue in Uniapp environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The demo code is as below: | |
<template> | |
<view @click="test.qafetch" data-role="button" > | |
<span class="ui-text ">发 送</span> | |
</view> | |
</template> | |
<script module="test" lang="renderjs"> | |
export default { | |
data() { | |
return { | |
title: 'Hello', | |
} | |
}, | |
methods: { | |
async qafetch() { | |
//Just clone from your original 'fetch javascript code' 这里把你原来fetch相关的代码直接复制过来就可以用 | |
}, | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment