From f70446ce8ed768f6680608ac6d17f49920840784 Mon Sep 17 00:00:00 2001 From: kaorun343 <5625395+kaorun343@users.noreply.github.com> Date: Sat, 25 Apr 2020 06:09:02 +0900 Subject: [PATCH] v8.4.2 --- package.json | 2 +- src/vue-property-decorator.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3933b5b..3b0daaa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-property-decorator", - "version": "8.4.1", + "version": "8.4.2", "description": "property decorators for Vue Component", "main": "lib/vue-property-decorator.umd.js", "module": "lib/vue-property-decorator.js", diff --git a/src/vue-property-decorator.ts b/src/vue-property-decorator.ts index e7f0ea8..e81cab7 100644 --- a/src/vue-property-decorator.ts +++ b/src/vue-property-decorator.ts @@ -1,4 +1,4 @@ -/** vue-property-decorator verson 8.4.1 MIT LICENSE copyright 2019 kaorun343 */ +/** vue-property-decorator verson 8.4.2 MIT LICENSE copyright 2019 kaorun343 */ /// 'use strict' import Vue, { PropOptions, WatchOptions } from 'vue' @@ -46,7 +46,7 @@ export function InjectReactive(options?: InjectOptions | InjectKey) { const fromKey = !!options ? (options as any).from || options : key const defaultVal = (!!options && (options as any).default) || undefined if (!componentOptions.computed) componentOptions.computed = {} - componentOptions.computed![key] = function() { + componentOptions.computed![key] = function () { const obj = (this as any)[reactiveInjectKey] return obj ? obj[fromKey] : defaultVal } @@ -62,7 +62,7 @@ interface provideObj { type provideFunc = ((this: any) => Object) & provideObj function produceProvide(original: any) { - let provide: provideFunc = function(this: any) { + let provide: provideFunc = function (this: any) { let rv = typeof original === 'function' ? original.call(this) : original rv = Object.create(rv || null) // set reactive services (propagates previous services if necessary) @@ -261,7 +261,7 @@ const hyphenate = (str: string) => str.replace(hyphenateRE, '-$1').toLowerCase() * @return MethodDecorator */ export function Emit(event?: string) { - return function(_target: Vue, propertyKey: string, descriptor: any) { + return function (_target: Vue, propertyKey: string, descriptor: any) { const key = hyphenate(propertyKey) const original = descriptor.value descriptor.value = function emitter(...args: any[]) { @@ -290,7 +290,7 @@ export function Emit(event?: string) { const returnValue: any = original.apply(this, args) if (isPromise(returnValue)) { - returnValue.then(returnValue => { + returnValue.then((returnValue) => { emit(returnValue) }) } else {