new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vue · Tutorial · all subjects

component basics

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

emits can be declared in two forms

Custom events emitted by a component can be declared in two forms: simple form using an array of strings (e.g., emits: ['check']), or full form using an object where each property key is the event name and the value is either null or a validator function.

emits validator receives event arguments

An emits validator function receives the additional arguments passed to this.$emit. For example, if this.$emit('foo', 1) is called, the validator for 'foo' receives the argument 1. The validator should return a boolean to indicate whether the event arguments are valid.

emits affects fallthrough attributes

The emits option affects which event listeners are considered component event listeners rather than native DOM event listeners. Listeners for declared events are removed from the component's $attrs object and will not be passed through to the component's root element.

expose controls which properties are publicly accessible

The expose option declares which properties are exposed on the public component instance when accessed via $parent, $root, or template refs. By default, all instance properties are exposed, but expose limits this to only the explicitly listed property name strings.

expose does not filter built-in component properties

The expose option only affects user-defined properties and does not filter out built-in component instance properties.

Give your agent this brain