$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introdução ao Vue
Search
Manoel Freitas
March 15, 2019
Programming
0
44
Introdução ao Vue
Uma pequena introdução ao vuejs para um workshop feito na Accenture
Manoel Freitas
March 15, 2019
Tweet
Share
More Decks by Manoel Freitas
See All by Manoel Freitas
Atomic Design
manoelfreitasce
0
45
VocÊ conhece sua ferramenta?
manoelfreitasce
0
27
How far english take me in developer's world?
manoelfreitasce
1
20
Other Decks in Programming
See All in Programming
Cap'n Webについて
yusukebe
0
150
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
2
600
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
170
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
330
Cell-Based Architecture
larchanjo
0
140
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.4k
TestingOsaka6_Ozono
o3
0
170
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
560
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
390
gunshi
kazupon
1
110
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
Producing Creativity
orderedlist
PRO
348
40k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Prompt Engineering for Job Search
mfonobong
0
120
So, you think you're a good person
axbom
PRO
0
1.8k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
91
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
210
The untapped power of vector embeddings
frankvandijk
1
1.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
22
Transcript
INTRODUÇÃO AO VUE
INTRODUÇÃO AO VUE
OI EU SOU O ... MANOEL! • Cearence • Há
um ano na Accenture • E em São Paulo • Front End! @manoeljosefneto
O QUE VAMOS VER HOJE? • O que é vue?
• Attribute Binding • Conditional Rendering • List Rendering • Event Handling • Class & Style Binding • Computed Properties • Components
O QUE É VUE ? new Vue({options}) <div id="app"> Vue
age aqui dentro <div> Uma Lib Um framework Um Feiticeiro Ele é demais
EXPRESSÕES E REATIVIDADE {{'OI'}} {{1+ 1}} {{2% 2 === 0?
'par': 'impar'}} {{variavel}}
ATRIBUTE BINDING E DATA BINDING v-bind:atributo="data" O atalho é :
<img :src="image" :alt="altText">
CONDITIONAL RENDERING v-if="expressão" v-else v-else-if="expressão" <div id="app"> <p v-if="correct">Acertou mizeravi!</p>
<p v-else>Errou!!</p> </div> new Vue({ data: { correct: true } })
CONDITIONAL RENDERING v-show="condição" <div id="app"> <p v-show="hide"> Hide and Seek
</p> </div> new Vue({ data: { hide: false } })
CONDITIONAL RENDERING RESUMO • v-if • v-else-if • v-else Remove
completamente o html v-show Adiciona o estilo: display: none no html Ambos avaliam se o html deve ou não ser renderizado
LIST RENDERING v-for=“item in array” :key=“id” <ul v-for=“item in list”
:key=“item.id” > <li>{{item.name}}</li> </ul>
LIST RENDERING v-for=“(item, index) array” :key=“index” <ul v-for=“(item, index) in
list” :key=“index” > <li>{{item}}</li> </ul>
EVENT HANDLING v-on:evento="metodo" O atalho é: @ new Vue({ methods:
{ onMouseOver() { console.log('Over') } } }) <p @mouseover="onMouseOver"> Sobre o mouse </p>
EVENT HANDLING Você pode acessar o evento com a variável
especial $event new Vue({ methods: { onMouseOver($event) { console.log($event) } } }) <p @mouseover="expressão ou método"> Sobre o mouse </p>
CLASS E STYLE BINDING :style="{atributo: valor}" :class="{className: condicional}" <button :class="{
disabledButton: !enabled }"> Botão maroto </button> :class="array de classes " :style="array de atributos" <div class="box" :style="{ backgroundColor: variantColor }"> </div> new Vue({ data: { enabled: true, variantColor: '#acc' } })
COMPUTED PROPERTIES <div id="app"> {{ message.split('').reverse().join('') }} </div> new Vue({
data: { message: 'accenture' } })
COMPUTED PROPERTIES <div id="app"> {{ reversedMessage }} </div> new Vue({
data: { message: 'accenture' }, computed: { reversedMessage() { return this.message.split('').reverser().join('') } } })
COMPONENTS Vue.component('component-name',{options})
OBRIGADO! @manoeljosefneto