Riku
2024-08-12 7c3c82d429f86358142adceb080e8922f6a18aa0
pages/inspection/scene/info/device-info-items.js
@@ -9,7 +9,7 @@
 * 生成一条表单条目
 * @param {String} _label 标签名称
 * @param {String} _name 字段名称
 * @param {String} _type 输入类型 (text: 输入框; switch: 切换按钮; picker: 下拉框选项)
 * @param {String} _type 输入类型 (text: 输入框; switch: 切换按钮; picker: 下拉框选项; cascader: 级联选择)
 * @param {Boolean} _required 是否为必填项
 * @param {Array} _options 当输入类型为picker时,提供可选项
 */
@@ -17,13 +17,15 @@
  return {
    required: _required,
    label: _label,
    placeholder: '请输入' + _label,
    placeholder: (_type == 'text' ? '请输入' : '请选择') + _label,
    name: _name,
    value: _type == 'switch' ? false : null,
    value: null,
    status: 'success',
    tips: _label + '不能为空',
    inputType: _type,
    options: _options,
    cascaderTitles: ['1', '2'],
    visible: false,
  };
}