Last active
March 22, 2018 08:47
-
-
Save chitoku-k/1d3fac3f5acb5988df63d893772a63ae to your computer and use it in GitHub Desktop.
This file contains 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> | |
<article>{{ message }}</article> | |
</template> | |
<script lang="babel"> | |
module.exports = { | |
computed: { | |
...Vuex.mapState([ | |
'message', | |
]), | |
}, | |
}; | |
</script> | |
<style scoped> | |
article { | |
color: #4904b3; | |
} | |
</style> |
This file contains 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="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>homomaid</title> | |
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script> | |
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script> | |
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.6/vue.js"></script> | |
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/vuex/3.0.1/vuex.min.js"></script> | |
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.0.1/vue-router.min.js"></script> | |
<script defer src="https://unpkg.com/http-vue-loader"></script> | |
<script defer type="text/babel" data-presets="es2017,stage-3" src="router.js"></script> | |
<script defer type="text/babel" data-presets="es2017,stage-3" src="store.js"></script> | |
<script defer type="text/babel" data-presets="es2017,stage-3" src="main.js"></script> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> | |
</html> |
This file contains 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', | |
template: `<router-view></router-view>`, | |
store, | |
router, | |
}); |
This file contains 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
httpVueLoader.langProcessor.babel = script => Babel.transform(script, { presets: ['es2017', 'stage-3'] }).code; | |
const router = new VueRouter({ | |
mode: 'history', | |
routes: [ | |
{ | |
path: '/', | |
component: httpVueLoader('./homomaid.vue'), | |
}, | |
], | |
}); |
This file contains 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
const store = new Vuex.Store({ | |
state: { | |
message: 'かのかのかの〜〜〜www', | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment