@steedos-labs/content-compliance 0.8.28 → 0.8.29
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.
|
@@ -5,31 +5,63 @@ columns:
|
|
|
5
5
|
wrap: true
|
|
6
6
|
# 覆盖平台默认的 file 列渲染。必须写在"列"上而不是字段上:
|
|
7
7
|
# 平台构列时是 Object.assign({}, uiSchema.fields[column.field], {width, wrap, amis: column.amis}),
|
|
8
|
-
#
|
|
8
|
+
# 列上的 amis 会直接覆盖字段上的 amis(没配就覆盖成 undefined), 普通列表视图与 lookup 弹窗都如此。
|
|
9
9
|
#
|
|
10
|
-
#
|
|
11
|
-
# (getTableApi)
|
|
12
|
-
#
|
|
13
|
-
# value 取空,
|
|
10
|
+
# 平台默认的 items 取 ${value} 作为 cfs_files_filerecord 的 recordId, 而该值只有普通列表视图的
|
|
11
|
+
# 响应适配器(getTableApi)会把字段值重写成 [{value,name,url}]; lookup 弹窗(lookupToAmisPicker)的
|
|
12
|
+
# 适配器没有这段重写, 字段值仍是裸文件 id 字符串, each 遍历基础类型时作用域只有 {item,index} ->
|
|
13
|
+
# ${value} 取空, 抽屉里查不到记录报"无法找到记录", ${name} 还会沿作用域链落到行记录自己的 name。
|
|
14
14
|
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
15
|
+
# 所以这里保留平台原本的"右侧抽屉预览附件"交互, 只把取值换成 picker 里能拿到的:
|
|
16
|
+
# recordId 用 ${item}(each 对字符串成员会把原值放进 item), 链接文字用 ${_display.pls_file.name}。
|
|
17
|
+
# 抽屉内容用 steedos-page-record-detail 加载 cfs_files_filerecord 的记录页
|
|
18
|
+
# (cfs_files_record_preview/附件历史版本详细, 即"预览/详细/相关"三个页签 + 内嵌 PDF 阅读器)。
|
|
19
|
+
# 注意该组件不认 recordId 这个 prop(源码里解构了但没用), recordId 必须从数据域传。
|
|
18
20
|
amis:
|
|
19
21
|
body:
|
|
20
22
|
type: each
|
|
21
|
-
source: '${
|
|
23
|
+
source: '${pls_file|asArray}'
|
|
22
24
|
className: flex flex-col
|
|
23
25
|
items:
|
|
24
|
-
type:
|
|
26
|
+
type: static
|
|
27
|
+
label: false
|
|
28
|
+
labelClassName: hidden
|
|
29
|
+
className: m-0
|
|
25
30
|
tpl: >-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
<a href="/app/-/cfs_files_filerecord/view/${item}"
|
|
32
|
+
onclick="return false;">${_display.pls_file.name}</a>
|
|
33
|
+
onEvent:
|
|
34
|
+
click:
|
|
35
|
+
actions:
|
|
36
|
+
- actionType: drawer
|
|
37
|
+
preventDefault: true
|
|
38
|
+
drawer:
|
|
39
|
+
type: drawer
|
|
40
|
+
title: ' '
|
|
41
|
+
headerClassName: hidden
|
|
42
|
+
size: lg
|
|
43
|
+
width: 70%
|
|
44
|
+
bodyClassName: p-0 m-0 bg-gray-100
|
|
45
|
+
className: steedos-record-detail-drawer app-popover
|
|
46
|
+
closeOnEsc: true
|
|
47
|
+
closeOnOutside: true
|
|
48
|
+
resizable: true
|
|
49
|
+
actions: []
|
|
50
|
+
data:
|
|
51
|
+
recordId: '${item}'
|
|
52
|
+
objectName: cfs_files_filerecord
|
|
53
|
+
_inDrawer: true
|
|
54
|
+
recordLoaded: false
|
|
55
|
+
body:
|
|
56
|
+
- type: steedos-page-record-detail
|
|
57
|
+
objectApiName: cfs_files_filerecord
|
|
28
58
|
- field: product_name
|
|
29
59
|
- field: brand
|
|
30
60
|
- field: issue_date
|
|
31
61
|
- field: version
|
|
32
62
|
- field: sku
|
|
63
|
+
width: '500'
|
|
64
|
+
wrap: true
|
|
33
65
|
- field: is_active
|
|
34
66
|
crud_mode: table
|
|
35
67
|
filter_scope: space
|