Index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <div class="hello-index">
  3. <el-card>
  4. <template #header>
  5. <div class="card-header">
  6. <span>👋 Hello World - 欢迎使用扩展模块</span>
  7. <el-tag type="success">来自 six-shop/hello</el-tag>
  8. </div>
  9. </template>
  10. <div class="module-intro">
  11. <h2>🎉 模块化开发示例</h2>
  12. <p style="color: #606266; line-height: 1.8;">
  13. 这是一个来自 <code>backend/vendor/six-shop/hello</code> 扩展包的页面。
  14. 所有路由和菜单都已经自动注册,无需手动配置!
  15. </p>
  16. <el-alert
  17. title="✨ 特性展示"
  18. type="success"
  19. :closable="false"
  20. show-icon
  21. style="margin: 20px 0;"
  22. >
  23. <template #default>
  24. <ul style="margin: 10px 0; padding-left: 20px;">
  25. <li>✅ 自动路由注册</li>
  26. <li>✅ 菜单自动加载</li>
  27. <li>✅ 权限控制支持</li>
  28. <li>✅ 热更新支持</li>
  29. <li>✅ 页面缓存 (keepAlive)</li>
  30. </ul>
  31. </template>
  32. </el-alert>
  33. <div class="quick-actions" style="margin-top: 30px;">
  34. <h3>🚀 快速导航</h3>
  35. <el-space wrap>
  36. <el-button type="primary" @click="$router.push('/hello/about')">
  37. <el-icon><InfoFilled /></el-icon>
  38. 关于模块
  39. </el-button>
  40. <el-button type="success" @click="$router.push('/hello/demo')">
  41. <el-icon><Grid /></el-icon>
  42. 功能演示
  43. </el-button>
  44. </el-space>
  45. </div>
  46. <div class="code-info" style="margin-top: 30px;">
  47. <h3>📁 文件位置</h3>
  48. <pre style="background: #f5f7fa; padding: 15px; border-radius: 4px; overflow-x: auto;">
  49. 配置文件:backend/vendor/six-shop/hello/frontend/admin/index.js
  50. 首页组件:backend/vendor/six-shop/hello/frontend/admin/views/Index.vue
  51. 关于页面:backend/vendor/six-shop/hello/frontend/admin/views/About.vue
  52. 演示页面:backend/vendor/six-shop/hello/frontend/admin/views/Demo.vue</pre>
  53. </div>
  54. </div>
  55. </el-card>
  56. </div>
  57. </template>
  58. <script setup>
  59. import { InfoFilled, Grid } from '@element-plus/icons-vue'
  60. </script>
  61. <style scoped>
  62. .hello-index {
  63. padding: 20px;
  64. }
  65. .card-header {
  66. display: flex;
  67. justify-content: space-between;
  68. align-items: center;
  69. }
  70. .module-intro h2,
  71. .quick-actions h3,
  72. .code-info h3 {
  73. margin-bottom: 15px;
  74. color: #303133;
  75. }
  76. .module-intro p {
  77. font-size: 14px;
  78. }
  79. .module-intro code {
  80. background: #f0f0f0;
  81. padding: 2px 6px;
  82. border-radius: 3px;
  83. color: #c7254e;
  84. font-family: 'Courier New', monospace;
  85. }
  86. .quick-actions,
  87. .code-info {
  88. padding: 20px;
  89. background: #f5f7fa;
  90. border-radius: 4px;
  91. }
  92. .code-info pre {
  93. font-family: 'Courier New', monospace;
  94. font-size: 13px;
  95. line-height: 1.8;
  96. color: #606266;
  97. }
  98. </style>