Reputation: 3995
export default {
data() {
return {
isLoading: false
};
},
methods: {
async showMore(parentId) {
if (this.isLoading) return;
this.isLoading = true;
await this.someAction({ parentId });
this.isLoading = false;
}
}
}
This code give error: Property 'isLoading' does not exist on type
Upvotes: 0
Views: 607
Reputation: 3995
Need to use defineComponent
wrapper
export default defineComponent({
...
});
Upvotes: 1