{"__config__":{"label":"FName","labelWidth":null,"showLabel":true,"tag":"el-input","iotKey":"input","tagIcon":"icon-ym icon-ym-generator-input","defaultValue":"","required":true,"layout":"colFormItem","span":24,"trigger":"blur","regList":[],"formId":111,"renderKey":1649230907391,"submenu":"机构名称"},"__slot__":{"prepend":"","append":""},"placeholder":"请输入FName","style":{"width":"100%"},"clearable":true,"readonly":false,"disabled":false,"prefix-icon":"","suffix-icon":"","maxlength":null,"show-word-limit":false,"type":"text","__expand__":{"visiable":true,"formEditShow":true,"formAddShow":true,"formDetailShow":true,"tableRowShow":true,"tableCopy":true,"tableFixed":"","tableAlign":"left","listWidth":150,"inquire":3,"labelColor":null,"topic":"","group":""},"__vModel__":"FName"}
时间: 2023-07-06 22:39:06 浏览: 79
SLM_control_GUI:GUI控制全息成像刺激显微镜
好的,这是一个符合JSON格式的字符串,可以通过JSON.parse()方法将其转换为JSON对象。具体的代码如下:
```
const jsonString = '{"__config__":{"label":"FName","labelWidth":null,"showLabel":true,"tag":"el-input","iotKey":"input","tagIcon":"icon-ym icon-ym-generator-input","defaultValue":"","required":true,"layout":"colFormItem","span":24,"trigger":"blur","regList":[],"formId":111,"renderKey":1649230907391,"submenu":"机构名称"},"__slot__":{"prepend":"","append":""},"placeholder":"请输入FName","style":{"width":"100%"},"clearable":true,"readonly":false,"disabled":false,"prefix-icon":"","suffix-icon":"","maxlength":null,"show-word-limit":false,"type":"text","__expand__":{"visiable":true,"formEditShow":true,"formAddShow":true,"formDetailShow":true,"tableRowShow":true,"tableCopy":true,"tableFixed":"","tableAlign":"left","listWidth":150,"inquire":3,"labelColor":null,"topic":"","group":""},"__vModel__":"FName"}';
const jsonObj = JSON.parse(jsonString);
console.log(jsonObj);
```
输出的结果如下:
```
{
__config__: {
label: 'FName',
labelWidth: null,
showLabel: true,
tag: 'el-input',
iotKey: 'input',
tagIcon: 'icon-ym icon-ym-generator-input',
defaultValue: '',
required: true,
layout: 'colFormItem',
span: 24,
trigger: 'blur',
regList: [],
formId: 111,
renderKey: 1649230907391,
submenu: '机构名称'
},
__slot__: { prepend: '', append: '' },
placeholder: '请输入FName',
style: { width: '100%' },
clearable: true,
readonly: false,
disabled: false,
'prefix-icon': '',
'suffix-icon': '',
maxlength: null,
'show-word-limit': false,
type: 'text',
__expand__: {
visiable: true,
formEditShow: true,
formAddShow: true,
formDetailShow: true,
tableRowShow: true,
tableCopy: true,
tableFixed: '',
tableAlign: 'left',
listWidth: 150,
inquire: 3,
labelColor: null,
topic: '',
group: ''
},
__vModel__: 'FName'
}
```
阅读全文