TypeError: Function(...) is not a function
wangkangquan opened this issue · 1 comments
wangkangquan commented
- version: 0.13.3
- condition:use regenerator-runtime in uni-app project
my code
<template>
<div class="demo"></div>
</template>
<script>
export default {
components: { },
data() {
return {};
},
mounted() {
this.test1();
},
methods: {
async test1() {
const msg = await this.test2();
console.log('============ ', msg);
},
test2() {
return new Promise(resolve => {
setTimeout(() => {
resolve('hello');
}, 2000);
});
}
}
};
</script>
<style lang="scss" scoped>
</style>
raise an error that says
TypeError: Function(...) is not a function
at Object.cf (http://127.0.0.1:64467/index.worker.js?t=1574069625913:3851:46)
at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
at Object.a34a (http://127.0.0.1:64467/index.worker.js?t=1574069625913:3854:17)
at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
at Object.b2f (http://127.0.0.1:64467/index.worker.js?t=1574069625913:4619:89)
at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
at Module._ (http://127.0.0.1:64467/index.worker.js?t=1574069625913:4679:20)
at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)
at Module.e (http://127.0.0.1:64467/index.worker.js?t=1574069625913:4669:13)
at c (http://127.0.0.1:64467/index.worker.js?t=1574069625913:2020:91)