SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы

Список вопросов Печать

Пример подключения Vue


Метки: vue.js javascript 

Ответы

RemiZOffAlex  Создано: 2019-01-29 10:36:23.968426  Обновлено: 2019-01-29 10:36:23.968426

Файл index.html

Версия 2

<!DOCTYPE html>
<html>
<head>
    <title>SpecialistOff.NET</title>
    <script src="/static/js/vue.min.js"></script>
</head>
<body>
    <section id="app">{{ message }}</section>
<script>
    var app = new Vue({
      el: '#app',
      data: {
        message: 'SpecialistOff.NET'
      }
    })
</script>
</body>
</html>

Версия 3

<!DOCTYPE html>
<html>
<head>
    <title>SpecialistOff.NET</title>
    <script src="/static/js/vue.min.js"></script>
</head>
<body>
    <section id="app">{{ message }}</section>
<script>
const app = Vue.createApp({
    data() {
return { message: 'SpecialistOff.NET'
} } })
app.mount('#app'); </script> </body> </html>

Возможно будут интересны и другие вопросы