vue-property-decorator
Advanced tools
Comparing version 7.3.0 to 8.0.0
@@ -1,2 +0,2 @@ | ||
/** vue-property-decorator verson 7.3.0 MIT LICENSE copyright 2018 kaorun343 */ | ||
/** vue-property-decorator verson 8.0.0 MIT LICENSE copyright 2018 kaorun343 */ | ||
import Vue, { PropOptions, WatchOptions } from 'vue'; | ||
@@ -3,0 +3,0 @@ import Component, { mixins } from 'vue-class-component'; |
@@ -1,2 +0,2 @@ | ||
/** vue-property-decorator verson 7.3.0 MIT LICENSE copyright 2018 kaorun343 */ | ||
/** vue-property-decorator verson 8.0.0 MIT LICENSE copyright 2018 kaorun343 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import Vue from 'vue'; |
@@ -10,3 +10,3 @@ (function (global, factory) { | ||
/** vue-property-decorator verson 7.3.0 MIT LICENSE copyright 2018 kaorun343 */ | ||
/** vue-property-decorator verson 8.0.0 MIT LICENSE copyright 2018 kaorun343 */ | ||
'use strict'; | ||
@@ -13,0 +13,0 @@ /** |
{ | ||
"name": "vue-property-decorator", | ||
"version": "7.3.0", | ||
"version": "8.0.0", | ||
"description": "property decorators for Vue Component", | ||
@@ -38,3 +38,3 @@ "main": "lib/vue-property-decorator.umd.js", | ||
"dependencies": { | ||
"vue-class-component": "^6.2.0" | ||
"vue-class-component": "^7.0.1" | ||
}, | ||
@@ -41,0 +41,0 @@ "repository": { |
@@ -22,12 +22,12 @@ # Vue Property Decorator | ||
* `@Emit` | ||
* `@Inject` | ||
* `@Model` | ||
* `@Prop` | ||
* `@Provide` | ||
* `@Watch` | ||
* [`@Emit`](#Emit) | ||
* [`@Inject`](#Provide) | ||
* [`@Model`](#Model) | ||
* [`@Prop`](#Prop) | ||
* [`@Provide`](#Provide) | ||
* [`@Watch`](#Watch) | ||
* `@Component` (**provided by** [vue-class-component](https://github.com/vuejs/vue-class-component)) | ||
* `Mixins` (the helper function named `mixins` **provided by** [vue-class-component](https://github.com/vuejs/vue-class-component)) | ||
### `@Prop(options: (PropOptions | Constructor[] | Constructor) = {})` decorator | ||
### <a id="Prop"></a> `@Prop(options: (PropOptions | Constructor[] | Constructor) = {})` decorator | ||
@@ -39,5 +39,5 @@ ```ts | ||
export default class YourComponent extends Vue { | ||
@Prop(Number) propA!: number | ||
@Prop({ default: 'default value' }) propB!: string | ||
@Prop([String, Boolean]) propC!: string | boolean | ||
@Prop(Number) readonly propA!: number | ||
@Prop({ default: 'default value' }) readonly propB!: string | ||
@Prop([String, Boolean]) readonly propC!: string | boolean | ||
} | ||
@@ -69,3 +69,3 @@ ``` | ||
### `@Model(event?: string, options: (PropOptions | Constructor[] | Constructor) = {})` decorator | ||
### <a id="Model"></a> `@Model(event?: string, options: (PropOptions | Constructor[] | Constructor) = {})` decorator | ||
@@ -77,3 +77,3 @@ ```ts | ||
export default class YourComponent extends Vue { | ||
@Model('change', { type: Boolean }) checked!: boolean | ||
@Model('change', { type: Boolean }) readonly checked!: boolean | ||
} | ||
@@ -98,3 +98,3 @@ ``` | ||
### `@Watch(path: string, options: WatchOptions = {})` decorator | ||
### <a id="Watch"></a> `@Watch(path: string, options: WatchOptions = {})` decorator | ||
@@ -113,3 +113,3 @@ ```ts | ||
@Watch('person') | ||
onChildChanged2(val: Person, oldVal: Person) { } | ||
onPersonChanged2(val: Person, oldVal: Person) { } | ||
} | ||
@@ -151,3 +151,3 @@ ``` | ||
### `@Emit(event?: string)` decorator | ||
### <a id="Emit"></a> `@Emit(event?: string)` decorator | ||
@@ -227,3 +227,3 @@ The functions decorated by `@Emit` `$emit` their return value followed by their original arguments. If the return value is a promise, it is resolved before being emitted. | ||
### `@Provide(key?: string | symbol)` / `@Inject(options?: { from?: InjectKey, default?: any } | InjectKey)` decorator | ||
### <a id="Provide"></a> `@Provide(key?: string | symbol)` / `@Inject(options?: { from?: InjectKey, default?: any } | InjectKey)` decorator | ||
@@ -237,6 +237,6 @@ ```ts | ||
export class MyComponent extends Vue { | ||
@Inject() foo!: string | ||
@Inject('bar') bar!: string | ||
@Inject({ from: 'optional', default: 'default' }) optional!: string | ||
@Inject(symbol) baz!: string | ||
@Inject() readonly foo!: string | ||
@Inject('bar') readonly bar!: string | ||
@Inject({ from: 'optional', default: 'default' }) readonly optional!: string | ||
@Inject(symbol) readonly baz!: string | ||
@@ -243,0 +243,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19233
+ Added@babel/helper-string-parser@7.25.7(transitive)
+ Added@babel/helper-validator-identifier@7.25.7(transitive)
+ Added@babel/parser@7.25.8(transitive)
+ Added@babel/types@7.25.8(transitive)
+ Added@vue/compiler-sfc@2.7.16(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.4.47(transitive)
+ Addedprettier@2.8.8(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedto-fast-properties@2.0.0(transitive)
+ Addedvue@2.7.16(transitive)
+ Addedvue-class-component@7.2.6(transitive)
- Removedvue-class-component@6.3.2(transitive)
Updatedvue-class-component@^7.0.1