tweak docs

This commit is contained in:
AllenFang
2018-01-20 16:00:32 +08:00
parent 786fd780b8
commit b612c3d524
6 changed files with 19 additions and 7 deletions

View File

@@ -5,7 +5,10 @@
nav.classList.toggle('docsSliderActive');
};
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><h1>Getting Started</h1></header><article><div><span><h2><a class="anchor" aria-hidden="true" name="installation"></a><a href="#installation" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Installation</h2>
<pre><code class="hljs css sh">$ npm install react-bootstrap-table2 --save
<blockquote>
<p>Due to <code>react-bootstrap-table2</code> already taked on npm so that our npm module name is <strong><code>react-bootstrap-table-next</code></strong>. Anyway, we still use or mention <code>react-bootstrap-table2</code> in any our git repository, offical website and documents!!, ony the npm name is different!!!!</p>
</blockquote>
<pre><code class="hljs css sh">$ npm install react-bootstrap-table-next --save
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="add-css"></a><a href="#add-css" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Add CSS</h2>
<blockquote>
@@ -13,13 +16,13 @@
</blockquote>
<p>Finish above step, let's add the <code>react-bootstrap-table2</code> styles:</p>
<pre><code class="hljs css js"><span class="hljs-comment">// es5 </span>
<span class="hljs-built_in">require</span>(<span class="hljs-string">'react-bootstrap-table/dist/react-bootstrap-table2.min.css'</span>);
<span class="hljs-built_in">require</span>(<span class="hljs-string">'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'</span>);
<span class="hljs-comment">// es6</span>
<span class="hljs-keyword">import</span> <span class="hljs-string">'react-bootstrap-table/dist/react-bootstrap-table2.min.css'</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'</span>;
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="your-first-table"></a><a href="#your-first-table" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Your First Table</h2>
<pre><code class="hljs css js"><span class="hljs-keyword">import</span> BootstrapTable <span class="hljs-keyword">from</span> <span class="hljs-string">'react-bootstrap-table2'</span>;
<pre><code class="hljs css js"><span class="hljs-keyword">import</span> BootstrapTable <span class="hljs-keyword">from</span> <span class="hljs-string">'react-bootstrap-table-next'</span>;
<span class="hljs-keyword">const</span> products = [ ... ];
<span class="hljs-keyword">const</span> columns = [{