德胜云资讯,添加一些关于程序相关的内容,仅供大家学习交流(https://www.wxclwl.com)

网站地图

搜索
德胜云咨询
前端分类 javascript CSS 正则表达式 html 前端框架 typescript Ajax
热门标签:
最新标签:

Vue话说前端57-Vue2 生命周期vue filter过滤器用法深度揭秘,

日期:2023/04/18 16:06作者:陈婉璇人气:

导读:话说前端57-Vue2 生命周期 02:01来自LearningYard学苑 分享兴趣,传播快乐,增长见闻,留下美好! 亲爱的您,这里是LearningYard学苑。...
话说前端57-Vue2 生命周期
02:01来自LearningYard学苑

分享兴趣,传播快乐,增长见闻,留下美好!

亲爱的您,这里是LearningYard学苑。今天小编为大家带来话说前端57-Vue2 生命周期,欢迎您的访问。

Share interests, spread happiness, increase knowledge, and leave a good legacy!

Dear you, this is The LearningYard Academy. Today Xiaobian brings you "Learn how much to know :Java chapter”, welcome your visit.

单/多页应用:SPA单页面应用(SinglePage Web Application),指只有一个主页面的应用,一开始只需要加载一次js、css等相关资源。所有内容都包含在主页面,对每一个功能模块组件化。单页应用跳转,就是切换相关组件,仅仅刷新局部资源。MPA多页面应用 (MultiPage Application),指有多个独立页面的应用,每个页面必须重复加载js、css等相关资源。多页应用跳转,需要整页资源刷新。
Single/multi-page application: SPA SinglePage Web Application refers to an application with only one main page, which only needs to load js, css and other related resources once at first. All contents are contained in the main page, and each functional module is componentized. Single-page application jump is to switch related components and only refresh local resources. MPA MultiPage Application refers to an application with multiple independent pages, and each page must be repeatedly loaded with js, css and other related resources. Multi-page application jump requires a full page resource refresh.
vue的两个版本:
完整版(vue.js)通过引用 vue.js 或 vue.min.js(生成环境) 获得,完整版 Vue 带有编译器,可以直接对 html 中的模板字符串进行渲染。
运行时版(vue.runtime.js)通过引用 vue.runtime.js 或 vue.runtime.min.js 获得,运行时版 Vue 没有编译器,不能渲染 html 中的模板字符。
Two versions of vue:
The full version (Vue.js) is obtained by referencing vue.js or vue.min.js (generation environment). The full version of vue has a compiler and can directly render template strings in html.
Runtime version (Vue.runtime.js) is obtained by referencing vue.runtime.js or vue.runtime.min.js Runtime version vue has no compiler and cannot render template characters in html.
template 和 render:template:用 html 的方式渲染页面,template 可以写在 js 中也可以写在 html 中,完整版 Vue 可直接写 template。render:用 js 的方式渲染页面,可把 template 内的 html 翻译出来,不完整版 Vue 使用 render,用 h 构造出所有的元素。
Template and render:template: render the page in html. template can be written in js or html. The full version of Vue can directly write template. Render: render the page by js, and you can translate the html in the template. The incomplete version of Vue uses Render, and all the elements are constructed by H.
什么是生命周期?每个 Vue 实例在被创建时都要经过一系列的初始化过程,例如,需要设置数据监听、编译模板、将实例挂载到 DOM 并在数据变化时更新 DOM 等。同时在这个过程中也会运行一些叫做生命周期钩子的函数,这给了用户在不同阶段添加自己的代码的机会。
What is life cycle? Every instance of Vue has to go through a series of initialization processes when it is created. For example, it is necessary to set up data listening, compile templates, mount the instance to DOM, and update the DOM when the data changes. At the same time, some functions called life cycle hooks will be run in this process, which gives users the opportunity to add their own code at different stages.

今天的分享就到这里了。

如果您对今天的文章有独特的想法,

欢迎给我们留言,

让我们相约明天。

祝您今天过得开心快乐!

Thats all for todays sharing.

If you have a unique idea for today’s article,

please leave us a message,

and let us meet tomorrow.

I wish you a happy day !

本文由learningyard新学苑原创,如有侵权,请联系我们!

翻译来源于谷歌翻译

编辑&排版|李仕阳

审核|闫庆红

举报/反馈

网站地图

Copyright © 2002-2022 香港德胜云网络 版权所有 | 备案号:蜀ICP备2023007363号-5

声明: 本站内容全部来自互联网,非盈利性网站仅供学习交流