Commit 3b53ec83 by liyijie

feat: 对array其他字段的处理

parent 7e2cb924
...@@ -235,11 +235,15 @@ module TalltyImportExport ...@@ -235,11 +235,15 @@ module TalltyImportExport
'是' '是'
elsif data.is_a?(FalseClass) elsif data.is_a?(FalseClass)
'否' '否'
elsif data.is_a?(Array) && data.first&.dig('url').present? elsif data.is_a?(Array)
# 文件array if data.first&.dig('url').present?
data.map do |item| # 文件array
item.dig('url') data.map do |item|
end.compact.join("\n") item.dig('url')
end.compact.join("\n")
else
data.map(&:to_s).compact.join("\n")
end
else else
data data
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment