GithubHelp home page GithubHelp logo

daily-learn-record's Introduction

daily-learn-record

题记

​ 记录个人长期学习知识.

技术路线

  • ​ Html / Css

  • ​ JavaScript

  • ​ TypeScript

  • ​ Angular / Vue / React

  • ​ 移动端....

    TODO

    hello~ 加油!

Vue1:

指令:当表达式的值改变时,产生的影响响应式的作用于DOM

v-bind 指令:可以用于响应式地更新 HTML attribute

v-if 指令:根据表达式 的值的真假来操作元素

v-on 指令:它用于监听 DOM 事件

计算属性(computed)VS 方法(methods)VS 侦听属性(watchers)

1.computed: 挂载在对象上的函数,通常是 Vue 实例本身或 Vue 组件,在模板中声明,Vue实例中调用

2.methods:计算属性对于从现有数据源提取组合新数据时非常方便,它们对 methods 的一大优势是:输出将被缓存。这也意味着如果页面上独立于计算属性的某些内容发生更改并且重新绘制 UI 时,将返回缓存的结果,并不会重新计算 Computed,这样做将大大简化计算步骤,提升处理性能。页面只要重新渲染,方法都会执行一次,而计算属性只有在它的相关依赖发生改变时才会重新求值.在下面的场景,但不限于以下场景中,都可以使用 Vue 的计算属性:

  • 在用户输入时更新大量信息,比如列表的过滤

  • 从 Vuex Store 中收集相关信息

  • 表单验证

  • 数据可视化的变化取决于用户需要看到什么

    3.watchers: 当您想要执行异步操作以响应更改的数据时,watchers 将非常有用。与计算属性类似,会有缓存,只有在它的相关依赖发生改变时才会重新求值

daily-learn-record's People

Contributors

firefly-g avatar ruy9527 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.