手动格式化JS代码后,如下所示
txnDetailsTable = $('#transactionDetails').dataTable({
bLengthChange : false,
bInfo : false,
bSort : false,
autoWidth : false,
columnDefs : [ {"width" : "15%","targets" : 0},
{"width" : "7%","targets" : 1},
{"width" : "5%","targets" : 2},
{"width" : "33%","targets" : 3},
{"width" : "5%","targets" : 4},
{"width" : "5%","targets" : 5},
{"width" : "12%","targets" : 6},
{"width" : "13%","targets" : 7},
{"width" : "13%","targets" : 8}
],
aoColumns : [ {
"sType" : "date"
}, null, null, null, null, null, null, null, null ]
在按下 ctrl + shift + F 上面的JS代码格式后,更改如下。
txnDetailsTable = $('#transactionDetails').dataTable({
bLengthChange : false,
bInfo : false,
bSort : false,
autoWidth : false,
columnDefs : [ {
"width" : "15%",
"targets" : 0
}, {
"width" : "7%",
"targets" : 1
}, {
"width" : "5%",
"targets" : 2
}, {
"width" : "33%",
"targets" : 3
}, {
"width" : "5%",
"targets" : 4
}, {
"width" : "5%",
"targets" : 5
}, {
"width" : "12%",
"targets" : 6
}, {
"width" : "13%",
"targets" : 7
}, {
"width" : "13%",
"targets" : 8
} ],
aoColumns : [ {
"sType" : "date"
}, null, null, null, null, null, null, null, null ]
按 ctrl + shift + F 后如何保持上述格式?