node-red/packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-CSV.html

44 lines
2.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="csv">
<p>在CSV格式的字符串及其JavaScript对象表示形式之间进行相互转换</p>
<h3>输入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 数组 | 字符串</span></dt>
<dd>JavaScript对象数组或CSV字符串</dd>
</dl>
<h3>输出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 数组 | 字符串</span></dt>
<dd>
<ul>
<li>如果输入是字符串它将尝试将其解析为CSV并为每行创建键/值对的JavaScript对象然后该节点将为每行发送一条消息或者发送一条包含对象数组的消息</li>
<li>如果输入是JavaScript对象它将尝试构建CSV字符串</li>
<li>如果输入是简单值的数组则将构建单行CSV字符串</li>
<li>如果输入是数组数组或对象数组则会创建多行CSV字符串</li>
</ul>
</dd>
</dl>
<h3>详细</h3>
<p>列模板可以包含列名称的有序列表将CSV转换为对象时列名将用作属性名称或者也可以从CSV的第一行中获取列名称</p>
<p>转换为CSV时列模板用于标识从对象中提取的属性以及提取的顺序</p>
<p>如果输入是数组则列模板仅用于有选择地生成一行列标题</p>
<p>只要正确设置<code>parts</code></p>
<p>如果输出多个消息则将设置其<code>parts</code></p>
<p><b>注意</b>使</p>
</script>