Releases: facing-dev/vue-facing-decorator
v4.0.0-beta.1
v3.0.4
What's Changed
- 🐛 Fix reactivity for
@Provideby @alecgibson in #81 - 🐛 Avoid emitting
undefinedas a return value by @alecgibson in #82
v3.0.3
v3.0.1 & v3.0.2
Feature
-
Use class constructor name as default component name.
-
@Refdecorator acceptskeyparamater. -
New
@Providedecorator -
Support multi custom decorators on one field.
Document Update
-
@Ref, which acceptskeyparamater. -
New
@Providedecorator
v3.0.0
Description
In v3.0.0, v-f-d is compatible with both decorators API stage 3 and stage 2 now.
Decorators API stage 3
To enable this, you need to update TypeScript to 5.x and set compilerOptions.experimentalDecorators to false (value true for stage 2).
Currently some vue libraries(e.g. Volar) may not compatible with TypeScript 5.x.
Breaking changes
Cast class component to vue options API
Using toNative to cast a class component to vue options API, after that, the casted component could be used as a native vue component in where vue accepts it.
Currently
toNativeis not necessary, because v-f-d use a vue internal API, but it is not stable and may missing in the future vue versions. SotoNativeis recommended.
@Component
export class MyComp extends Vue{}
export default toNative(MyComp)
//Code also works currently:
@Component
export default class MyComp extends Vue{}Deprecate init class property despends on another in constructor
This is not allowed now.
@Component({
name: "MyComponent"
})
export class MyComponent extends Vue {
@Prop
prop!: string
field = this.prop // this is deprecated, it will be undefined
}
export default toNative(MyComponent)Remove index-return-cons
Remove vue-facing-decorator/dist/index-return-cons, you won't need this if toNative exists.
What's new
-
createDecoratorhas a preserve option. see docs. -
v-modelsets event name in emits option now.
v2.1.20
v3.0.0-beta.3
__vccOpts
v3.0.0-beta.2
3.0.0-beta.2