v6.0.0
This release supported the new syntax in Vue.js 2.6 🎉
- The shorthand of
v-binddirective with.propmodifier. (actually, this is experimental and behind flag in Vue.js 2.6) - New
v-slotdirective and that shorthand. (https://vuejs.org/v2/api/#v-slot) - New dynamic arguments. (https://vuejs.org/v2/guide/syntax.html#Dynamic-Arguments)
Breaking changes
This release contains a drastic change about VDirectiveKey AST node because now the directive key have gotten to be able to have JavaScript expression.
export interface VDirectiveKey extends HasLocation, HasParent {
type: "VDirectiveKey"
parent: VAttribute
- name: string
- argument: string | null
- modifiers: string[]
- shorthand: boolean
+ name: VIdentifier
+ argument: VExpressionContainer | VIdentifier | null
+ modifiers: VIdentifier[]
}- It changed the members
name,argument, andmodifiersto AST nodes from strings. Especially,argumentwill be aVExpressionContainernode if the directive has dynamic argument syntax. - It removed
shorthandmember. To check wheather the directive key is a shorthand or not, usename.rawNamemember.:foo...directiveKey.name.rawNameis":"(anddirectiveKey.name.nameis"bind")..foo...directiveKey.name.rawNameis"."(anddirectiveKey.name.nameis"bind"anddirectiveKey.modifiersincludes the identifier node of"prop").@foo...directiveKey.name.rawNameis"@"(anddirectiveKey.name.nameis"on").#foo...directiveKey.name.rawNameis"#"(anddirectiveKey.name.nameis"slot").