# \_.defaultsDeep

**语法：**

```javascript
_.defaultsDeep(object, [sources])
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L12835)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.defaultsdeep)

**描述：**

这个方法类似[`_.defaults`](https://lodash.com/docs/4.17.10#defaults)，除了它会递归分配默认属性。

> **注意:**&#x8FD9;方法会改变`object`.

**开始版本：**&#x33;.10.0

**参数：**

* `object (Object)`: 目标对象。
* `[sources] (...Object)`: 来源对象。

**返回值：**

* `(Object)`: 返回 object。

**例子：**

```javascript
_.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
// => { 'a': { 'b': 2, 'c': 3 } }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lodash.shujuwajue.com/object/defaultsdeep.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
