From 4bf2de58672eb572af63679f029f41352964791a Mon Sep 17 00:00:00 2001 From: forgottencsc Date: Tue, 22 Aug 2023 13:12:03 +0800 Subject: [PATCH] fix: apollo components should have emits --- packages/vue-apollo-components/src/ApolloMutation.js | 2 ++ packages/vue-apollo-components/src/ApolloQuery.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/vue-apollo-components/src/ApolloMutation.js b/packages/vue-apollo-components/src/ApolloMutation.js index bd79f54f..2209c41c 100644 --- a/packages/vue-apollo-components/src/ApolloMutation.js +++ b/packages/vue-apollo-components/src/ApolloMutation.js @@ -52,6 +52,8 @@ export default { } }, + emits: [ 'loading', 'done', 'error' ], + watch: { loading (value) { this.$emit('loading', value) diff --git a/packages/vue-apollo-components/src/ApolloQuery.js b/packages/vue-apollo-components/src/ApolloQuery.js index f6099584..5d530927 100644 --- a/packages/vue-apollo-components/src/ApolloQuery.js +++ b/packages/vue-apollo-components/src/ApolloQuery.js @@ -15,6 +15,8 @@ export default { } }, + emits: [ 'loading', 'result', 'error' ], + props: { query: { type: [Function, Object],