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