mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-02-27 09:32:01 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div></div>
|
||||
<p><code><strong>set()</strong></code> 方法根据指定的<code>key和</code><code>value在</code> <code>WeakMap对象中添加新/更新元素。</code></p>
|
||||
<h2 id="语法">语法</h2>
|
||||
<pre class="syntaxbox"><code><em>wm</em>.set(key, value);</code></pre>
|
||||
<pre><code class="language-javascript"><code><em>wm</em>.set(key, value);</code></code></pre>
|
||||
<h3 id="参数">参数</h3>
|
||||
<dl>
|
||||
<dt>key</dt>
|
||||
@@ -14,7 +14,7 @@
|
||||
<p><code>该WeakMap对象</code></p>
|
||||
<h2 id="例子">例子</h2>
|
||||
<h3 id="使用set方法"><code>使用set方法</code></h3>
|
||||
<pre class="brush: js">var wm = new WeakMap();
|
||||
<pre><code class="language-javascript">var wm = new WeakMap();
|
||||
var obj = {};
|
||||
|
||||
// Add new elements to the WeakMap
|
||||
@@ -22,7 +22,7 @@ wm.set(obj, "foo").set(window, "bar"); // chainable
|
||||
|
||||
// Update an element in the WeakMap
|
||||
wm.set(obj, "baz");
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="规范">规范</h2>
|
||||
<table class="standard-table">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user