vue is developed based on the JavaScript language. It is a progressive JavaScript framework for building user interfaces, aiming to better organize and simplify web development. Vue's core library only focuses on the view layer, and is very easy to learn and integrate with other libraries or existing projects.
The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.
vue is a front-end framework based on JavaScript.
Vue (pronounced /vjuː/, similar to view) is a progressive JavaScript framework for building user interfaces, designed to better organize and simplify web development. Unlike other large frameworks, Vue is designed to be applied layer by layer from the bottom up.
Vue’s core library only focuses on the view layer, which is not only easy to get started, but also easy to integrate with third-party libraries or existing projects. On the other hand, when combined with a modern tool chain and various supporting libraries, Vue is fully capable of providing drivers for complex single-page applications (SPA).
Vue.js also provides MVVM data binding and a composable component system, with a simple and flexible API. Its goal is to achieve responsive data binding and composability through the simplest possible API. view component.
beforeCreated:这个钩子函数实在vue实例创建后触发的。这个时候还没有进行data里的数据监听和事件的初始化。 created:组件实例已经完全创建,属性也绑定,但真实dom还没有生成,$el还不可用。 beforeMount:这个进行模板编译,编译模板但是没有元素挂载,无法获取dom。相关的render函数首次被调用。 mounted:元素挂载结束,可以获取dom元素。 beforeUpdata:组件更新前调用,发生在虚拟DOM打补丁之前。 updataed:组件更新后调用。 activited:keep-alive专属,组件被激活时调用。 deactivated:keep-alive 专属,组件被销毁时调用。 beforedestory:vue实例销毁前执行。 destoryed:vue实例销毁之后执行。vue实例销毁后,dom元素还存在但是数据双向绑定,vue的功能就没有了,比如数据双向绑定。
Can be called in the hook functions created, beforeMount, and mounted, because in these three hook functions, data has been created, and the data returned by the server can be assigned.
It is recommended to call asynchronous requests in the created hook function, because calling asynchronous requests in the created hook function has the following advantages:
It can obtain server data faster and reduce page loading time;
ssr does not support beforeMount and mounted hook functions, so placing them in created will help consistency;
[Related recommendations: "vue.js Tutorial"]
The above is the detailed content of What language is vue developed on?. For more information, please follow other related articles on the PHP Chinese website!