This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Hello World</title> | |
<script type="module" src="./js/app.js"></script> | |
</head> | |
<body> | |
<h1>Static HTML With Vue.js Single File Component</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from '/web_modules/vue/dist/vue.esm.browser.js' | |
import httpVueLoader from '/web_modules/http-vue-loader/src/httpVueLoader.js' | |
const App = new Vue({ | |
el: '#app', | |
components: { | |
'app-world': httpVueLoader('/js/components/AppWorld.vue') | |
}, | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<span>World</span> | |
</template> | |
<script> | |
module.exports = { | |
mounted () { | |
console.log('Hello World') | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Vue({ | |
el: '#app', | |
components: { | |
'app-world': httpVueLoader('/js/components/AppWorld.vue') | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Hello World</title> | |
<script src="https://unpkg.com/vue"></script> | |
<script src="https://unpkg.com/http-vue-loader"></script> | |
</head> | |
<body> | |
<h1>Static HTML With Vue.js Single File Component</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
const WindowInstanceMap = new Vue({ | |
data() { | |
return { | |
scrollY: 0 | |
} | |
}, | |
created() { | |
window.addEventListener('scroll', e => { |