@steedos-labs/content-compliance 0.8.27 → 0.8.28

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.
@@ -1,21 +1,6 @@
1
1
  name: pls_file
2
2
  amis:
3
3
  id: 'u:be441c91bd73'
4
- # 覆盖平台默认的 file 只读渲染。平台默认取 ${pls_file|asArray} 的 value/name,
5
- # 该值只有列表视图的响应适配器(getTableApi)会重写成对象数组; lookup 弹窗(picker)的
6
- # 适配器没有这段重写, 字段值仍是裸文件 id 字符串, 导致 value 取空 ->
7
- # 点击后打开 cfs_files_filerecord 记录抽屉时报"无法找到记录"。
8
- # 这里统一改为从 _display 取值(列表、lookup 弹窗、记录详情三处都有 _display),
9
- # 并去掉 url 上的 download 参数, 让 PDF 在新标签页内联预览而不是直接下载。
10
- body:
11
- type: each
12
- source: '${_display.pls_file|asArray}'
13
- className: flex flex-col
14
- items:
15
- type: tpl
16
- tpl: >-
17
- <% if(data && data.url){ %><a href="<%= data.url.split('?')[0] %>"
18
- target="_blank"><%= data.name %></a><% } %>
19
4
  group: 上传信息
20
5
  is_wide: true
21
6
  label: PLS文件
@@ -3,6 +3,28 @@ columns:
3
3
  - field: pls_file
4
4
  width: '300'
5
5
  wrap: true
6
+ # 覆盖平台默认的 file 列渲染。必须写在"列"上而不是字段上:
7
+ # 平台构列时是 Object.assign({}, uiSchema.fields[column.field], {width, wrap, amis: column.amis}),
8
+ # 即列上的 amis 会直接覆盖字段上的 amis(没配就覆盖成 undefined), 普通列表视图与 lookup 弹窗都如此。
9
+ #
10
+ # 平台默认取 ${pls_file|asArray} 的 value/name, 该值只有普通列表视图的响应适配器
11
+ # (getTableApi)会重写成 [{value,name,url}]; lookup 弹窗(lookupToAmisPicker)的适配器没有
12
+ # 这段重写, 字段值仍是裸文件 id 字符串, each 遍历基础类型时作用域只有 {item,index} ->
13
+ # value 取空, 点击打开 cfs_files_filerecord 记录抽屉时报"无法找到记录"。
14
+ #
15
+ # 这里改为从 _display 取值(列表、lookup 弹窗、记录详情三处都有 _display), 并用 split 去掉
16
+ # url 上的 download 参数 —— /api/files/:collection/:id 的判断是 typeof download !== "undefined",
17
+ # 任何值都会返回 Content-Disposition: attachment, 去掉整个参数才是 inline, PDF 才能内联预览。
18
+ amis:
19
+ body:
20
+ type: each
21
+ source: '${_display.pls_file|asArray}'
22
+ className: flex flex-col
23
+ items:
24
+ type: tpl
25
+ tpl: >-
26
+ <% if(data && data.url){ %><a href="<%= data.url.split('?')[0] %>"
27
+ target="_blank"><%= data.name %></a><% } %>
6
28
  - field: product_name
7
29
  - field: brand
8
30
  - field: issue_date
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/content-compliance",
3
- "version": "0.8.27",
3
+ "version": "0.8.28",
4
4
  "description": "内容审核系统",
5
5
  "main": "package.service.js",
6
6
  "scripts": {