Skip to content

Releases: facing-dev/vue-facing-decorator

v4.0.0-beta.1

v3.0.4

20 Dec 09:32
Compare
Choose a tag to compare

What's Changed

v3.0.3

28 Sep 12:32
Compare
Choose a tag to compare
@Component({
    methods: {
        foo() {

        }
    }
})
class MyComponent extends Vue {

}

v3.0.1 & v3.0.2

23 Aug 10:50
Compare
Choose a tag to compare

Feature

  1. Use class constructor name as default component name.

  2. @Ref decorator accepts key paramater.

  3. New @Provide decorator

  4. Support multi custom decorators on one field.

Document Update

  1. @Ref, which accepts key paramater.

  2. New @Provide decorator

v3.0.0

29 Jul 18:09
Compare
Choose a tag to compare

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 toNative is not necessary, because v-f-d use a vue internal API, but it is not stable and may missing in the future vue versions. So toNative is 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

  • createDecorator has a preserve option. see docs.

  • v-model sets event name in emits option now.

v2.1.20

07 Apr 10:50
Compare
Choose a tag to compare

custom decorator

v3.0.0-beta.3

07 Apr 07:51
Compare
Choose a tag to compare

__vccOpts

v3.0.0-beta.2

02 Apr 12:39
Compare
Choose a tag to compare
3.0.0-beta.2

v2.1.19

01 Apr 17:19
Compare
Choose a tag to compare

mixins function

v2.1.18

01 Apr 03:07
Compare
Choose a tag to compare

emit