@skyfox2000/webui 1.5.3 → 1.5.7

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.
Files changed (65) hide show
  1. package/lib/assets/modules/{baseLayout-LU1ysAJM.js → baseLayout-DfTxHOFc.js} +7 -7
  2. package/lib/assets/modules/file-upload-DTOdV5vM.js +211 -0
  3. package/lib/assets/modules/index-BDoBUrYA.js +114 -0
  4. package/lib/assets/modules/{index-C6RrxZBR.js → index-BwMaOrJT.js} +1 -1
  5. package/lib/assets/modules/{index-CHG5bbZG.js → index-M1qERbea.js} +99 -99
  6. package/lib/assets/modules/{menuTabs-Bk8A-zzL.js → menuTabs-DWaBSRNr.js} +42 -42
  7. package/lib/assets/modules/{toolIcon-ADz-Bt4_.js → toolIcon-BYnHhAy-.js} +1 -1
  8. package/lib/assets/modules/upload-template-BKm9mFq8.js +6764 -0
  9. package/lib/assets/modules/uploadList-CHvr6Hp1.js +472 -0
  10. package/lib/es/AceEditor/index.js +3 -3
  11. package/lib/es/BasicLayout/index.js +2 -2
  12. package/lib/es/Error403/index.js +14 -15
  13. package/lib/es/Error404/index.js +16 -17
  14. package/lib/es/ExcelForm/index.js +244 -244
  15. package/lib/es/MenuLayout/index.js +5 -5
  16. package/lib/es/TemplateFile/index.js +53 -54
  17. package/lib/es/UploadForm/index.js +61 -63
  18. package/lib/locales/default.d.ts +287 -103
  19. package/lib/webui.css +1 -1
  20. package/lib/webui.es.js +1440 -1586
  21. package/package.json +1 -1
  22. package/src/components/common/icon/fullscreen.vue +1 -1
  23. package/src/components/content/dialog/excelForm.vue +32 -28
  24. package/src/components/content/dialog/index.vue +3 -3
  25. package/src/components/content/dialog/templateFile.vue +3 -2
  26. package/src/components/content/dialog/uploadForm.vue +5 -4
  27. package/src/components/content/drawer/index.vue +5 -3
  28. package/src/components/content/list/index.vue +2 -1
  29. package/src/components/content/list/listOperate.vue +6 -7
  30. package/src/components/content/search/index.vue +2 -2
  31. package/src/components/content/table/index.vue +2 -1
  32. package/src/components/content/table/tableOperate.vue +8 -9
  33. package/src/components/content/toolbar/icontool.vue +1 -5
  34. package/src/components/content/toolbar/index.vue +4 -5
  35. package/src/components/content/toolpanel/index.vue +20 -20
  36. package/src/components/error/error403.vue +2 -2
  37. package/src/components/error/error404.vue +2 -2
  38. package/src/components/form/input/index.vue +3 -1
  39. package/src/components/form/select/index.vue +3 -2
  40. package/src/components/form/textarea/index.vue +3 -1
  41. package/src/components/form/transfer/index.vue +2 -1
  42. package/src/components/form/upload/uploadList.vue +23 -19
  43. package/src/components/layout/header/headerExits.vue +5 -5
  44. package/src/components/layout/menu/menuTabs.vue +1 -1
  45. package/src/const/options.ts +17 -16
  46. package/src/locales/default.ts +297 -176
  47. package/src/locales/index.ts +12 -4
  48. package/src/stores/appInfo.ts +2 -1
  49. package/src/stores/userInfo.ts +6 -5
  50. package/src/utils/data.ts +9 -8
  51. package/src/utils/download.ts +5 -4
  52. package/src/utils/excel-preview.ts +4 -3
  53. package/src/utils/export-table.ts +7 -6
  54. package/src/utils/file-upload.ts +15 -14
  55. package/src/utils/form-csv.ts +4 -3
  56. package/src/utils/form-excel.ts +14 -13
  57. package/src/utils/form-validate.ts +18 -17
  58. package/src/utils/form.ts +6 -5
  59. package/src/utils/icon-loader.ts +3 -2
  60. package/src/utils/options.ts +2 -1
  61. package/src/utils/tools.ts +18 -17
  62. package/lib/assets/modules/file-upload-BvIYPDBD.js +0 -211
  63. package/lib/assets/modules/index-Bi3hR8Gf.js +0 -114
  64. package/lib/assets/modules/upload-template-mzLL4UUU.js +0 -6462
  65. package/lib/assets/modules/uploadList-DRGJEXDH.js +0 -466
@@ -1,8 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, computed } from 'vue';
3
3
  import { ToolIcon, Input } from '@/components/';
4
-
5
-
4
+ import { $t } from '@/locales/index';
6
5
  import { getToolVisible, getToolStatus, onToolClicked } from '@/utils/tools';
7
6
  import type { ComponentTool, ToolGroup } from '@/typings/tools.d';
8
7
  import GroupTools from '../toolbar/groupTools.vue';
@@ -48,7 +47,7 @@ const toolData = computed(() => {
48
47
  const tools = props.tools as ComponentTool[];
49
48
  return [{
50
49
  id: 'default-group',
51
- name: '工具',
50
+ name: $t('webui.components.content.toolpanel.tool'),
52
51
  tools: tools
53
52
  }] as ToolPanelGroup[];
54
53
  });
@@ -74,7 +73,7 @@ const filteredToolData = computed(() => {
74
73
  const allTools = filteredGroups.flatMap(group => group.tools);
75
74
  return [{
76
75
  id: 'search-results',
77
- name: '搜索结果',
76
+ name: $t('webui.components.content.toolpanel.searchResult'),
78
77
  tools: allTools
79
78
  }];
80
79
  }
@@ -98,20 +97,20 @@ const modeToggleGroup = computed<ToolGroup[]>(() => {
98
97
  tools: [
99
98
  {
100
99
  key: 'list',
101
- label: '列表',
100
+ label: $t('webui.components.content.toolpanel.list'),
102
101
  icon: 'icon-datalist',
103
102
  display: 'icon',
104
- tiptext: '列表视图',
103
+ tiptext: $t('webui.components.content.toolpanel.listView'),
105
104
  click: () => {
106
105
  props.onModeChange?.('list');
107
106
  }
108
107
  } as ComponentTool,
109
108
  {
110
109
  key: 'grid',
111
- label: '网格',
110
+ label: $t('webui.components.content.toolpanel.grid'),
112
111
  icon: 'icon-icon-list',
113
112
  display: 'icon',
114
- tiptext: '网格视图',
113
+ tiptext: $t('webui.components.content.toolpanel.gridView'),
115
114
  click: () => {
116
115
  props.onModeChange?.('grid');
117
116
  }
@@ -128,10 +127,10 @@ const collapseToggleGroup = computed<ToolGroup[]>(() => {
128
127
  tools: [
129
128
  {
130
129
  key: 'collapse',
131
- label: props.collapsed ? '展开' : '收起',
130
+ label: props.collapsed ? $t('webui.components.content.toolpanel.expand') : $t('webui.components.content.toolpanel.collapse'),
132
131
  icon: 'icon-menu',
133
132
  display: 'icon',
134
- tiptext: props.collapsed ? '展开面板' : '收起面板',
133
+ tiptext: props.collapsed ? $t('webui.components.content.toolpanel.expandPanel') : $t('webui.components.content.toolpanel.collapsePanel'),
135
134
  // 添加特殊的点击处理
136
135
  click: () => {
137
136
  props.onCollapseChange?.(!props.collapsed);
@@ -195,7 +194,7 @@ const handleDragEnd = (event: DragEvent) => {
195
194
  <div class="relative h-full">
196
195
  <!-- 主面板 -->
197
196
  <div
198
- class="h-full bg-white border-r border-gray-200 transition-all duration-300 ease-in-out shadow-sm"
197
+ class="h-full bg-white border-r border-gray-200 transition-all duration-300 ease-in-out shadow-sm"
199
198
  :class="panelWidthClass">
200
199
  <!-- 展开状态 -->
201
200
  <div v-if="!props.collapsed" class="h-full flex flex-col">
@@ -210,8 +209,9 @@ const handleDragEnd = (event: DragEvent) => {
210
209
 
211
210
  <!-- 搜索框区域 -->
212
211
  <div v-if="showSearch" class="px-3 pt-3 pb-2">
213
- <Input v-model:value="searchKeyword" placeholder="搜索工具..." allow-clear size="small" class="w-full"
214
- @update:value="(value: string) => handleSearch(value)"
212
+ <Input v-model:value="searchKeyword"
213
+ :placeholder="$t('webui.components.content.toolpanel.searchPlaceholder')" allow-clear size="small"
214
+ class="w-full" @update:value="(value: string) => handleSearch(value)"
215
215
  @press-enter="(e: Event) => handleSearch((e.target as HTMLInputElement).value)" />
216
216
  </div>
217
217
  <!-- 工具列表滚动区域 -->
@@ -241,8 +241,8 @@ const handleDragEnd = (event: DragEvent) => {
241
241
  class="aspect-square flex flex-col items-center justify-center p-1.5 bg-gray-50 border border-solid border-gray-200 rounded-lg shadow-sm hover:border-blue-300 hover:shadow-lg hover:bg-blue-50 transition-all duration-200 cursor-move group"
242
242
  :class="[
243
243
  getToolStatus(tool) ? 'opacity-50 cursor-not-allowed bg-gray-200' : 'hover:scale-105',
244
- tool.class || '',
245
- dragConfig?.draggable ? 'cursor-move' : '',
244
+ tool.class || '',
245
+ dragConfig?.draggable ? 'cursor-move' : '',
246
246
  ]" :draggable="dragConfig?.draggable"
247
247
  @click="tool.click ? (tool.click as any)(tool, $event) : handleToolClick(tool, $event)"
248
248
  @dragstart="handleDragStart($event, tool as any)" @dragend="handleDragEnd($event)"
@@ -264,8 +264,8 @@ const handleDragEnd = (event: DragEvent) => {
264
264
  class="flex items-center px-2.5 py-2 bg-gray-50 border border-gray-200 border-solid rounded-lg shadow-sm hover:border-blue-500 hover:shadow-md hover:bg-blue-50 transition-all duration-200 group"
265
265
  :class="[
266
266
  getToolStatus(tool) ? 'opacity-50 cursor-not-allowed bg-gray-200' : 'hover:scale-[1.02]',
267
- tool.class || '',
268
- dragConfig?.draggable ? 'cursor-move' : ''
267
+ tool.class || '',
268
+ dragConfig?.draggable ? 'cursor-move' : ''
269
269
  ]" :draggable="dragConfig?.draggable"
270
270
  @click="tool.click ? (tool.click as any)(tool, $event) : handleToolClick(tool, $event)"
271
271
  @dragstart="handleDragStart($event, tool as any)" @dragend="handleDragEnd($event)"
@@ -276,7 +276,7 @@ const handleDragEnd = (event: DragEvent) => {
276
276
  dragConfig?.draggable ? '!cursor-move' : '']" v-bind="tool.iconProps" />
277
277
  <div class="flex-1 min-w-0">
278
278
  <div class="font-medium text-gray-900 text-sm group-hover:text-gray-950 text-center">{{
279
- tool.label }}</div>
279
+ tool.label }}</div>
280
280
  <div v-if="(tool as any).description"
281
281
  class="text-xs text-gray-600 mt-0.5 truncate group-hover:text-gray-700 text-center">
282
282
  {{ (tool as any).description }}
@@ -303,8 +303,8 @@ const handleDragEnd = (event: DragEvent) => {
303
303
  class="w-12 h-12 flex items-center justify-center bg-gray-50 border border-gray-400 rounded-lg shadow-sm hover:border-blue-500 hover:shadow-md hover:bg-blue-50 transition-all duration-200 cursor-move group"
304
304
  :class="[
305
305
  getToolStatus(tool) ? 'opacity-50 cursor-not-allowed bg-gray-200' : 'hover:scale-110',
306
- tool.class || '',
307
- dragConfig?.draggable ? 'cursor-move' : ''
306
+ tool.class || '',
307
+ dragConfig?.draggable ? 'cursor-move' : ''
308
308
  ]" :draggable="dragConfig?.draggable"
309
309
  @click="tool.click ? (tool.click as any)(tool, $event) : handleToolClick(tool, $event)"
310
310
  @dragstart="handleDragStart($event, tool as any)" @dragend="handleDragEnd($event)"
@@ -6,9 +6,9 @@ const onClicked = () => {
6
6
  };
7
7
  </script>
8
8
  <template>
9
- <Result status="403" title="403" sub-title="您没有权限访问当前页面!">
9
+ <Result status="403" title="403" :sub-title="$t('webui.components.error.forbidden')">
10
10
  <template #extra>
11
- <Button type="primary" @click="onClicked">点击返回</Button>
11
+ <Button type="primary" @click="onClicked">{{ $t('webui.components.error.clickReturn') }}</Button>
12
12
  </template>
13
13
  </Result>
14
14
  </template>
@@ -6,9 +6,9 @@ const onClicked = () => {
6
6
  };
7
7
  </script>
8
8
  <template>
9
- <Result status="404" title="404" sub-title="页面不存在或者没有权限访问页面!">
9
+ <Result status="404" title="404" :sub-title="$t('webui.components.error.pageNotFound')">
10
10
  <template #extra>
11
- <Button type="primary" @click="onClicked">点击返回</Button>
11
+ <Button type="primary" @click="onClicked">{{ $t('webui.components.error.clickReturn') }}</Button>
12
12
  </template>
13
13
  </Result>
14
14
  </template>
@@ -2,6 +2,8 @@
2
2
  import { formValidate, useInputFactory } from '@/index';
3
3
  import { Input } from 'ant-design-vue';
4
4
  import { ref, watch } from 'vue';
5
+ import { useI18n } from 'vue-i18n';
6
+ const { t } = useI18n();
5
7
 
6
8
  const { editorCtrl, labelText, errInfo } = useInputFactory();
7
9
  const onBlur = () => {
@@ -68,7 +70,7 @@ const onClear = () => {
68
70
  v-model:value="innerValue"
69
71
  autocomplete="new-password"
70
72
  :allow-clear="true"
71
- :placeholder="'请输入' + labelText"
73
+ :placeholder="t('webui.form.inputPlaceholder', [labelText])"
72
74
  @blur="onBlur"
73
75
  @change="onClear"
74
76
  v-bind="$attrs"
@@ -18,6 +18,7 @@ import {
18
18
  } from '@/index';
19
19
  import { IUrlInfo } from '@skyfox2000/fapi';
20
20
  import { useOptionFactory } from '@/utils/page';
21
+ import { $t } from '@/locales/index';
21
22
 
22
23
  type SelectValueType = string | number | string[] | number[] | null;
23
24
  const props = defineProps({
@@ -146,7 +147,7 @@ watch(
146
147
  () => url.value.loading,
147
148
  (newVal) => {
148
149
  if (newVal) placeholder.value = '';
149
- else if (!placeholder.value) placeholder.value = '请选择' + labelText.value;
150
+ else if (!placeholder.value) placeholder.value = $t('webui.components.form.select.pleaseSelect', [labelText.value]);
150
151
  },
151
152
  { immediate: true },
152
153
  );
@@ -211,7 +212,7 @@ onUnmounted(() => {
211
212
  <div>
212
213
  <div v-if="optionCtrl?.url?.loading" class="absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center">
213
214
  <circleLoading class="text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" />
214
- <span>数据加载中...</span>
215
+ <span>{{ $t('webui.components.form.upload.dataLoading') }}</span>
215
216
  </div>
216
217
  <Select :class="[errInfo?.errClass, 'w-full']" v-model:value="innerValue" :allow-clear="true" @change="onChanged"
217
218
  :placeholder="placeholder" :label-in-value="false" v-bind="attrs">
@@ -1,6 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { formValidate, useInputFactory } from '@/index';
3
3
  import { Textarea } from 'ant-design-vue';
4
+ import { useI18n } from 'vue-i18n';
5
+ const { t } = useI18n();
4
6
 
5
7
  const { editorCtrl, labelText, errInfo } = useInputFactory();
6
8
  const onBlur = () => {
@@ -14,7 +16,7 @@ const onBlur = () => {
14
16
  <Textarea
15
17
  :class="errInfo?.errClass === 'error' ? ['error', '!border-red-300', 'shadow-[0_0_3px_0px_#ff4d4f]'] : ''"
16
18
  :allow-clear="true"
17
- :placeholder="'请输入' + labelText"
19
+ :placeholder="t('webui.form.inputPlaceholder', [labelText])"
18
20
  @blur="onBlur"
19
21
  @keyup.enter.native.stop
20
22
  @keydown.enter.native.stop
@@ -3,6 +3,7 @@ import { ref, onMounted, watch } from 'vue';
3
3
  import { AnyControl, doQuery, formValidate, OptionItemProps, useInputFactory } from '@/index';
4
4
  import { Transfer } from 'ant-design-vue';
5
5
  import { IUrlInfo, ReqParams } from '@skyfox2000/fapi';
6
+ import { $t } from '@/locales/index';
6
7
  const props = defineProps<{
7
8
  /**
8
9
  * 是否自动加载数据
@@ -75,7 +76,7 @@ onMounted(async () => {
75
76
  <template>
76
77
  <Transfer
77
78
  :class="errInfo?.errClass === 'error' ? ['error', '!border-red-300', 'shadow-[0_0_3px_0px_#ff4d4f]'] : ''"
78
- :placeholder="'请输入' + labelText"
79
+ :placeholder="$t('webui.components.form.transfer.pleaseInput', [labelText])"
79
80
  :targetKeys="targetKeys"
80
81
  @change="onChange"
81
82
  v-bind="$attrs"
@@ -8,6 +8,7 @@ import { UploadFile, UploadStatus, donwloadFromMinio, path, Switch, previewFromM
8
8
  import { useInputFactory } from '@/utils/form-validate';
9
9
  import { ApiResponse, httpPost, IUrlInfo, ResStatus } from '@skyfox2000/fapi';
10
10
  import { fastUpload } from '@/utils/file-upload';
11
+ import { $t } from '@/locales/index';
11
12
 
12
13
  export interface UploadListProps {
13
14
  /**
@@ -120,14 +121,14 @@ const validateFile = (file: File): boolean => {
120
121
  if (props.fileExt && props.fileExt.length > 0) {
121
122
  const extension = file.name.split('.').pop()?.toLowerCase() || '';
122
123
  if (!props.fileExt.includes(extension)) {
123
- message.error('文件类型不支持');
124
+ message.error($t('webui.components.form.upload.unsupportedFileType'));
124
125
  return false;
125
126
  }
126
127
  }
127
128
 
128
129
  // 文件大小验证
129
130
  if (file.size / 1024 / 1024 > props.maxFileSize) {
130
- message.error(`文件大小超过 ${props.maxFileSize}MB 限制`);
131
+ message.error($t('webui.components.form.upload.fileSizeExceeded', [props.maxFileSize]));
131
132
  return false;
132
133
  }
133
134
 
@@ -200,7 +201,7 @@ const handleFileSelect = async (newFiles: any[]) => {
200
201
 
201
202
  // 检查是否达到最大数量限制
202
203
  if (isMaxCountReached()) {
203
- message.error(`最多上传 ${props.maxCount} 个文件`);
204
+ message.error($t('webui.components.form.upload.maxFileCount', [props.maxCount]));
204
205
  hasError = true;
205
206
  break;
206
207
  }
@@ -343,7 +344,7 @@ const removeFile = (index: number) => {
343
344
  },
344
345
  }).then((res) => {
345
346
  if (res && res.status === ResStatus.SUCCESS) {
346
- message.success('删除文件成功!');
347
+ message.success($t('webui.components.form.upload.deleteSuccess'));
347
348
  displayList.value.splice(index, 1);
348
349
  }
349
350
  });
@@ -395,17 +396,17 @@ const getStatusColor = (status?: UploadStatus) => {
395
396
  const getStatus = (status?: UploadStatus) => {
396
397
  switch (status) {
397
398
  case UploadStatus.Uploading:
398
- return '上传中';
399
+ return $t('webui.components.form.upload.uploading');
399
400
  case UploadStatus.Success:
400
- return '上传完成';
401
+ return $t('webui.components.form.upload.uploadComplete');
401
402
  case UploadStatus.Error:
402
- return '上传失败';
403
+ return $t('webui.components.form.upload.uploadFailed');
403
404
  case UploadStatus.Online:
404
- return '在线';
405
+ return $t('webui.common.online');
405
406
  case UploadStatus.Offline:
406
- return '已下线';
407
+ return $t('webui.common.offline');
407
408
  default:
408
- return '待上传';
409
+ return $t('webui.components.form.upload.pendingUpload');
409
410
  }
410
411
  };
411
412
  </script>
@@ -416,11 +417,13 @@ const getStatus = (status?: UploadStatus) => {
416
417
  <div class="w-35 mx-3 flex gap-2">
417
418
  <Upload ref="fileUploader" v-bind="uploadProps"
418
419
  v-auth="{ role: ['Super', 'Admin'], permit: ':uploadlist:upload' }">
419
- <Button :class="[errInfo?.errClass + '-text']">选择文件</Button>
420
+ <Button :class="[errInfo?.errClass + '-text']">{{ $t('webui.components.form.upload.selectFile')
421
+ }}</Button>
420
422
  </Upload>
421
423
  <Upload v-if="showFolderUpload" ref="fileFolderUploader" :webkitdirectory="true" :directory="true" v-bind="folderUploadProps"
422
424
  v-auth="{ role: ['Super', 'Admin'], permit: ':uploadlist:upload' }">
423
- <Button :class="[errInfo?.errClass + '-text']">选择目录</Button>
425
+ <Button :class="[errInfo?.errClass + '-text']">{{ $t('webui.components.form.upload.selectDirectory')
426
+ }}</Button>
424
427
  </Upload>
425
428
  </div>
426
429
  <div class="flex-1 text-sm text-gray-500" :class="[errInfo?.errClass + '-text']">
@@ -444,17 +447,17 @@ const getStatus = (status?: UploadStatus) => {
444
447
  <div class="mr-2" v-if="
445
448
  showOnlineSwitch && (file.status == UploadStatus.Online || file.status == UploadStatus.Offline)
446
449
  ">
447
- <Tooltip title="上线或下线">
450
+ <Tooltip :title="$t('webui.components.form.upload.onlineOrOffline')">
448
451
  <Switch v-model:checked="file.status" :data="[
449
- { label: '上线', value: UploadStatus.Online },
450
- { label: '下线', value: UploadStatus.Offline },
452
+ { label: $t('webui.common.online'), value: UploadStatus.Online },
453
+ { label: $t('webui.common.offline'), value: UploadStatus.Offline },
451
454
  ]" @change="onlineOrOffline(file)"
452
455
  v-auth="{ role: ['Super', 'Admin'], permit: ':uploadlist:online' }" />
453
456
  </Tooltip>
454
457
  </div>
455
458
  <div class="flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
456
459
  v-if="downloadUrl && (file.status == UploadStatus.Online || file.status == UploadStatus.Offline)">
457
- <Tooltip title="下载">
460
+ <Tooltip :title="$t('webui.common.download')">
458
461
  <ToolIcon icon="icon-download"
459
462
  v-auth="{ role: ['Super', 'Admin'], permit: ':uploadlist:download' }" clickable
460
463
  @click="downloadFile(index)" />
@@ -465,7 +468,7 @@ const getStatus = (status?: UploadStatus) => {
465
468
  </div>
466
469
  <div class="flex items-center text-blue-500 hover:text-blue-700 mr-1 cursor-pointer"
467
470
  v-if="previewUrl && (file.status == UploadStatus.Online || file.status == UploadStatus.Offline)">
468
- <Tooltip title="预览">
471
+ <Tooltip :title="$t('webui.common.preview')">
469
472
  <ToolIcon icon="icon-eye" v-auth="{ role: ['Super', 'Admin'], permit: ':uploadlist:preview' }"
470
473
  clickable @click="previewFile(index)" />
471
474
  <span v-if="showActionText" class="mr-2 text-sm text-nowrap"
@@ -475,10 +478,11 @@ const getStatus = (status?: UploadStatus) => {
475
478
  </div>
476
479
  <div v-if="showDelete !== false"
477
480
  class="flex items-center text-red-500 hover:text-red-700 cursor-pointer">
478
- <Popconfirm :open="confirmIndex(index)" cancelText="" okText="是" title="确定删除该文件吗?"
481
+ <Popconfirm :open="confirmIndex(index)" :cancelText="$t('webui.common.no')"
482
+ :okText="$t('webui.common.yes')" :title="$t('webui.components.form.upload.deleteConfirm')"
479
483
  :okButtonProps="{ size: 'small' }" :cancelButtonProps="{ size: 'small' }"
480
484
  @confirm="removeFile(index)" @cancel="delIndex = -1">
481
- <Tooltip title="删除">
485
+ <Tooltip :title="$t('webui.common.delete')">
482
486
  <div @click="confirmDelFile(index, file.status)">
483
487
  <ToolIcon icon="icon-new" :angle="45"
484
488
  v-auth="{ role: ['Super', 'Admin'], permit: ':uploadlist:delete' }" clickable />
@@ -18,16 +18,16 @@ const confirmExit = () => {
18
18
  };
19
19
  </script>
20
20
  <template>
21
- <Tooltip :title="$t('webui.layout.header.exitPlatform')">
21
+ <Tooltip :title="$t('webui.components.layout.header.exitPlatform')">
22
22
  <ToolIcon icon="icon-logout" @click="open = true" clickable class="w-5 h-5"
23
- :title="$t('webui.layout.header.exitSystem')" />
23
+ :title="$t('webui.components.layout.header.exitSystem')" />
24
24
  </Tooltip>
25
- <Modal v-model:open="open" :title="$t('webui.layout.header.confirmExit')" :ok-text="$t('webui.common.confirm')"
26
- :cancel-text="$t('webui.common.cancel')" :width="380" @ok="confirmExit">
25
+ <Modal v-model:open="open" :title="$t('webui.components.layout.header.confirmExit')"
26
+ :ok-text="$t('webui.common.confirm')" :cancel-text="$t('webui.common.cancel')" :width="380" @ok="confirmExit">
27
27
  <Flex align="center" justify="flex-start" :style="{ padding: '0 32px', margin: '20px 0' }">
28
28
  <ToolIcon icon="icon-question-circle" color="orange" class="w-[60px] h-[60px]" />
29
29
  <div style="margin: 0 0 0 20px; font-weight: 400; font-size: 16px">{{
30
- $t('webui.layout.header.exitConfirmMessage') }}</div>
30
+ $t('webui.components.layout.header.exitConfirmMessage') }}</div>
31
31
  </Flex>
32
32
  </Modal>
33
33
  </template>
@@ -44,7 +44,7 @@ const closeTab = (key: string) => {
44
44
  <span class="flex">
45
45
  {{ pane.title }}
46
46
  </span>
47
- <Tooltip title="关闭" placement="top" size="small">
47
+ <Tooltip :title="$t('webui.common.close')" placement="top" size="small">
48
48
  <div
49
49
  class="inline-block mx-auto relative flex items-center"
50
50
  v-if="pageInfoStore.TabPanes.length > 1 && pane.closable"
@@ -1,4 +1,5 @@
1
1
  import { OptionItemProps } from '@/typings/option';
2
+ import { $t } from '@/locales/index';
2
3
 
3
4
  /**
4
5
  * 静态选项
@@ -52,13 +53,13 @@ export class OPTIONS {
52
53
  */
53
54
  static EnableDisable = [
54
55
  {
55
- label: '启用',
56
- text: '✅ 启用',
56
+ label: $t('webui.common.enable'),
57
+ text: `✅ ${$t('webui.common.enable')}`,
57
58
  value: 1,
58
59
  },
59
60
  {
60
- label: '停用',
61
- text: '🚫 停用',
61
+ label: $t('webui.common.disable'),
62
+ text: `🚫 ${$t('webui.common.disable')}`,
62
63
  value: 0,
63
64
  },
64
65
  ];
@@ -70,13 +71,13 @@ export class OPTIONS {
70
71
  */
71
72
  static SuccessResult = [
72
73
  {
73
- label: '成功',
74
- text: '✅ 成功',
74
+ label: $t('webui.common.success'),
75
+ text: `✅ ${$t('webui.common.success')}`,
75
76
  value: 1,
76
77
  },
77
78
  {
78
- label: '失败',
79
- text: '🚫 失败',
79
+ label: $t('webui.common.failed'),
80
+ text: `🚫 ${$t('webui.common.failed')}`,
80
81
  value: 0,
81
82
  },
82
83
  ];
@@ -88,13 +89,13 @@ export class OPTIONS {
88
89
  */
89
90
  static YesNo = [
90
91
  {
91
- label: '',
92
- text: '✅ ',
92
+ label: $t('webui.common.yes'),
93
+ text: `✅ ${$t('webui.common.yes')}`,
93
94
  value: 1,
94
95
  },
95
96
  {
96
- label: '',
97
- text: '❎ ',
97
+ label: $t('webui.common.no'),
98
+ text: `❎ ${$t('webui.common.no')}`,
98
99
  value: 0,
99
100
  },
100
101
  ];
@@ -106,13 +107,13 @@ export class OPTIONS {
106
107
  */
107
108
  static MaleFemale = [
108
109
  {
109
- label: '',
110
- text: ' 👨',
110
+ label: $t('webui.common.male'),
111
+ text: `${$t('webui.common.male')} 👨`,
111
112
  value: 'M',
112
113
  },
113
114
  {
114
- label: '',
115
- text: ' 👩',
115
+ label: $t('webui.common.female'),
116
+ text: `${$t('webui.common.female')} 👩`,
116
117
  value: 'F',
117
118
  },
118
119
  ];