A
A
Alex9312022-03-18 20:34:14
JavaScript
Alex931, 2022-03-18 20:34:14

Why is the vue.js code not working?

Hello. I include the vue.js code in the project, but it doesn't work. Please tell me what I'm doing wrong.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>
<body>
    <div id="v-model-basic" class="demo">
        <input v-model="message" placeholder="edit me" />
        <p>Message is: {{ message }}</p>
      </div>
</body>
</html>
<style>
    .demo {
    font-family: sans-serif;
    border: 1px solid grey;
    border-radius: 2px;
    padding: 20px 30px;
    margin-top: 1em;
    margin-bottom: 40px;
    user-select: none;
    overflow-x: auto;
  }
</style>
<script src="https://unpkg.com/[email protected]">
    Vue.createApp({
data() {
return {
  message: ''
}
}
}).mount('#v-model-basic')
</script>

<code>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2022-03-18
@yarkov

What kind of game is this? Have you moved the styles and the script outside the document?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question