This commit is contained in:
garrettmills
2020-04-21 23:53:00 -05:00
commit 65a20d9501
6 changed files with 12197 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { Component } from './vues6.js'
const template = `
<div>
<h1>{{ message }} (Changes: {{ changes }})</h1>
<h2>{{ tagline }}</h2>
<button type="button" @click="onClick">Click Me!</button>
<input type="text" v-model="message">
</div>
`
export default class HelloWorldComponent {
static get selector() { return 'hello-world' }
static get props() { return ['tagline'] }
static get template() { return template }
message = 'Hello World'
changes = 0
onClick() {
this.message += '!'
}
watch_message(nv, ov) {
this.changes += 1
}
}

7
example/components.js Normal file
View File

@@ -0,0 +1,7 @@
import HelloWorldComponent from './HelloWorld.component.js'
const components = {
HelloWorldComponent,
}
export { components }

25
example/index.html Normal file
View File

@@ -0,0 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<title>VuES6 Test</title>
</head>
<body>
<div id="vue-app">
<hello-world tagline="This is a test!"></hello-world>
</div>
<script src="vue-2.6.11.js"></script>
<script src="vues6.js" type="module"></script>
<script type="module">
import { components } from './components.js'
import VuES6Loader from './vues6.js'
const loader = new VuES6Loader(components)
loader.load()
const app = new Vue({
el: '#vue-app',
data: {}
})
</script>
</body>
</html>

11965
example/vue-2.6.11.js Normal file

File diff suppressed because it is too large Load Diff