Event modifiers :
stop: prevents the event from bubbling, which is equivalent to calling the event.stopPropagation method
prevent: Prevent the default behavior of the event, which is equivalent to calling the event.preventDefault method
self: trigger the handler only when event.target is the current element itself
once: After the event is bound, it can only be triggered once, and it will not be triggered the second time
capture: causes the event to fire from the top level containing this element down
passive: On the mobile side, when we are listening to element scrolling events, the onscroll event will always be triggered and our web page will become stuck, so when we use this modifier, it is equivalent to adding a .lazy modifier to the onscroll event
native: Let the component listen to the native event of the root element like a built-in HTML tag, otherwise v-on on the component will only listen to custom events
Mouse button modifiers : left left click right right click middle middle click
Keyboard modifiers : keyCode contains
Common keys (enter, tab, delete, space, esc, up...)
System modifier keys (ctrl, alt, meta, shift...)
v-bind modifier :
async: can perform a two-way binding on props
props : Set custom tag attributes to avoid exposing data and preventing HTML structure from being polluted
camel: Change the naming to camel case, such as converting the view-Box attribute name to viewBox
ref: ref is used to register reference information to elements or subcomponents. Reference information will be registered on the $refs object of the parent component. If used on a normal DOM element, the reference points to the DOM element; if used on a child component, the reference points to the component instance .
axios :inbrowsers andnode.js. Supports creating XML requests from browsers, supports nodejs to send http requests, supports conversion of request and response data, and supports automatic conversion of JSON
Routing parameters :params, query, $router.push()
$route and $ router:
$router is an example application of vuerouter, which mainly implements routing jumps. If you want to jump to different paths, use the his.$router.push method .
$route is a route object for jumping. Each route will have a $route object, which is a local object, and can obtain the corresponding name, path, params, query, etc.
Reference data types and primitive data types:
Reference data type: the address is stored in the stack, and the data is stored in the heap; Object, Array, Function, Data, etc.
Basic data types: stored in the stack; Number, String, Boolean, Null and Undefined.
V ue data binding principle:
We need a listener Observer to set the set function for all properties. If the property changes, all subscribers Watcher should be notified. And these Watchers are uniformly stored in the message subscriber Dep, which is more convenient for unified management. After receiving the notification from Dep, Watcher performs corresponding operations to update the view.