Mixins are a flexible way to distribute reusable functionalities for Vue components. A mixin object can contain any component options. When a component uses a mixin, all options in the mixin will be “mixed” into the component’s own options.
t { auto mixin1 = VUEMixin; auto mixin2 = VUEMixin; assert(VUEComponent.mixins(["test": mixin1]).mixins.length == 1); /* assert(VUEComponent.mixins(["test": mixin1]).mixinsOne("test") == mixin1); assert(VUEComponent.mixins("test", mixin1).mixinsOne("test") == mixin1); assert(VUEComponent.mixins(["test": mixin1, "test2": mixin2]).mixinsOne("test") == mixin1); assert(VUEComponent.mixins(["test": mixin1, "test2": mixin2]).mixinsAll("test") == [mixin1, mixin2]); assert(VUEComponent.mixins("test", mixin1).mixins("test2", mixin2).mixinsOne("test") == mixin1);