Commit d47c2020d384e930fdff5ad4dc6bcf56c3375b9f

Authored by xingyu
1 parent 1570e387

refator: button

yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
... ... @@ -44,7 +44,7 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => {
44 44 /**
45 45 * grid options 初始化
46 46 */
47   - const gridOptions = reactive<VxeGridProps>({
  47 + const gridOptions = reactive<VxeGridProps<any>>({
48 48 loading: true,
49 49 size: currentSize as any,
50 50 height: 730, // 1080高度
... ...
yudao-ui-admin-vue3/src/views/Profile/components/BasicInfo.vue
... ... @@ -7,8 +7,8 @@
7 7 </el-radio-group>
8 8 </template>
9 9 </Form>
10   - <el-button type="primary" @click="submit()">{{ t('common.save') }}</el-button>
11   - <el-button type="danger" @click="init()">{{ t('common.reset') }}</el-button>
  10 + <XButton :title="t('common.save')" @click="submit()" />
  11 + <XButton type="danger" :title="t('common.reset')" @click="init()" />
12 12 </template>
13 13 <script setup lang="ts">
14 14 import { reactive, onMounted, unref, ref } from 'vue'
... ...
yudao-ui-admin-vue3/src/views/infra/apiAccessLog/index.vue
... ... @@ -31,7 +31,7 @@
31 31 </Descriptions>
32 32 <!-- 操作按钮 -->
33 33 <template #footer>
34   - <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
  34 + <XButton :title="t('dialog.close')" @click="dialogVisible = false" />
35 35 </template>
36 36 </XModal>
37 37 </template>
... ...
yudao-ui-admin-vue3/src/views/infra/apiErrorLog/index.vue
... ... @@ -47,7 +47,7 @@
47 47 <Descriptions :schema="allSchemas.detailSchema" :data="detailRef" />
48 48 <!-- 操作按钮 -->
49 49 <template #footer>
50   - <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
  50 + <XButton :title="t('dialog.close')" @click="dialogVisible = false" />
51 51 </template>
52 52 </XModal>
53 53 </template>
... ...
yudao-ui-admin-vue3/src/views/infra/config/index.vue
... ... @@ -24,30 +24,27 @@
24 24 <span>{{ row.visible ? '是' : '否' }} </span>
25 25 </template>
26 26 <template #actionbtns_default="{ row }">
27   - <el-button
28   - link
29   - type="primary"
  27 + <!-- 操作:修改 -->
  28 + <XTextButton
  29 + preIcon="ep:edit"
  30 + :title="t('action.edit')"
30 31 v-hasPermi="['infra:config:update']"
31 32 @click="handleUpdate(row.id)"
32   - >
33   - <Icon icon="ep:edit" class="mr-1px" /> {{ t('action.edit') }}
34   - </el-button>
35   - <el-button
36   - link
37   - type="primary"
38   - v-hasPermi="['infra:config:update']"
  33 + />
  34 + <!-- 操作:详情 -->
  35 + <XTextButton
  36 + preIcon="ep:view"
  37 + :title="t('action.detail')"
  38 + v-hasPermi="['infra:config:query']"
39 39 @click="handleDetail(row.id)"
40   - >
41   - <Icon icon="ep:view" class="mr-1px" /> {{ t('action.detail') }}
42   - </el-button>
43   - <el-button
44   - link
45   - type="primary"
  40 + />
  41 + <!-- 操作:删除 -->
  42 + <XTextButton
  43 + preIcon="ep:delete"
  44 + :title="t('action.del')"
46 45 v-hasPermi="['infra:config:delete']"
47 46 @click="handleDelete(row.id)"
48   - >
49   - <Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}
50   - </el-button>
  47 + />
51 48 </template>
52 49 </vxe-grid>
53 50 </ContentWrap>
... ...
yudao-ui-admin-vue3/src/views/infra/fileList/index.vue
... ... @@ -42,7 +42,7 @@
42 42 </Descriptions>
43 43 <!-- 操作按钮 -->
44 44 <template #footer>
45   - <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
  45 + <XButton :title="t('dialog.close')" @click="dialogVisible = false" />
46 46 </template>
47 47 </XModal>
48 48 <XModal v-model="uploadDialogVisible" :title="uploadDialogTitle">
... ... @@ -69,11 +69,15 @@
69 69 </template>
70 70 </el-upload>
71 71 <template #footer>
72   - <el-button type="primary" @click="submitFileForm">
73   - <Icon icon="ep:upload-filled" />
74   - {{ t('action.save') }}
75   - </el-button>
76   - <el-button @click="uploadDialogVisible = false">{{ t('dialog.close') }}</el-button>
  72 + <!-- 按钮:保存 -->
  73 + <XButton
  74 + type="primary"
  75 + prefix="ep:upload-filled"
  76 + :title="t('action.save')"
  77 + @click="submitFileForm()"
  78 + />
  79 + <!-- 按钮:关闭 -->
  80 + <XButton :title="t('dialog.close')" @click="uploadDialogVisible = false" />
77 81 </template>
78 82 </XModal>
79 83 </template>
... ...
yudao-ui-admin-vue3/src/views/infra/job/JobLog.vue
... ... @@ -43,7 +43,7 @@
43 43 </Descriptions>
44 44 <!-- 操作按钮 -->
45 45 <template #footer>
46   - <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
  46 + <XButton :title="t('dialog.close')" @click="dialogVisible = false" />
47 47 </template>
48 48 </XModal>
49 49 </template>
... ...
yudao-ui-admin-vue3/src/views/infra/redis/index.vue
... ... @@ -44,18 +44,18 @@
44 44 </el-descriptions>
45 45 </el-card>
46 46 </el-col>
47   - <el-col :span="12" style="margin-top: 10px">
  47 + <el-col :span="12" class="mt-3">
48 48 <el-card :gutter="12" shadow="hover">
49   - <div ref="commandStatsRef" style="height: 350px"></div>
  49 + <div ref="commandStatsRef" class="h-88"></div>
50 50 </el-card>
51 51 </el-col>
52   - <el-col :span="12" style="margin-top: 10px">
53   - <el-card style="margin-left: 10px" :gutter="12" shadow="hover">
54   - <div ref="usedmemory" style="height: 350px"></div>
  52 + <el-col :span="12" class="mt-3">
  53 + <el-card class="ml-3" :gutter="12" shadow="hover">
  54 + <div ref="usedmemory" class="h-88"></div>
55 55 </el-card>
56 56 </el-col>
57 57 </el-row>
58   - <el-row style="margin-top: 10px">
  58 + <el-row class="mt-3">
59 59 <el-col :span="24" class="card-box" shadow="hover">
60 60 <el-card>
61 61 <el-table
... ... @@ -81,7 +81,7 @@
81 81 </el-scrollbar>
82 82 <XModal v-model="dialogVisible" :title="keyTemplate + ' 模板'">
83 83 <el-row>
84   - <el-col :span="14" style="margin-top: 10px">
  84 + <el-col :span="14" class="mt-3">
85 85 <el-card shadow="always">
86 86 <template #header>
87 87 <div class="card-header">
... ... @@ -96,27 +96,23 @@
96 96 </el-table-column>
97 97 <el-table-column label="操作" align="right" width="60">
98 98 <template #default="{ row }">
99   - <el-button link type="primary" @click="handleDeleteKey(row)">
100   - <Icon icon="ep:delete" />
101   - </el-button>
  99 + <XTextButton preIcon="ep:delete" @click="handleDeleteKey(row)" />
102 100 </template>
103 101 </el-table-column>
104 102 </el-table>
105 103 </el-card>
106 104 </el-col>
107   - <el-col :span="10" style="margin-top: 10px">
  105 + <el-col :span="10" class="mt-3">
108 106 <el-card shadow="always">
109 107 <template #header>
110 108 <div class="card-header">
111 109 <span>缓存内容</span>
112   - <el-button
113   - link
114   - type="primary"
  110 + <XTextButton
  111 + preIcon="ep:refresh"
  112 + title="清理全部"
115 113 @click="handleDeleteKeys(keyTemplate)"
116   - style="float: right; padding: 3px 0"
117   - >
118   - <Icon icon="ep:refresh" />清理全部
119   - </el-button>
  114 + class="float-right p-1"
  115 + />
120 116 </div>
121 117 </template>
122 118 <el-descriptions :column="1">
... ...
yudao-ui-admin-vue3/src/views/system/user/index.vue
... ... @@ -210,10 +210,7 @@
210 210 <XModal v-model="importDialogVisible" :title="importDialogTitle">
211 211 <el-form class="drawer-multiColumn-form" label-width="150px">
212 212 <el-form-item label="模板下载 :">
213   - <el-button type="primary" @click="handleImportTemp">
214   - <Icon icon="ep:download" />
215   - 点击下载
216   - </el-button>
  213 + <XButton type="primary" prefix="ep:download" title="点击下载" @click="handleImportTemp()" />
217 214 </el-form-item>
218 215 <el-form-item label="文件上传 :">
219 216 <el-upload
... ...