您好我想将json对象转换为特殊字符转义的字符串.
以下是示例
{
"xtype": "window",
"height": 250,
"width": 400,
"bodyPadding": "20 0 0 20",
"title": "Configuration",
"modal": true,
"items": [
{
"xtype": "textfield",
"fieldLabel": "Deploy Path"
},
{
"xtype": "textfield",
"fieldLabel": "Save Path"
},
{
"xtype": "button",
"margin": "20 0 0 100",
"text": "Save"
}
]
}
Run Code Online (Sandbox Code Playgroud)
以上对象
{\n \"xtype\": \"window\",\n \"height\": 250,\n \"width\": 400,\n \"bodyPadding\": \"20 0 0 20\",\n \"title\": \"Configuration\",\n \"modal\": true,\n \"items\": [\n {\n \"xtype\": \"textfield\",\n \"fieldLabel\": \"Deploy Path\"\n },\n {\n \"xtype\": \"textfield\",\n \"fieldLabel\": \"Save Path\"\n },\n …Run Code Online (Sandbox Code Playgroud) 我正在以编程方式设置复选框,
因为我动态设置它,我想暂停(更改事件)它上面的事件,因为在更改复选框时我还有其他一些事情需要执行.
我已经尝试使用以下代码但它不起作用.
checkbox.suspendEvents(false);
checkbox.setValue(true);
checkbox.resumeEvents();
Run Code Online (Sandbox Code Playgroud)
谢谢