This commit is contained in:
yumoqing 2024-05-16 19:39:28 +08:00
parent 0c6000432b
commit 8c3d9cd9df

View File

@ -96,6 +96,9 @@ bricks.str2data = function(s, d){
return s; return s;
} }
bricks.apply_data = function(desc, data){ bricks.apply_data = function(desc, data){
if (data == {}){
return desc;
}
var tmpl = JSON.stringify(desc); var tmpl = JSON.stringify(desc);
var s = bricks.obj_fmtstr(data, tmpl); var s = bricks.obj_fmtstr(data, tmpl);
return JSON.parse(s); return JSON.parse(s);