Skip to content

Commit 3e0319f

Browse files
committed
chore: 🐛 bug fixed
1 parent 37a987d commit 3e0319f

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-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.7",
3+
"version": "0.0.8",
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: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
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'
76

87
export type Errors = ValidatorType
9-
export type { ValidatorType }
108

119
class VueApiQueries {
12-
install(Vue: typeof _Vue) {
10+
install(Vue: any) {
1311
Vue.mixin({
1412
beforeCreate() {
15-
this.$options['$errors'] = {}
16-
Vue.set(this.$options, '$errors', Validator)
13+
this.$options.$errors = {}
14+
Vue.util.defineReactive(this.$options, '$errors', Validator)
1715
if (!this.$options.computed) {
1816
this.$options.computed = {}
1917
}

0 commit comments

Comments
 (0)