1👍
You should be able to just move the code from the component to each different file and export them as default.
An example for data
below:
// data.ts
const data = function() {
return {
//data here
}
}
export default data
And then use it in the component
export default Vue.extend({
name: "custom-component",
data
});
But I would strongly discourage this. You should split your code based on concerns not on structure of the objects. Navigating between all this components for the simplest of tasks will be a great pain.
- [Vuejs]-Is there a way to use Conditional Rendering within List Rendering (v-for) in Vue JS
- [Vuejs]-Vue How to seperate forloop button table into different row in table
Source:stackexchange.com