@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.
- package/package.json +1 -1
- package/templates/react/.env +3 -3
- package/templates/react/.env.development +3 -3
- package/templates/react/.env.production +3 -3
- package/templates/react/package.json +1 -1
- package/templates/react/pnpm-lock.yaml +5 -5
- package/templates/react/src/hooks/useForm.ts +77 -0
- package/templates/react/src/layouts/menuConfig.ts +3 -33
- package/templates/react/src/router/index.tsx +0 -39
- package/templates/react/src/stores/app.ts +141 -3
- package/templates/react/src/stores/notification.ts +128 -0
- package/templates/react/src/stores/permission.ts +183 -0
- package/templates/react/src/stores/user.ts +151 -4
- package/templates/react/src/views/home/index.tsx +167 -6
- package/templates/react/src/views/system/user/index.tsx +171 -5
- package/templates/vue/.env +2 -2
- package/templates/vue/.env.development +2 -2
- package/templates/vue/.env.production +2 -2
- package/templates/vue/pnpm-lock.yaml +3307 -3307
- package/templates/vue/src/auto-imports.d.ts +5 -0
- package/templates/vue/src/layouts/menuConfig.ts +3 -33
- package/templates/vue/src/router/index.ts +3 -88
- package/templates/vue/src/stores/app.ts +133 -2
- package/templates/vue/src/stores/notification.ts +172 -0
- package/templates/vue/src/stores/permission.ts +184 -0
- package/templates/vue/src/stores/user.ts +109 -2
- package/templates/vue/src/views/home/index.vue +7 -7
- package/templates/react/src/views/about/index.tsx +0 -40
- package/templates/react/src/views/login/index.tsx +0 -138
- package/templates/react/src/views/register/index.tsx +0 -143
- package/templates/react/src/views/result/fail.tsx +0 -39
- package/templates/react/src/views/result/success.tsx +0 -35
- package/templates/react/src/views/screen/index.tsx +0 -120
- package/templates/react/src/views/system/log/login.tsx +0 -51
- package/templates/react/src/views/system/log/operation.tsx +0 -47
- package/templates/react/src/views/system/menu/index.tsx +0 -62
- package/templates/react/src/views/system/role/index.tsx +0 -63
- package/templates/vue/src/views/about/index.vue +0 -67
- package/templates/vue/src/views/login/index.vue +0 -153
- package/templates/vue/src/views/register/index.vue +0 -169
- package/templates/vue/src/views/result/fail.vue +0 -92
- package/templates/vue/src/views/result/success.vue +0 -92
- package/templates/vue/src/views/screen/index.vue +0 -150
- package/templates/vue/src/views/system/log/login.vue +0 -51
- package/templates/vue/src/views/system/log/operation.vue +0 -47
- package/templates/vue/src/views/system/menu/index.vue +0 -58
- 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
|
-
|