実現したいこと
Cloud9上のHTMLでVue.jsを使って簡単なタイピングゲームを作る
前提
AWSを学んでいる初心者です。
現在、Cloud9を使ってタイピングゲームを作っています。
しかし、Vue.jsのインスタンスを作ると、エラーが出ます。
どのように直せばよろしいでしょうか?
発生している問題・エラーメッセージ
Vue is not defined, please fix or add /global Vue/
該当のソースコード
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.min.js"></script> <script> new Vue({ el: '#app', data: { trying: false, typingText: '', words: [ 'egg', 'bag', 'rose', 'chair', 'bat', 'fish', 'notebook', 'pencil', 'dog', 'desk' ], solvedWords: [] }, methods: { start() { this.trying = true this.solvedWords = [] Vue.nextTick(() => { document.getElementById('input-typing').focus() }) } },

回答1件
あなたの回答
tips
プレビュー