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.
1. What language is vue based on?
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.
2. What life cycle functions does vue have? Vue hook function?
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的功能就没有了,比如数据双向绑定。
3. Which hook function can request data and why?
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!

vue中props可以传递函数;vue中可以将字符串、数组、数字和对象作为props传递,props主要用于组件的传值,目的为了接收外面传过来的数据,语法为“export default {methods: {myFunction() {// ...}}};”。

本篇文章带大家聊聊vue指令中的修饰符,对比一下vue中的指令修饰符和dom事件中的event对象,介绍一下常用的事件修饰符,希望对大家有所帮助!

如何覆盖组件库样式?下面本篇文章给大家介绍一下React和Vue项目中优雅地覆盖组件库样式的方法,希望对大家有所帮助!

react与vue的虚拟dom没有区别;react和vue的虚拟dom都是用js对象来模拟真实DOM,用虚拟DOM的diff来最小化更新真实DOM,可以减小不必要的性能损耗,按颗粒度分为不同的类型比较同层级dom节点,进行增、删、移的操作。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function