@lvetechs/create-app 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +1 -1
  2. package/templates/react/.env +3 -3
  3. package/templates/react/.env.development +3 -3
  4. package/templates/react/.env.production +3 -3
  5. package/templates/react/package.json +1 -1
  6. package/templates/react/pnpm-lock.yaml +5 -5
  7. package/templates/react/src/hooks/useForm.ts +77 -0
  8. package/templates/react/src/layouts/menuConfig.ts +3 -33
  9. package/templates/react/src/router/index.tsx +0 -39
  10. package/templates/react/src/stores/app.ts +141 -3
  11. package/templates/react/src/stores/notification.ts +128 -0
  12. package/templates/react/src/stores/permission.ts +183 -0
  13. package/templates/react/src/stores/user.ts +151 -4
  14. package/templates/react/src/views/home/index.tsx +167 -6
  15. package/templates/react/src/views/system/user/index.tsx +171 -5
  16. package/templates/vue/.env +2 -2
  17. package/templates/vue/.env.development +2 -2
  18. package/templates/vue/.env.production +2 -2
  19. package/templates/vue/pnpm-lock.yaml +3307 -3307
  20. package/templates/vue/src/auto-imports.d.ts +5 -0
  21. package/templates/vue/src/layouts/menuConfig.ts +3 -33
  22. package/templates/vue/src/router/index.ts +3 -88
  23. package/templates/vue/src/stores/app.ts +133 -2
  24. package/templates/vue/src/stores/notification.ts +172 -0
  25. package/templates/vue/src/stores/permission.ts +184 -0
  26. package/templates/vue/src/stores/user.ts +109 -2
  27. package/templates/vue/src/views/home/index.vue +7 -7
  28. package/templates/react/src/views/about/index.tsx +0 -40
  29. package/templates/react/src/views/login/index.tsx +0 -138
  30. package/templates/react/src/views/register/index.tsx +0 -143
  31. package/templates/react/src/views/result/fail.tsx +0 -39
  32. package/templates/react/src/views/result/success.tsx +0 -35
  33. package/templates/react/src/views/screen/index.tsx +0 -120
  34. package/templates/react/src/views/system/log/login.tsx +0 -51
  35. package/templates/react/src/views/system/log/operation.tsx +0 -47
  36. package/templates/react/src/views/system/menu/index.tsx +0 -62
  37. package/templates/react/src/views/system/role/index.tsx +0 -63
  38. package/templates/vue/src/views/about/index.vue +0 -67
  39. package/templates/vue/src/views/login/index.vue +0 -153
  40. package/templates/vue/src/views/register/index.vue +0 -169
  41. package/templates/vue/src/views/result/fail.vue +0 -92
  42. package/templates/vue/src/views/result/success.vue +0 -92
  43. package/templates/vue/src/views/screen/index.vue +0 -150
  44. package/templates/vue/src/views/system/log/login.vue +0 -51
  45. package/templates/vue/src/views/system/log/operation.vue +0 -47
  46. package/templates/vue/src/views/system/menu/index.vue +0 -58
  47. package/templates/vue/src/views/system/role/index.vue +0 -59
@@ -1,59 +0,0 @@
1
- <script setup lang="ts">
2
- const roles = [
3
- { id: 1, name: 'admin', label: '超级管理员', description: '拥有所有权限', status: '启用' },
4
- { id: 2, name: 'editor', label: '编辑', description: '可编辑内容', status: '启用' },
5
- { id: 3, name: 'viewer', label: '只读', description: '只能查看', status: '启用' }
6
- ]
7
- </script>
8
-
9
- <template>
10
- <div class="page-container">
11
- <div class="page-header">
12
- <h2>角色管理</h2>
13
- <button class="btn-primary">+ 新增角色</button>
14
- </div>
15
- <table class="data-table">
16
- <thead>
17
- <tr>
18
- <th>ID</th>
19
- <th>角色标识</th>
20
- <th>角色名称</th>
21
- <th>描述</th>
22
- <th>状态</th>
23
- <th>操作</th>
24
- </tr>
25
- </thead>
26
- <tbody>
27
- <tr v-for="role in roles" :key="role.id">
28
- <td>{{ role.id }}</td>
29
- <td><code>{{ role.name }}</code></td>
30
- <td>{{ role.label }}</td>
31
- <td>{{ role.description }}</td>
32
- <td>
33
- <span :class="role.status === '启用' ? 'status-active' : 'status-disabled'">
34
- {{ role.status }}
35
- </span>
36
- </td>
37
- <td>
38
- <button class="btn-link">编辑</button>
39
- <button class="btn-link">权限</button>
40
- <button class="btn-link danger">删除</button>
41
- </td>
42
- </tr>
43
- </tbody>
44
- </table>
45
- </div>
46
- </template>
47
-
48
- <style scoped lang="scss">
49
- @import '@/styles/page-common.scss';
50
-
51
- code {
52
- background: var(--bg-color-page);
53
- padding: 2px 8px;
54
- border-radius: 3px;
55
- font-size: 13px;
56
- color: var(--primary-color);
57
- }
58
- </style>
59
-