template.js 635 B

123456789101112131415161718192021222324252627
  1. // template.js 文件,放置组件模板的代码
  2. module.exports = {
  3. indexPage: require("./page/indexPage"),
  4. addEditPage: require("./page/addEditPage"),
  5. servicePage: require("./page/servicePage"),
  6. // modelPage: require("./page/modelPage"),
  7. vueTemplate: compoenntName => {
  8. return `<template>
  9. <div class="${compoenntName}">
  10. ${compoenntName}组件
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: '${compoenntName}'
  16. }
  17. </script>
  18. <style lang="scss" scoped>
  19. .${compoenntName} {
  20. }
  21. </style>
  22. `;
  23. },
  24. entryTemplate: `import Main from './main.vue'
  25. export default Main`
  26. };