Vue_learning_1.1

Vue_learning_1.1

1.SFC && Component API styles:

1.1 SFC

Before we learn vue we have to know two definitions .

the first definition is SFC .

we author Vue components using an HTML-like file format called Single-File Component

A Vue SFC encapsulates the component's logic (JavaScript), template (HTML), and styles (CSS) in a single file. Here's the previous example, written in SFC format:

An SFC is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written inside a .vue file.

1.2 Vue components API styles

the Second definition is Component Api styles.

Vue components can be authored in two different API styles:

Options API and Composition API.

In fact, the Options API is implemented on top of the Composition API!

Options API

we define a component's logic using an object of options Properties defined by options are exposed on this inside functions, which points to the component instance

The Options API is centered around the concept of a "component instance"

Composition API.

The Composition API is centered around declaring reactive state variables directly in a function scope and composing state from multiple functions together to handle complexity

2.The core feature of Vue

2.1 declarative rendering

three steps:
1.define reactive state properties
2.write template
3.render template

2.2 how to render

1.render dynamic text

2.render attribute

3.render event listener

4.form binding

5.conditionally render

6.list render

二.than

core future of the vue :

1.derective randering

1.1:.html->javascript state -> reactive state ->

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值