Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |||
en:modul:m291:learningunits:lu04:theorie:02 [2025/01/22 12:11] – [Source] vdemir | en:modul:m291:learningunits:lu04:theorie:02 [2025/01/22 12:14] (aktuell) – [Example of a SFC] vdemir | ||
---|---|---|---|
Zeile 32: | Zeile 32: | ||
- < | - < | ||
- | ==== Example of a SFC ==== | + | {{:en:modul:m291:learningunits:lu04:theorie:vue-component.png? |
- | < | + | |
- | <div class=" | + | |
- | <h1>{{ title }}</ | + | |
- | < | + | |
- | <button @click=" | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | export default { | + | |
- | name: ' | + | |
- | data() { | + | |
- | return { | + | |
- | title: ' | + | |
- | }; | + | |
- | }, | + | |
- | methods: { | + | |
- | changeTitle() { | + | |
- | this.title = 'Title Changed!'; | + | |
- | } | + | |
- | } | + | |
- | }; | + | |
- | </ | + | |
- | + | ||
- | <style scoped> | + | |
- | .hello { | + | |
- | text-align: center; | + | |
- | margin: 20px; | + | |
- | } | + | |
- | button { | + | |
- | background-color: #42b983; | + | |
- | color: white; | + | |
- | border: none; | + | |
- | padding: 10px 15px; | + | |
- | cursor: pointer; | + | |
- | | + | |
- | button: | + | |
- | background-color: | + | |
- | | + | |
- | </ | + | |
- | + | ||
===== Vocabulary ===== | ===== Vocabulary ===== | ||
^ English ^ German ^ | ^ English ^ German ^ |