Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 YUI3 中深度克隆一个对象?在 jquery 中,它通常会按如下方式完成
var clone = jQuery.extend(true, {}, object);
使用oop 模块提供的克隆方法。
YUI().use("oop", function (Y) { var obj = { foo: ["bar", "baz", "biz"] }, clone = Y.clone(obj, true); });