Answer the question
In order to leave comments, you need to log in
How to output multiple lines in a vue.js component?
Today I started learning vue.js, I ran into a problem, googling did not give any results.
In general, there is the following code:
var login = Vue.component('login', {
template: '#login-form',
data: function(){
return {
name: '',
password: '',
labelName: 'Имя',
labelPassword: 'Пароль',
labelSubmit: 'Отправить',
}
},
created: function(){ }
});
new Vue({ el: '#vue-app', components: {login: login}, });
<div id="vue-app">
<login></login>
</div>
<template id="login-form">
<div>@{{ labelName }}</div>
</template>
<template id="login-form">
<div>@{{ labelName }}</div>
<div>@{{ labelPassword }}</div>
</template>
Answer the question
In order to leave comments, you need to log in
<div>
<div>@{{ labelName }}</div>
<div>@{{ labelPassword }}</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question