mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 02:38:43 +08:00 
			
		
		
		
	refator: button
This commit is contained in:
		| @@ -44,7 +44,7 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => { | |||||||
|   /** |   /** | ||||||
|    * grid options 初始化 |    * grid options 初始化 | ||||||
|    */ |    */ | ||||||
|   const gridOptions = reactive<VxeGridProps>({ |   const gridOptions = reactive<VxeGridProps<any>>({ | ||||||
|     loading: true, |     loading: true, | ||||||
|     size: currentSize as any, |     size: currentSize as any, | ||||||
|     height: 730, // 1080高度 |     height: 730, // 1080高度 | ||||||
|   | |||||||
| @@ -7,8 +7,8 @@ | |||||||
|       </el-radio-group> |       </el-radio-group> | ||||||
|     </template> |     </template> | ||||||
|   </Form> |   </Form> | ||||||
|   <el-button type="primary" @click="submit()">{{ t('common.save') }}</el-button> |   <XButton :title="t('common.save')" @click="submit()" /> | ||||||
|   <el-button type="danger" @click="init()">{{ t('common.reset') }}</el-button> |   <XButton type="danger" :title="t('common.reset')" @click="init()" /> | ||||||
| </template> | </template> | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { reactive, onMounted, unref, ref } from 'vue' | import { reactive, onMounted, unref, ref } from 'vue' | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ | |||||||
|     </Descriptions> |     </Descriptions> | ||||||
|     <!-- 操作按钮 --> |     <!-- 操作按钮 --> | ||||||
|     <template #footer> |     <template #footer> | ||||||
|       <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button> |       <XButton :title="t('dialog.close')" @click="dialogVisible = false" /> | ||||||
|     </template> |     </template> | ||||||
|   </XModal> |   </XModal> | ||||||
| </template> | </template> | ||||||
|   | |||||||
| @@ -47,7 +47,7 @@ | |||||||
|     <Descriptions :schema="allSchemas.detailSchema" :data="detailRef" /> |     <Descriptions :schema="allSchemas.detailSchema" :data="detailRef" /> | ||||||
|     <!-- 操作按钮 --> |     <!-- 操作按钮 --> | ||||||
|     <template #footer> |     <template #footer> | ||||||
|       <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button> |       <XButton :title="t('dialog.close')" @click="dialogVisible = false" /> | ||||||
|     </template> |     </template> | ||||||
|   </XModal> |   </XModal> | ||||||
| </template> | </template> | ||||||
|   | |||||||
| @@ -24,30 +24,27 @@ | |||||||
|         <span>{{ row.visible ? '是' : '否' }} </span> |         <span>{{ row.visible ? '是' : '否' }} </span> | ||||||
|       </template> |       </template> | ||||||
|       <template #actionbtns_default="{ row }"> |       <template #actionbtns_default="{ row }"> | ||||||
|         <el-button |         <!-- 操作:修改 --> | ||||||
|           link |         <XTextButton | ||||||
|           type="primary" |           preIcon="ep:edit" | ||||||
|  |           :title="t('action.edit')" | ||||||
|           v-hasPermi="['infra:config:update']" |           v-hasPermi="['infra:config:update']" | ||||||
|           @click="handleUpdate(row.id)" |           @click="handleUpdate(row.id)" | ||||||
|         > |         /> | ||||||
|           <Icon icon="ep:edit" class="mr-1px" /> {{ t('action.edit') }} |         <!-- 操作:详情 --> | ||||||
|         </el-button> |         <XTextButton | ||||||
|         <el-button |           preIcon="ep:view" | ||||||
|           link |           :title="t('action.detail')" | ||||||
|           type="primary" |           v-hasPermi="['infra:config:query']" | ||||||
|           v-hasPermi="['infra:config:update']" |  | ||||||
|           @click="handleDetail(row.id)" |           @click="handleDetail(row.id)" | ||||||
|         > |         /> | ||||||
|           <Icon icon="ep:view" class="mr-1px" /> {{ t('action.detail') }} |         <!-- 操作:删除 --> | ||||||
|         </el-button> |         <XTextButton | ||||||
|         <el-button |           preIcon="ep:delete" | ||||||
|           link |           :title="t('action.del')" | ||||||
|           type="primary" |  | ||||||
|           v-hasPermi="['infra:config:delete']" |           v-hasPermi="['infra:config:delete']" | ||||||
|           @click="handleDelete(row.id)" |           @click="handleDelete(row.id)" | ||||||
|         > |         /> | ||||||
|           <Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }} |  | ||||||
|         </el-button> |  | ||||||
|       </template> |       </template> | ||||||
|     </vxe-grid> |     </vxe-grid> | ||||||
|   </ContentWrap> |   </ContentWrap> | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ | |||||||
|     </Descriptions> |     </Descriptions> | ||||||
|     <!-- 操作按钮 --> |     <!-- 操作按钮 --> | ||||||
|     <template #footer> |     <template #footer> | ||||||
|       <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button> |       <XButton :title="t('dialog.close')" @click="dialogVisible = false" /> | ||||||
|     </template> |     </template> | ||||||
|   </XModal> |   </XModal> | ||||||
|   <XModal v-model="uploadDialogVisible" :title="uploadDialogTitle"> |   <XModal v-model="uploadDialogVisible" :title="uploadDialogTitle"> | ||||||
| @@ -69,11 +69,15 @@ | |||||||
|       </template> |       </template> | ||||||
|     </el-upload> |     </el-upload> | ||||||
|     <template #footer> |     <template #footer> | ||||||
|       <el-button type="primary" @click="submitFileForm"> |       <!-- 按钮:保存 --> | ||||||
|         <Icon icon="ep:upload-filled" /> |       <XButton | ||||||
|         {{ t('action.save') }} |         type="primary" | ||||||
|       </el-button> |         prefix="ep:upload-filled" | ||||||
|       <el-button @click="uploadDialogVisible = false">{{ t('dialog.close') }}</el-button> |         :title="t('action.save')" | ||||||
|  |         @click="submitFileForm()" | ||||||
|  |       /> | ||||||
|  |       <!-- 按钮:关闭 --> | ||||||
|  |       <XButton :title="t('dialog.close')" @click="uploadDialogVisible = false" /> | ||||||
|     </template> |     </template> | ||||||
|   </XModal> |   </XModal> | ||||||
| </template> | </template> | ||||||
|   | |||||||
| @@ -43,7 +43,7 @@ | |||||||
|     </Descriptions> |     </Descriptions> | ||||||
|     <!-- 操作按钮 --> |     <!-- 操作按钮 --> | ||||||
|     <template #footer> |     <template #footer> | ||||||
|       <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button> |       <XButton :title="t('dialog.close')" @click="dialogVisible = false" /> | ||||||
|     </template> |     </template> | ||||||
|   </XModal> |   </XModal> | ||||||
| </template> | </template> | ||||||
|   | |||||||
| @@ -44,18 +44,18 @@ | |||||||
|           </el-descriptions> |           </el-descriptions> | ||||||
|         </el-card> |         </el-card> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="12" style="margin-top: 10px"> |       <el-col :span="12" class="mt-3"> | ||||||
|         <el-card :gutter="12" shadow="hover"> |         <el-card :gutter="12" shadow="hover"> | ||||||
|           <div ref="commandStatsRef" style="height: 350px"></div> |           <div ref="commandStatsRef" class="h-88"></div> | ||||||
|         </el-card> |         </el-card> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="12" style="margin-top: 10px"> |       <el-col :span="12" class="mt-3"> | ||||||
|         <el-card style="margin-left: 10px" :gutter="12" shadow="hover"> |         <el-card class="ml-3" :gutter="12" shadow="hover"> | ||||||
|           <div ref="usedmemory" style="height: 350px"></div> |           <div ref="usedmemory" class="h-88"></div> | ||||||
|         </el-card> |         </el-card> | ||||||
|       </el-col> |       </el-col> | ||||||
|     </el-row> |     </el-row> | ||||||
|     <el-row style="margin-top: 10px"> |     <el-row class="mt-3"> | ||||||
|       <el-col :span="24" class="card-box" shadow="hover"> |       <el-col :span="24" class="card-box" shadow="hover"> | ||||||
|         <el-card> |         <el-card> | ||||||
|           <el-table |           <el-table | ||||||
| @@ -81,7 +81,7 @@ | |||||||
|   </el-scrollbar> |   </el-scrollbar> | ||||||
|   <XModal v-model="dialogVisible" :title="keyTemplate + ' 模板'"> |   <XModal v-model="dialogVisible" :title="keyTemplate + ' 模板'"> | ||||||
|     <el-row> |     <el-row> | ||||||
|       <el-col :span="14" style="margin-top: 10px"> |       <el-col :span="14" class="mt-3"> | ||||||
|         <el-card shadow="always"> |         <el-card shadow="always"> | ||||||
|           <template #header> |           <template #header> | ||||||
|             <div class="card-header"> |             <div class="card-header"> | ||||||
| @@ -96,27 +96,23 @@ | |||||||
|             </el-table-column> |             </el-table-column> | ||||||
|             <el-table-column label="操作" align="right" width="60"> |             <el-table-column label="操作" align="right" width="60"> | ||||||
|               <template #default="{ row }"> |               <template #default="{ row }"> | ||||||
|                 <el-button link type="primary" @click="handleDeleteKey(row)"> |                 <XTextButton preIcon="ep:delete" @click="handleDeleteKey(row)" /> | ||||||
|                   <Icon icon="ep:delete" /> |  | ||||||
|                 </el-button> |  | ||||||
|               </template> |               </template> | ||||||
|             </el-table-column> |             </el-table-column> | ||||||
|           </el-table> |           </el-table> | ||||||
|         </el-card> |         </el-card> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="10" style="margin-top: 10px"> |       <el-col :span="10" class="mt-3"> | ||||||
|         <el-card shadow="always"> |         <el-card shadow="always"> | ||||||
|           <template #header> |           <template #header> | ||||||
|             <div class="card-header"> |             <div class="card-header"> | ||||||
|               <span>缓存内容</span> |               <span>缓存内容</span> | ||||||
|               <el-button |               <XTextButton | ||||||
|                 link |                 preIcon="ep:refresh" | ||||||
|                 type="primary" |                 title="清理全部" | ||||||
|                 @click="handleDeleteKeys(keyTemplate)" |                 @click="handleDeleteKeys(keyTemplate)" | ||||||
|                 style="float: right; padding: 3px 0" |                 class="float-right p-1" | ||||||
|               > |               /> | ||||||
|                 <Icon icon="ep:refresh" />清理全部 |  | ||||||
|               </el-button> |  | ||||||
|             </div> |             </div> | ||||||
|           </template> |           </template> | ||||||
|           <el-descriptions :column="1"> |           <el-descriptions :column="1"> | ||||||
|   | |||||||
| @@ -210,10 +210,7 @@ | |||||||
|   <XModal v-model="importDialogVisible" :title="importDialogTitle"> |   <XModal v-model="importDialogVisible" :title="importDialogTitle"> | ||||||
|     <el-form class="drawer-multiColumn-form" label-width="150px"> |     <el-form class="drawer-multiColumn-form" label-width="150px"> | ||||||
|       <el-form-item label="模板下载 :"> |       <el-form-item label="模板下载 :"> | ||||||
|         <el-button type="primary" @click="handleImportTemp"> |         <XButton type="primary" prefix="ep:download" title="点击下载" @click="handleImportTemp()" /> | ||||||
|           <Icon icon="ep:download" /> |  | ||||||
|           点击下载 |  | ||||||
|         </el-button> |  | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|       <el-form-item label="文件上传 :"> |       <el-form-item label="文件上传 :"> | ||||||
|         <el-upload |         <el-upload | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 xingyu
					xingyu