@befly-addon/admin 1.0.19 → 1.0.21

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@befly-addon/admin",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Befly - 管理后台功能组件",
5
5
  "type": "module",
6
6
  "private": false,
@@ -39,8 +39,8 @@
39
39
  "url": "https://github.com/chenbimo/befly.git",
40
40
  "directory": "packages/addon-admin"
41
41
  },
42
- "gitHead": "492e46d692787e6d141659fba27c26e030cd1181",
42
+ "gitHead": "78e963d8659b9f517058145b6baf2678e13eabe5",
43
43
  "dependencies": {
44
- "befly": "3.8.10"
44
+ "befly": "3.8.11"
45
45
  }
46
46
  }
@@ -5,14 +5,16 @@
5
5
  <h1 class="error-title">无权限访问</h1>
6
6
  <p class="error-description">抱歉,您没有访问该页面的权限</p>
7
7
  <div class="error-actions">
8
- <tiny-button type="primary" @click="$Method.goHome">返回首页</tiny-button>
9
- <tiny-button @click="$Method.goBack">返回上一页</tiny-button>
8
+ <TinyButton type="primary" @click="$Method.goHome">返回首页</TinyButton>
9
+ <TinyButton @click="$Method.goBack">返回上一页</TinyButton>
10
10
  </div>
11
11
  </div>
12
12
  </div>
13
13
  </template>
14
14
 
15
- <script setup lang="ts">
15
+ <script setup>
16
+ import { useRouter, useRoute } from 'vue-router';
17
+ import { Button as TinyButton } from '@opentiny/vue';
16
18
  import { useRouter } from 'vue-router';
17
19
 
18
20
  const router = useRouter();
@@ -1,40 +1,41 @@
1
1
  <template>
2
- <tiny-dialog-box v-model:visible="$Data.visible" :title="$Prop.actionType === 'upd' ? '编辑管理员' : '添加管理员'" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="10vh" @close="$Method.onClose">
3
- <tiny-form :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
4
- <tiny-form-item label="用户名" prop="username">
5
- <tiny-input v-model="$Data.formData.username" placeholder="请输入用户名" :disabled="$Prop.actionType === 'upd'" />
6
- </tiny-form-item>
7
- <tiny-form-item label="邮箱" prop="email">
8
- <tiny-input v-model="$Data.formData.email" placeholder="请输入邮箱" />
9
- </tiny-form-item>
10
- <tiny-form-item v-if="$Prop.actionType === 'add'" label="密码" prop="password">
11
- <tiny-input v-model="$Data.formData.password" type="password" placeholder="请输入密码,至少6位" />
12
- </tiny-form-item>
13
- <tiny-form-item label="姓名" prop="name">
14
- <tiny-input v-model="$Data.formData.name" placeholder="请输入姓名" />
15
- </tiny-form-item>
16
- <tiny-form-item label="昵称" prop="nickname">
17
- <tiny-input v-model="$Data.formData.nickname" placeholder="请输入昵称" />
18
- </tiny-form-item>
19
- <tiny-form-item label="手机号" prop="phone">
20
- <tiny-input v-model="$Data.formData.phone" placeholder="请输入手机号" />
21
- </tiny-form-item>
22
- <tiny-form-item v-if="$Prop.actionType === 'upd'" label="状态" prop="state">
23
- <tiny-radio-group v-model="$Data.formData.state">
24
- <tiny-radio :label="1">正常</tiny-radio>
25
- <tiny-radio :label="2">禁用</tiny-radio>
26
- </tiny-radio-group>
27
- </tiny-form-item>
28
- </tiny-form>
2
+ <TinyDialogBox v-model:visible="$Data.visible" :title="$Prop.actionType === 'upd' ? '编辑管理员' : '添加管理员'" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="10vh" @close="$Method.onClose">
3
+ <TinyForm :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
4
+ <TinyFormItem label="用户名" prop="username">
5
+ <TinyInput v-model="$Data.formData.username" placeholder="请输入用户名" :disabled="$Prop.actionType === 'upd'" />
6
+ </TinyFormItem>
7
+ <TinyFormItem label="邮箱" prop="email">
8
+ <TinyInput v-model="$Data.formData.email" placeholder="请输入邮箱" />
9
+ </TinyFormItem>
10
+ <TinyFormItem v-if="$Prop.actionType === 'add'" label="密码" prop="password">
11
+ <TinyInput v-model="$Data.formData.password" type="password" placeholder="请输入密码,至少6位" />
12
+ </TinyFormItem>
13
+ <TinyFormItem label="姓名" prop="name">
14
+ <TinyInput v-model="$Data.formData.name" placeholder="请输入姓名" />
15
+ </TinyFormItem>
16
+ <TinyFormItem label="昵称" prop="nickname">
17
+ <TinyInput v-model="$Data.formData.nickname" placeholder="请输入昵称" />
18
+ </TinyFormItem>
19
+ <TinyFormItem label="手机号" prop="phone">
20
+ <TinyInput v-model="$Data.formData.phone" placeholder="请输入手机号" />
21
+ </TinyFormItem>
22
+ <TinyFormItem v-if="$Prop.actionType === 'upd'" label="状态" prop="state">
23
+ <TinyRadioGroup v-model="$Data.formData.state">
24
+ <TinyRadio :label="1">正常</TinyRadio>
25
+ <TinyRadio :label="2">禁用</TinyRadio>
26
+ </TinyRadioGroup>
27
+ </TinyFormItem>
28
+ </TinyForm>
29
29
  <template #footer>
30
- <tiny-button @click="$Method.onClose">取消</tiny-button>
31
- <tiny-button type="primary" @click="$Method.onSubmit">确定</tiny-button>
30
+ <TinyButton @click="$Method.onClose">取消</TinyButton>
31
+ <TinyButton type="primary" @click="$Method.onSubmit">确定</TinyButton>
32
32
  </template>
33
- </tiny-dialog-box>
33
+ </TinyDialogBox>
34
34
  </template>
35
35
 
36
36
  <script setup>
37
- import { ref, shallowRef } from 'vue';
37
+ import { shallowRef } from 'vue';
38
+ import { Button as TinyButton, DialogBox as TinyDialogBox, Form as TinyForm, FormItem as TinyFormItem, Input as TinyInput, Radio as TinyRadio, RadioGroup as TinyRadioGroup, Modal } from '@opentiny/vue';
38
39
  import { Modal } from '@opentiny/vue';
39
40
 
40
41
  const $Prop = defineProps({
@@ -1,22 +1,23 @@
1
1
  <template>
2
- <tiny-dialog-box v-model:visible="$Data.visible" title="分配角色" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="20vh" @close="$Method.onClose">
2
+ <TinyDialogBox v-model:visible="$Data.visible" title="分配角色" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="20vh" @close="$Method.onClose">
3
3
  <div class="role-dialog">
4
4
  <div class="user-info">
5
- <tiny-tag type="info">{{ $Prop.rowData.username }}</tiny-tag>
5
+ <TinyTag type="info">{{ $Prop.rowData.username }}</TinyTag>
6
6
  <span class="user-email">{{ $Prop.rowData.email }}</span>
7
7
  </div>
8
8
  <tiny-divider />
9
- <tiny-select v-model="$Data.checkedRoleCode" :options="$Data.roleOptions" placeholder="请选择角色" />
9
+ <TinySelect v-model="$Data.checkedRoleCode" :options="$Data.roleOptions" placeholder="请选择角色" />
10
10
  </div>
11
11
  <template #footer>
12
- <tiny-button @click="$Method.onClose">取消</tiny-button>
13
- <tiny-button type="primary" @click="$Method.onSubmit">确定</tiny-button>
12
+ <TinyButton @click="$Method.onClose">取消</TinyButton>
13
+ <TinyButton type="primary" @click="$Method.onSubmit">确定</TinyButton>
14
14
  </template>
15
- </tiny-dialog-box>
15
+ </TinyDialogBox>
16
16
  </template>
17
17
 
18
18
  <script setup>
19
- import { ref } from 'vue';
19
+ import { shallowRef } from 'vue';
20
+ import { Button as TinyButton, DialogBox as TinyDialogBox, Select as TinySelect, Tag as TinyTag, Modal } from '@opentiny/vue';
20
21
  import { Modal } from '@opentiny/vue';
21
22
 
22
23
  const $Prop = defineProps({
@@ -2,71 +2,71 @@
2
2
  <div class="page-admin page-table">
3
3
  <div class="main-tool">
4
4
  <div class="left">
5
- <tiny-button type="primary" @click="$Method.onAction('add', {})">
5
+ <TinyButton type="primary" @click="$Method.onAction('add', {})">
6
6
  <template #icon>
7
- <i-lucide:plus />
7
+ <IconLucidePlus />
8
8
  </template>
9
9
  添加管理员
10
- </tiny-button>
10
+ </TinyButton>
11
11
  </div>
12
12
  <div class="right">
13
- <tiny-button @click="$Method.handleRefresh">
13
+ <TinyButton @click="$Method.handleRefresh">
14
14
  <template #icon>
15
- <i-lucide:rotate-cw />
15
+ <IconLucideRotateCw />
16
16
  </template>
17
- </tiny-button>
17
+ </TinyButton>
18
18
  </div>
19
19
  <div class="right">
20
- <tiny-button @click="$Method.handleRefresh">
20
+ <TinyButton @click="$Method.handleRefresh">
21
21
  <template #icon>
22
- <i-lucide:rotate-cw />
22
+ <IconLucideRotateCw />
23
23
  </template>
24
24
  刷新
25
- </tiny-button>
25
+ </TinyButton>
26
26
  </div>
27
27
  </div>
28
28
 
29
29
  <div class="main-table">
30
- <tiny-grid :data="$Data.tableData" header-cell-class-name="custom-table-cell-class" size="small" height="100%" seq-serial>
31
- <tiny-grid-column type="index" title="序号" :width="60" />
32
- <tiny-grid-column field="username" title="用户名" />
33
- <tiny-grid-column field="email" title="邮箱" :width="200" />
34
- <tiny-grid-column field="nickname" title="昵称" :width="150" />
35
- <tiny-grid-column field="roleCode" title="角色" :width="120" />
36
- <tiny-grid-column field="state" title="状态" :width="100">
30
+ <TinyGrid :data="$Data.tableData" header-cell-class-name="custom-table-cell-class" size="small" height="100%" seq-serial>
31
+ <TinyGridColumn type="index" title="序号" :width="60" />
32
+ <TinyGridColumn field="username" title="用户名" />
33
+ <TinyGridColumn field="email" title="邮箱" :width="200" />
34
+ <TinyGridColumn field="nickname" title="昵称" :width="150" />
35
+ <TinyGridColumn field="roleCode" title="角色" :width="120" />
36
+ <TinyGridColumn field="state" title="状态" :width="100">
37
37
  <template #default="{ row }">
38
- <tiny-tag v-if="row.state === 1" type="success">正常</tiny-tag>
39
- <tiny-tag v-else-if="row.state === 2" type="warning">禁用</tiny-tag>
40
- <tiny-tag v-else type="danger">已删除</tiny-tag>
38
+ <TinyTag v-if="row.state === 1" type="success">正常</TinyTag>
39
+ <TinyTag v-else-if="row.state === 2" type="warning">禁用</TinyTag>
40
+ <TinyTag v-else type="danger">已删除</TinyTag>
41
41
  </template>
42
- </tiny-grid-column>
43
- <tiny-grid-column title="操作" :width="120" align="right">
42
+ </TinyGridColumn>
43
+ <TinyGridColumn title="操作" :width="120" align="right">
44
44
  <template #default="{ row }">
45
- <tiny-dropdown title="操作" trigger="click" size="small" border visible-arrow @item-click="(data) => $Method.onAction(data.itemData.command, row)">
45
+ <TinyDropdown title="操作" trigger="click" size="small" border visible-arrow @item-click="(data) => $Method.onAction(data.itemData.command, row)">
46
46
  <template #dropdown>
47
- <tiny-dropdown-menu>
48
- <tiny-dropdown-item :item-data="{ command: 'role' }">
49
- <i-lucide:user style="width: 14px; height: 14px; margin-right: 6px" />
47
+ <TinyDropdownMenu>
48
+ <TinyDropdownItem :item-data="{ command: 'role' }">
49
+ <IconLucideUser />
50
50
  分配角色
51
- </tiny-dropdown-item>
52
- <tiny-dropdown-item :item-data="{ command: 'upd' }">
53
- <i-lucide:pencil style="width: 14px; height: 14px; margin-right: 6px" />
51
+ </TinyDropdownItem>
52
+ <TinyDropdownItem :item-data="{ command: 'upd' }">
53
+ <IconLucidePencil />
54
54
  编辑
55
- </tiny-dropdown-item>
56
- <tiny-dropdown-item :item-data="{ command: 'del' }" divided>
57
- <i-lucide:trash-2 style="width: 14px; height: 14px; margin-right: 6px" />
55
+ </TinyDropdownItem>
56
+ <TinyDropdownItem :item-data="{ command: 'del' }" divided>
57
+ <IconLucideTrash2 style="width: 14px; height: 14px; margin-right: 6px" />
58
58
  删除
59
- </tiny-dropdown-item>
60
- </tiny-dropdown-menu>
59
+ </TinyDropdownItem>
60
+ </TinyDropdownMenu>
61
61
  </template>
62
- </tiny-dropdown>
62
+ </TinyDropdown>
63
63
  </template>
64
- </tiny-grid-column>
65
- </tiny-grid>
64
+ </TinyGridColumn>
65
+ </TinyGrid>
66
66
  </div>
67
67
 
68
68
  <div class="main-page">
69
- <tiny-pager :current-page="$Data.pagerConfig.currentPage" :page-size="$Data.pagerConfig.pageSize" :total="$Data.pagerConfig.total" @current-change="$Method.onPageChange" @size-change="$Method.handleSizeChange" />
69
+ <TinyPager :current-page="$Data.pagerConfig.currentPage" :page-size="$Data.pagerConfig.pageSize" :total="$Data.pagerConfig.total" @current-change="$Method.onPageChange" @size-change="$Method.handleSizeChange" />
70
70
  </div>
71
71
 
72
72
  <!-- 编辑对话框组件 -->
@@ -78,8 +78,12 @@
78
78
  </template>
79
79
 
80
80
  <script setup>
81
- import { ref } from 'vue';
82
- import { Modal } from '@opentiny/vue';
81
+ import { Button as TinyButton, Grid as TinyGrid, GridColumn as TinyGridColumn, Tag as TinyTag, Dropdown as TinyDropdown, DropdownMenu as TinyDropdownMenu, DropdownItem as TinyDropdownItem, Pager as TinyPager, Modal } from '@opentiny/vue';
82
+ import IconLucidePlus from '~icons/lucide/plus';
83
+ import IconLucideRotateCw from '~icons/lucide/rotate-cw';
84
+ import IconLucidePencil from '~icons/lucide/pencil';
85
+ import IconLucideUser from '~icons/lucide/user';
86
+ import IconLucideTrash2 from '~icons/lucide/trash-2';
83
87
 
84
88
  import EditDialog from './components/edit.vue';
85
89
  import RoleDialog from './components/role.vue';
@@ -1,40 +1,41 @@
1
1
  <template>
2
- <tiny-dialog-box v-model:visible="$Data.visible" :title="$Prop.actionType === 'upd' ? '编辑字典' : '添加字典'" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="10vh" @close="$Method.onClose">
3
- <tiny-form :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
4
- <tiny-form-item label="字典名称" prop="name">
5
- <tiny-input v-model="$Data.formData.name" placeholder="请输入字典名称" />
6
- </tiny-form-item>
7
- <tiny-form-item label="字典代码" prop="code">
8
- <tiny-input v-model="$Data.formData.code" placeholder="请输入字典代码,如:gender" />
9
- </tiny-form-item>
10
- <tiny-form-item label="字典值" prop="value">
11
- <tiny-input v-model="$Data.formData.value" placeholder="请输入字典值" />
12
- </tiny-form-item>
13
- <tiny-form-item label="父级ID" prop="pid">
14
- <tiny-numeric v-model="$Data.formData.pid" :min="0" :max="999999999999999" />
15
- </tiny-form-item>
16
- <tiny-form-item label="排序" prop="sort">
17
- <tiny-numeric v-model="$Data.formData.sort" :min="0" :max="9999" />
18
- </tiny-form-item>
19
- <tiny-form-item label="描述" prop="description">
20
- <tiny-input v-model="$Data.formData.description" type="textarea" placeholder="请输入描述" :rows="3" />
21
- </tiny-form-item>
22
- <tiny-form-item label="状态" prop="state">
23
- <tiny-radio-group v-model="$Data.formData.state">
24
- <tiny-radio :label="1">正常</tiny-radio>
25
- <tiny-radio :label="2">禁用</tiny-radio>
26
- </tiny-radio-group>
27
- </tiny-form-item>
28
- </tiny-form>
2
+ <TinyDialogBox v-model:visible="$Data.visible" :title="$Prop.actionType === 'upd' ? '编辑字典' : '添加字典'" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="10vh" @close="$Method.onClose">
3
+ <TinyForm :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
4
+ <TinyFormItem label="字典名称" prop="name">
5
+ <TinyInput v-model="$Data.formData.name" placeholder="请输入字典名称" />
6
+ </TinyFormItem>
7
+ <TinyFormItem label="字典代码" prop="code">
8
+ <TinyInput v-model="$Data.formData.code" placeholder="请输入字典代码,如:gender" />
9
+ </TinyFormItem>
10
+ <TinyFormItem label="字典值" prop="value">
11
+ <TinyInput v-model="$Data.formData.value" placeholder="请输入字典值" />
12
+ </TinyFormItem>
13
+ <TinyFormItem label="父级ID" prop="pid">
14
+ <TinyNumeric v-model="$Data.formData.pid" :min="0" :max="999999999999999" />
15
+ </TinyFormItem>
16
+ <TinyFormItem label="排序" prop="sort">
17
+ <TinyNumeric v-model="$Data.formData.sort" :min="0" :max="9999" />
18
+ </TinyFormItem>
19
+ <TinyFormItem label="描述" prop="description">
20
+ <TinyInput v-model="$Data.formData.description" type="textarea" placeholder="请输入描述" :rows="3" />
21
+ </TinyFormItem>
22
+ <TinyFormItem label="状态" prop="state">
23
+ <TinyRadioGroup v-model="$Data.formData.state">
24
+ <TinyRadio :label="1">正常</TinyRadio>
25
+ <TinyRadio :label="2">禁用</TinyRadio>
26
+ </TinyRadioGroup>
27
+ </TinyFormItem>
28
+ </TinyForm>
29
29
  <template #footer>
30
- <tiny-button @click="$Method.onClose">取消</tiny-button>
31
- <tiny-button type="primary" @click="$Method.onSubmit">确定</tiny-button>
30
+ <TinyButton @click="$Method.onClose">取消</TinyButton>
31
+ <TinyButton type="primary" @click="$Method.onSubmit">确定</TinyButton>
32
32
  </template>
33
- </tiny-dialog-box>
33
+ </TinyDialogBox>
34
34
  </template>
35
35
 
36
36
  <script setup>
37
- import { ref, watch, shallowRef } from 'vue';
37
+ import { watch, shallowRef } from 'vue';
38
+ import { Button as TinyButton, DialogBox as TinyDialogBox, Form as TinyForm, FormItem as TinyFormItem, Input as TinyInput, Numeric as TinyNumeric, Radio as TinyRadio, RadioGroup as TinyRadioGroup, Modal } from '@opentiny/vue';
38
39
  import { Modal } from '@opentiny/vue';
39
40
 
40
41
  const $Prop = defineProps({
@@ -2,61 +2,61 @@
2
2
  <div class="page-dict page-table">
3
3
  <div class="main-tool">
4
4
  <div class="left">
5
- <tiny-button type="primary" @click="$Method.onAction('add', {})">
5
+ <TinyButton type="primary" @click="$Method.onAction('add', {})">
6
6
  <template #icon>
7
- <i-lucide:plus />
7
+ <IconLucidePlus />
8
8
  </template>
9
9
  添加字典
10
- </tiny-button>
10
+ </TinyButton>
11
11
  </div>
12
12
  <div class="right">
13
- <tiny-button @click="$Method.handleRefresh">
13
+ <TinyButton @click="$Method.handleRefresh">
14
14
  <template #icon>
15
- <i-lucide:rotate-cw />
15
+ <IconLucideRotateCw />
16
16
  </template>
17
17
  刷新
18
- </tiny-button>
18
+ </TinyButton>
19
19
  </div>
20
20
  </div>
21
21
  <div class="main-table">
22
- <tiny-grid :data="$Data.dictList" header-cell-class-name="custom-table-cell-class" size="small" height="100%" seq-serial>
23
- <tiny-grid-column type="index" title="序号" :width="60" />
24
- <tiny-grid-column field="name" title="字典名称" />
25
- <tiny-grid-column field="code" title="字典代码" :width="150" />
26
- <tiny-grid-column field="value" title="字典值" :width="200" />
27
- <tiny-grid-column field="pid" title="父级ID" :width="100" />
28
- <tiny-grid-column field="sort" title="排序" :width="80" />
29
- <tiny-grid-column field="description" title="描述" />
30
- <tiny-grid-column field="state" title="状态" :width="100">
22
+ <TinyGrid :data="$Data.dictList" header-cell-class-name="custom-table-cell-class" size="small" height="100%" seq-serial>
23
+ <TinyGridColumn type="index" title="序号" :width="60" />
24
+ <TinyGridColumn field="name" title="字典名称" />
25
+ <TinyGridColumn field="code" title="字典代码" :width="150" />
26
+ <TinyGridColumn field="value" title="字典值" :width="200" />
27
+ <TinyGridColumn field="pid" title="父级ID" :width="100" />
28
+ <TinyGridColumn field="sort" title="排序" :width="80" />
29
+ <TinyGridColumn field="description" title="描述" />
30
+ <TinyGridColumn field="state" title="状态" :width="100">
31
31
  <template #default="{ row }">
32
- <tiny-tag v-if="row.state === 1" type="success">正常</tiny-tag>
33
- <tiny-tag v-else-if="row.state === 2" type="warning">禁用</tiny-tag>
34
- <tiny-tag v-else type="danger">已删除</tiny-tag>
32
+ <TinyTag v-if="row.state === 1" type="success">正常</TinyTag>
33
+ <TinyTag v-else-if="row.state === 2" type="warning">禁用</TinyTag>
34
+ <TinyTag v-else type="danger">已删除</TinyTag>
35
35
  </template>
36
- </tiny-grid-column>
37
- <tiny-grid-column title="操作" :width="120" align="right">
36
+ </TinyGridColumn>
37
+ <TinyGridColumn title="操作" :width="120" align="right">
38
38
  <template #default="{ row }">
39
- <tiny-dropdown title="操作" trigger="click" size="small" border visible-arrow @item-click="(data) => $Method.onAction(data.itemData.command, row)">
39
+ <TinyDropdown title="操作" trigger="click" size="small" border visible-arrow @item-click="(data) => $Method.onAction(data.itemData.command, row)">
40
40
  <template #dropdown>
41
- <tiny-dropdown-menu>
42
- <tiny-dropdown-item :item-data="{ command: 'upd' }">
43
- <i-lucide:pencil style="width: 14px; height: 14px; margin-right: 6px" />
41
+ <TinyDropdownMenu>
42
+ <TinyDropdownItem :item-data="{ command: 'upd' }">
43
+ <IconLucidePencil />
44
44
  编辑
45
- </tiny-dropdown-item>
46
- <tiny-dropdown-item :item-data="{ command: 'del' }" divided>
47
- <i-lucide:trash-2 style="width: 14px; height: 14px; margin-right: 6px" />
45
+ </TinyDropdownItem>
46
+ <TinyDropdownItem :item-data="{ command: 'del' }" divided>
47
+ <IconLucideTrash2 style="width: 14px; height: 14px; margin-right: 6px" />
48
48
  删除
49
- </tiny-dropdown-item>
50
- </tiny-dropdown-menu>
49
+ </TinyDropdownItem>
50
+ </TinyDropdownMenu>
51
51
  </template>
52
- </tiny-dropdown>
52
+ </TinyDropdown>
53
53
  </template>
54
- </tiny-grid-column>
55
- </tiny-grid>
54
+ </TinyGridColumn>
55
+ </TinyGrid>
56
56
  </div>
57
57
 
58
58
  <div class="main-page">
59
- <tiny-pager :current-page="$Data.pagerConfig.currentPage" :page-size="$Data.pagerConfig.pageSize" :total="$Data.pagerConfig.total" @current-change="$Method.onPageChange" @size-change="$Method.handleSizeChange" />
59
+ <TinyPager :current-page="$Data.pagerConfig.currentPage" :page-size="$Data.pagerConfig.pageSize" :total="$Data.pagerConfig.total" @current-change="$Method.onPageChange" @size-change="$Method.handleSizeChange" />
60
60
  </div>
61
61
 
62
62
  <!-- 编辑对话框组件 -->
@@ -65,8 +65,13 @@
65
65
  </template>
66
66
 
67
67
  <script setup>
68
- import { ref } from 'vue';
69
- import { Modal } from '@opentiny/vue';
68
+ import { Button as TinyButton, Grid as TinyGrid, GridColumn as TinyGridColumn, Tag as TinyTag, Dropdown as TinyDropdown, DropdownMenu as TinyDropdownMenu, DropdownItem as TinyDropdownItem, Pager as TinyPager, Modal } from '@opentiny/vue';
69
+ import IconLucidePlus from '~icons/lucide/plus';
70
+ import IconLucideRotateCw from '~icons/lucide/rotate-cw';
71
+ import IconLucidePencil from '~icons/lucide/pencil';
72
+ import IconLucideTrash2 from '~icons/lucide/trash-2';
73
+
74
+ import EditDialog from './components/edit.vue';
70
75
 
71
76
  import EditDialog from './components/edit.vue';
72
77
 
@@ -1,19 +1,19 @@
1
1
  <template>
2
2
  <div class="section-block">
3
3
  <div class="section-header flex items-center gap-2">
4
- <i-lucide:package style="width: 20px; height: 20px" />
4
+ <IconLucidePackage />
5
5
  <h2>已安装插件</h2>
6
6
  </div>
7
7
  <div class="section-content">
8
8
  <div class="addon-list">
9
9
  <div v-for="addon in addonList" :key="addon.name" class="addon-item">
10
10
  <div class="addon-icon">
11
- <i-lucide:box style="width: 20px; height: 20px" />
11
+ <IconLucideBox />
12
12
  </div>
13
13
  <div class="addon-info">
14
14
  <div class="addon-title">
15
15
  <span class="addon-name">{{ addon.title }}</span>
16
- <tiny-tag type="success" size="small">{{ addon.version }}</tiny-tag>
16
+ <TinyTag type="success" size="small">{{ addon.version }}</TinyTag>
17
17
  </div>
18
18
  <div class="addon-desc">{{ addon.description }}</div>
19
19
  </div>
@@ -24,7 +24,9 @@
24
24
  </template>
25
25
 
26
26
  <script setup>
27
- import { ref } from 'vue';
27
+ import IconLucideBox from '~icons/lucide/box';
28
+ import { Tag as TinyTag } from '@opentiny/vue';
29
+ import IconLucidePackage from '~icons/lucide/package';
28
30
 
29
31
  // 组件内部数据
30
32
  const addonList = $ref([]);
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="section-block">
3
3
  <div class="section-header flex items-center gap-2">
4
- <i-lucide:server style="width: 20px; height: 20px" />
4
+ <IconLucideServer />
5
5
  <h2>运行环境</h2>
6
6
  </div>
7
7
  <div class="section-content">
@@ -36,7 +36,7 @@
36
36
  </template>
37
37
 
38
38
  <script setup>
39
- import { ref } from 'vue';
39
+ import IconLucideServer from '~icons/lucide/server';
40
40
 
41
41
  // 组件内部数据
42
42
  const environmentInfo = $ref({
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="section-block">
3
3
  <div class="section-header flex items-center gap-2">
4
- <i-lucide:file-text style="width: 20px; height: 20px" />
4
+ <IconLucideFileText />
5
5
  <h2>操作日志</h2>
6
6
  </div>
7
7
  <div class="section-content">
@@ -22,9 +22,9 @@
22
22
  <span class="col-module">{{ log.module }}</span>
23
23
  <span class="col-ip">{{ log.ip }}</span>
24
24
  <span class="col-status">
25
- <tiny-tag :type="log.status === 'success' ? 'success' : 'danger'" size="small">
25
+ <TinyTag :type="log.status === 'success' ? 'success' : 'danger'" size="small">
26
26
  {{ log.status === 'success' ? '成功' : '失败' }}
27
- </tiny-tag>
27
+ </TinyTag>
28
28
  </span>
29
29
  </div>
30
30
  </div>
@@ -34,7 +34,8 @@
34
34
  </template>
35
35
 
36
36
  <script setup>
37
- import { ref } from 'vue';
37
+ import { Tag as TinyTag } from '@opentiny/vue';
38
+ import IconLucideFileText from '~icons/lucide/file-text';
38
39
 
39
40
  // 组件内部数据
40
41
  const operationLogs = $ref([
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <div class="section-block">
3
3
  <div class="section-header flex items-center gap-2">
4
- <i-lucide:activity style="width: 20px; height: 20px" />
4
+ <IconLucideActivity />
5
5
  <h2>性能指标</h2>
6
6
  </div>
7
7
  <div class="section-content">
8
8
  <div class="performance-grid">
9
9
  <div class="perf-metric">
10
10
  <div class="perf-icon">
11
- <i-lucide:clock style="width: 18px; height: 18px" />
11
+ <IconLucideClock />
12
12
  </div>
13
13
  <div class="perf-info">
14
14
  <div class="perf-label">平均响应</div>
@@ -17,7 +17,7 @@
17
17
  </div>
18
18
  <div class="perf-metric">
19
19
  <div class="perf-icon">
20
- <i-lucide:trending-up style="width: 18px; height: 18px" />
20
+ <IconLucideTrendingUp />
21
21
  </div>
22
22
  <div class="perf-info">
23
23
  <div class="perf-label">QPS</div>
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  <div class="perf-metric">
28
28
  <div class="perf-icon">
29
- <i-lucide:alert-circle style="width: 18px; height: 18px" />
29
+ <IconLucideAlertCircle />
30
30
  </div>
31
31
  <div class="perf-info">
32
32
  <div class="perf-label">错误率</div>
@@ -35,7 +35,7 @@
35
35
  </div>
36
36
  <div class="perf-metric">
37
37
  <div class="perf-icon">
38
- <i-lucide:activity style="width: 18px; height: 18px" />
38
+ <IconLucideActivity />
39
39
  </div>
40
40
  <div class="perf-info">
41
41
  <div class="perf-label">活跃连接</div>
@@ -45,7 +45,7 @@
45
45
  </div>
46
46
  <!-- 最慢接口提示 -->
47
47
  <div v-if="performanceMetrics.slowestApi" class="perf-slowest">
48
- <i-lucide:alert-triangle style="width: 14px; height: 14px" />
48
+ <IconLucideAlertTriangle />
49
49
  <span>最慢接口: {{ performanceMetrics.slowestApi.path }} ({{ performanceMetrics.slowestApi.time }}ms)</span>
50
50
  </div>
51
51
  </div>
@@ -53,7 +53,11 @@
53
53
  </template>
54
54
 
55
55
  <script setup>
56
- import { ref } from 'vue';
56
+ import IconLucideActivity from '~icons/lucide/activity';
57
+ import IconLucideTrendingUp from '~icons/lucide/trending-up';
58
+ import IconLucideAlertCircle from '~icons/lucide/alert-circle';
59
+ import IconLucideClock from '~icons/lucide/clock';
60
+ import IconLucideAlertTriangle from '~icons/lucide/alert-triangle';
57
61
 
58
62
  // 组件内部数据
59
63
  const performanceMetrics = $ref({