0.12.2
Breaking Changes
-
replace
option now defaults totrue
. When you use a component in a parent template, the mount-point element will by default be replaced. This has a few implications:- What you write in the component's template will be what gets eventually rendered.
- You should in most cases include a component's root element in its template. If the template has more than one top-level elements, or only contains text, it becomes a fragment instance.
- Remember the scoping rules still applies: attributes & directives on the mount-point element are compiled in parent scope; those on the root element inside the component's template are compiled in child scope.
If you prefer
replace: false
, or have trouble migrating to this behavior, you can modify the global default by settingVue.options.replace = false
.
Improvements
-
Props initialization has been prioritized; their initial values are now accesible in the
created()
hook and thedata()
function. -
wait-for
component param can now be used on static components too. Update docs -
Partials are back, but with a new syntax that is more inline with the custom-element style API:
<!-- static partial --> <partial name="my-partial"></partial> <!-- dynamic partial --> <partial name="{{partialId}}"></partial>
-
The restriction that
v-component
can only be used on table elements has been relaxed. It is still recommended to use custom-element syntax at all times - thev-component
syntax should only be used in cases where the semantics demand it, e.g. on table/SVG elements, or a generic component that needs to be applied to different element types.
Fixed
- Component that only contains
<content></content>
can now be rendered correctly. - props with
data-
prefix are now stripped and initialized correctly. - #948 Fix repeat instances incorrectly cahced using parent $key
- #949 Fix incorrectly treating inline-template components that only contain one element as fragment instances.
- #953 Fix currency filter floating point precision.
- #961 Fix incorrectly treating prop paths that contain numbers as literal values