befly-admin 3.6.8 → 3.6.12

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly-admin",
3
- "version": "3.6.8",
4
- "gitHead": "f97afb740dabb7d42dd1f9d6bae5ec4744359d1c",
3
+ "version": "3.6.12",
4
+ "gitHead": "9c9fd0cd8165bb5b4025e538a3c5fb228acb39cd",
5
5
  "private": false,
6
6
  "description": "Befly Admin - 基于 Vue3 + TDesign Vue Next 的后台管理系统",
7
7
  "files": [
@@ -29,11 +29,11 @@
29
29
  "preview": "vite preview"
30
30
  },
31
31
  "dependencies": {
32
- "@befly-addon/admin": "^1.2.8",
32
+ "@befly-addon/admin": "^1.2.12",
33
33
  "@iconify-json/lucide": "^1.2.82",
34
34
  "axios": "^1.13.2",
35
- "befly-shared": "^1.3.5",
36
- "befly-vite": "^1.2.6",
35
+ "befly-shared": "^1.3.8",
36
+ "befly-vite": "^1.2.9",
37
37
  "pinia": "^3.0.4",
38
38
  "tdesign-vue-next": "^1.17.7",
39
39
  "unplugin-vue-router": "^0.19.0",
@@ -72,7 +72,9 @@ const props = defineProps({
72
72
  * 标准化字段配置,支持 columns 和 fields 两种格式
73
73
  */
74
74
  const normalizedFields = computed(() => {
75
- return props.fields
75
+ const dataId = props.data && typeof props.data.id !== "undefined" ? props.data.id : undefined;
76
+
77
+ const fields = props.fields
76
78
  .filter((item) => {
77
79
  const key = item.colKey || item.key;
78
80
  return key && !props.excludeKeys.includes(key);
@@ -83,6 +85,18 @@ const normalizedFields = computed(() => {
83
85
  default: item.default,
84
86
  formatter: item.formatter
85
87
  }));
88
+
89
+ // 约定:页面表格不展示 id,但右侧详情始终展示 id(如果 data.id 存在)
90
+ if (typeof dataId !== "undefined" && !fields.some((f) => f.key === "id")) {
91
+ fields.unshift({
92
+ key: "id",
93
+ label: "ID",
94
+ default: "-",
95
+ formatter: undefined
96
+ });
97
+ }
98
+
99
+ return fields;
86
100
  });
87
101
 
88
102
  /**