Skip to content

Commit 4c7fd09

Browse files
committed
chore: 🐛 fix install
1 parent 6ddcad0 commit 4c7fd09

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-api-queries",
3-
"version": "0.0.10-alpha.0",
3+
"version": "0.0.10-alpha.1",
44
"description": "Elegant and simple way to build requests for REST API",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { ValidatorType } from './core/Validator'
22
import Validator from './core/Validator'
3-
import _Vue from 'vue'
43

54
// augment typings of Vue.js
65
import './vue'
@@ -9,11 +8,11 @@ export type Errors = ValidatorType
98
export type { ValidatorType }
109

1110
class VueApiQueries {
12-
install(Vue: typeof _Vue) {
13-
Vue.extend({
14-
beforeCreate(this: any) {
11+
install(Vue: any) {
12+
Vue.mixin({
13+
beforeCreate() {
1514
this.$options.$errors = {}
16-
Vue.set(this.$options, '$errors', Validator)
15+
Vue.util.defineReactive(this.$options, '$errors', Validator)
1716
if (!this.$options.computed) {
1817
this.$options.computed = {}
1918
}

0 commit comments

Comments
 (0)