@liujitcn/kratos-admin-system 0.0.48 → 0.0.49

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.
@@ -6,6 +6,8 @@ export interface LogDetailField {
6
6
  key: string;
7
7
  /** 字段在详情弹窗中的显示名称。 */
8
8
  label: string;
9
+ /** 字段内容在详情弹窗中的对齐方式。 */
10
+ align?: "left" | "center" | "right";
9
11
  /** 字段占用的描述列数,未设置时使用一列。 */
10
12
  span?: number;
11
13
  /** 是否按格式化 JSON 的代码块展示。 */
@@ -4,7 +4,13 @@
4
4
 
5
5
  <ProDialog v-model="dialog.visible" :title="config.detailTitle" width="1280px" @close="handleCloseDialog">
6
6
  <el-descriptions border :column="2" class="detail-container">
7
- <el-descriptions-item v-for="field in config.detailFields" :key="field.key" :label="field.label" :span="field.span ?? 1">
7
+ <el-descriptions-item
8
+ v-for="field in config.detailFields"
9
+ :key="field.key"
10
+ :label="field.label"
11
+ :span="field.span ?? 1"
12
+ :align="field.align"
13
+ >
8
14
  <pre v-if="field.code" class="code-block">{{ formatField(field) }}</pre>
9
15
  <span v-else>{{ formatField(field) }}</span>
10
16
  </el-descriptions-item>
@@ -55,6 +61,8 @@ export interface LogDetailField {
55
61
  key: string;
56
62
  /** 字段在详情弹窗中的显示名称。 */
57
63
  label: string;
64
+ /** 字段内容在详情弹窗中的对齐方式。 */
65
+ align?: "left" | "center" | "right";
58
66
  /** 字段占用的描述列数,未设置时使用一列。 */
59
67
  span?: number;
60
68
  /** 是否按格式化 JSON 的代码块展示。 */
@@ -64,7 +64,7 @@ const config = computed<LogTableConfig>(() => ({
64
64
  { key: "user_id", label: t("system.base.log.field.user_id") },
65
65
  { key: "user_name", label: t("system.base.log.field.user_name") },
66
66
  { key: "resource_type", label: t("system.base.log.field.resource_type") },
67
- { key: "resource_id", label: t("system.base.log.field.resource_id") },
67
+ { key: "resource_id", label: t("system.base.log.field.resource_id"), align: "left" },
68
68
  { key: "access_type", label: t("system.base.log.field.access_type"), enum: accessTypeOptions.value },
69
69
  { key: "data_source", label: t("system.base.log.field.data_source") },
70
70
  { key: "table_name", label: t("system.base.log.field.table_name") },
@@ -190,6 +190,7 @@ const columns = computed<ColumnProps[]>(() => [
190
190
  prop: "tenant_id",
191
191
  label: t("common.field.tenant"),
192
192
  minWidth: 140,
193
+ align: "left",
193
194
  showOverflowTooltip: true,
194
195
  search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
195
196
  enum: requestTenantOptions
@@ -112,7 +112,7 @@ const columns = computed<ColumnProps[]>(() => [
112
112
  { prop: "mime_type", label: t("system.base.file.field.mime"), minWidth: 180 },
113
113
  { prop: "size", label: t("system.base.file.field.size"), width: 120, align: "right", render: scope => formatFileSize((scope.row as BaseFile).size) },
114
114
  { prop: "content_hash", label: t("system.base.file.field.hash"), minWidth: 220 },
115
- { prop: "tenant_id", label: t("system.base.file.field.tenant"), width: 100, align: "right" },
115
+ { prop: "tenant_id", label: t("system.base.file.field.tenant"), width: 100, align: "left" },
116
116
  { prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
117
117
  {
118
118
  prop: "operation",
@@ -96,6 +96,7 @@ const columns = computed<ColumnProps[]>(() => [
96
96
  prop: "job_id",
97
97
  label: t("system.base.job.field.name"),
98
98
  minWidth: 180,
99
+ align: "left",
99
100
  search: {
100
101
  el: "select",
101
102
  defaultValue: initialJobID > 0 ? initialJobID : undefined,
@@ -39,7 +39,7 @@ const loginTypeOptions = computed(() =>
39
39
 
40
40
  const columns = computed<ColumnProps[]>(() => [
41
41
  { prop: "user_name", label: t("system.base.log.field.user_name"), minWidth: 130 },
42
- { prop: "tenant_code", label: t("system.base.log.field.tenant_code"), minWidth: 120 },
42
+ { prop: "tenant_code", label: t("system.base.log.field.tenant_code"), minWidth: 120, align: "left" },
43
43
  {
44
44
  prop: "login_type",
45
45
  label: t("system.base.log.field.login_type"),
@@ -364,6 +364,7 @@ const columns = computed<ColumnProps[]>(() => [
364
364
  prop: "tenant_id",
365
365
  label: t("common.field.tenant"),
366
366
  minWidth: 120,
367
+ align: "left",
367
368
  search: { el: "select" },
368
369
  enum: requestTenantOptions
369
370
  }
@@ -190,6 +190,7 @@ const columns = computed<ColumnProps[]>(() => [
190
190
  prop: "tenant_id",
191
191
  label: t("common.field.tenant"),
192
192
  minWidth: 130,
193
+ align: "left",
193
194
  search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
194
195
  enum: requestTenantOptions,
195
196
  render: scope =>
@@ -38,6 +38,7 @@ const columns = computed<ColumnProps[]>(() => [
38
38
  prop: "tenant_code",
39
39
  label: t("common.field.tenant"),
40
40
  minWidth: 130,
41
+ align: "left",
41
42
  search: isDefaultTenant.value ? { el: "select", props: { filterable: true }, order: 1 } : undefined,
42
43
  enum: requestSessionTenantOptions
43
44
  },
@@ -37,7 +37,7 @@ const actionOptions = computed(() => createLogEnumOptions([
37
37
  ]));
38
38
  const columns = computed<ColumnProps[]>(() => [
39
39
  { prop: "resource_type", label: t("system.base.log.field.resource_type"), minWidth: 150, search: { el: "input" } },
40
- { prop: "resource_id", label: t("system.base.log.field.resource_id"), minWidth: 120, align: "right" },
40
+ { prop: "resource_id", label: t("system.base.log.field.resource_id"), minWidth: 120, align: "left" },
41
41
  { prop: "resource_name", label: t("system.base.log.field.resource_name"), minWidth: 160 },
42
42
  { prop: "action", label: t("system.base.log.field.action"), minWidth: 110, search: { el: "select", enum: actionOptions.value }, render: scope => logEnumLabel(actionOptions.value, (scope.row as BaseOperationLog).action) },
43
43
  { prop: "result", label: t("system.base.log.field.result"), minWidth: 110, search: { el: "select", enum: resultOptions.value }, render: scope => logEnumLabel(resultOptions.value, (scope.row as BaseOperationLog).result) },
@@ -58,7 +58,7 @@ const config = computed<LogTableConfig>(() => ({
58
58
  { key: "user_id", label: t("system.base.log.field.user_id") },
59
59
  { key: "user_name", label: t("system.base.log.field.user_name") },
60
60
  { key: "resource_type", label: t("system.base.log.field.resource_type") },
61
- { key: "resource_id", label: t("system.base.log.field.resource_id") },
61
+ { key: "resource_id", label: t("system.base.log.field.resource_id"), align: "left" },
62
62
  { key: "resource_name", label: t("system.base.log.field.resource_name") },
63
63
  { key: "action", label: t("system.base.log.field.action"), enum: actionOptions.value },
64
64
  { key: "result", label: t("system.base.log.field.result"), enum: resultOptions.value },
@@ -185,6 +185,7 @@ const columns = computed<ColumnProps[]>(() => [
185
185
  prop: "tenant_id",
186
186
  label: t("common.field.tenant"),
187
187
  minWidth: 140,
188
+ align: "left",
188
189
  showOverflowTooltip: true,
189
190
  search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
190
191
  enum: requestTenantOptions
@@ -308,6 +308,7 @@ const columns = computed<ColumnProps[]>(() => [
308
308
  prop: "tenant_id",
309
309
  label: t("common.field.tenant"),
310
310
  minWidth: 140,
311
+ align: "left",
311
312
  showOverflowTooltip: true,
312
313
  search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
313
314
  enum: requestTenantOptions
@@ -470,6 +470,7 @@ const columns = computed<ColumnProps[]>(() => [
470
470
  prop: "tenant_id",
471
471
  label: t("common.field.tenant"),
472
472
  minWidth: 140,
473
+ align: "left",
473
474
  showOverflowTooltip: true,
474
475
  search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
475
476
  enum: requestTenantOptions
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@liujitcn/kratos-admin-system",
3
3
  "private": false,
4
- "version": "0.0.48",
4
+ "version": "0.0.49",
5
5
  "type": "module",
6
6
  "description": "kratos-admin system management module",
7
7
  "license": "MIT",
@@ -16,7 +16,7 @@
16
16
  "sortablejs": "^1.15.2",
17
17
  "swagger-ui-dist": "^5.32.15",
18
18
  "vue-element-plus-x": "^2.0.3",
19
- "@liujitcn/kratos-admin-core": "0.0.48"
19
+ "@liujitcn/kratos-admin-core": "0.0.49"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@element-plus/icons-vue": "^2.3.1",