Created
August 9, 2021 05:28
-
-
Save smg99/05972bb26a48287dd719255977491b8f to your computer and use it in GitHub Desktop.
Vue.js - Split single file component into multiple files
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
export {default} from './todo.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
<div> | |
<!-- HTML for todo component --> | |
</div> |
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
export default{ | |
name: 'todo', | |
template: "#todo-template", | |
props: ["prop1", "prop2"], | |
data: function(){ | |
return { | |
} | |
}, | |
methods:{ | |
method1(){ | |
} | |
} | |
} |
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
/*sass styling for todo component*/ |
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
<style src="./todo.sass" lang="sass"></style> | |
<template src="./todo.html" id="todo-template"></template> | |
<script src="./todo.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment