2019-07-10 14:08:16 +08:00
|
|
|
export default `<div class="markdown-body"><h1 id="naiveui">naive-ui</h1>
|
|
|
|
<p>TuSimple Vue-Based Frontend Component Library</p>
|
|
|
|
<h2 id="documentation">Documentation</h2>
|
|
|
|
<p><a href="http://***REMOVED***/#/start">http://***REMOVED***/#/start</a></p>
|
|
|
|
<h2 id="repository">Repository</h2>
|
|
|
|
<p><a href="https://***REMOVED***/naive-ui/tree/develop">https://***REMOVED***/naive-ui/tree/develop</a></p>
|
|
|
|
<h2 id="developguidelines">Develop Guidelines</h2>
|
|
|
|
<h3 id="gitcommitmessagestyle">Git Commit Message Style</h3>
|
2019-07-10 14:16:25 +08:00
|
|
|
<p>You <strong>MUST</strong> follow <a href="https://gist.github.com/brianclements/841ea7bffdb01346392c">Angular Commit Format</a>.</p>
|
2019-07-10 14:08:16 +08:00
|
|
|
<p>If you want see some example, see <a href="https://github.com/angular/angular/commits/master">Angular Commits on Github</a>.</p>
|
|
|
|
<h3 id="codestyles">Code Styles</h3>
|
|
|
|
<h4 id="javascriptstyle">Javascript Style</h4>
|
2019-07-10 14:16:25 +08:00
|
|
|
<p>You <strong>MUST</strong> follow <a href="https://standardjs.com/">Standard JS</a>.</p>
|
2019-07-10 14:08:16 +08:00
|
|
|
<h4 id="scssstyle">SCSS Style</h4>
|
2019-07-10 14:40:25 +08:00
|
|
|
<p>Run <code>npm run lint-style</code> to check styles.</p>
|
2019-07-10 14:08:16 +08:00
|
|
|
<h4 id="checkboth">Check Both</h4>
|
|
|
|
<p>Run <code>npm run lint</code>
|
|
|
|
You <strong>MUST</strong> fix all lint warnings and errors before you push your branch.</p>
|
|
|
|
<h3 id="unittest">Unit test</h3>
|
|
|
|
<p>If you create a component, you <strong>MUST</strong> add unit test for it.</p>
|
|
|
|
<p>Run <code>npm run test</code> to test all components.
|
|
|
|
Run <code>npm run test-cov</code> to test all components and see detailed test coverage report.</p>
|
|
|
|
<h2 id="wanttoseehowcomponentworks">Want to see how component works</h2>
|
|
|
|
<ol>
|
2019-07-23 20:47:00 +08:00
|
|
|
<li>Run <code>npm run dev</code></li>
|
2019-07-10 14:08:16 +08:00
|
|
|
<li>Open <code>http://localhost:8086/</code> in browser.</li>
|
|
|
|
</ol>
|
|
|
|
<h2 id="wanttoaddyourowncomponent">Want to add your own component</h2>
|
2019-07-10 15:04:08 +08:00
|
|
|
<p>There is no guideline for now. If you want to know how to do it, you can explore by yourself or ask <code>lecong.zhang@tusimple.ai</code>.</p>
|
2019-07-10 14:08:16 +08:00
|
|
|
<h2 id="publishanewversion">Publish a new version</h2>
|
|
|
|
<ol>
|
|
|
|
<li>You <strong>MUST</strong> change your version according to <a href="https://semver.org/">semver</a></li>
|
|
|
|
<li><code>npm run release</code></li>
|
|
|
|
<li>You <strong>MAY</strong> publish documentation by running <code>npm run release-doc</code></li>
|
|
|
|
</ol>
|
|
|
|
<h2 id="installationusage">Installation & Usage</h2>
|
|
|
|
<p>First install it.</p>
|
|
|
|
<pre><code>npm install --save-dev naive-ui
|
|
|
|
</code></pre>
|
|
|
|
<p>Then add the following lines in you entry point js file.</p>
|
|
|
|
<pre><code>...
|
|
|
|
import naiveUi from 'naive-ui'
|
|
|
|
import 'naive-ui/dist/lib/index.css
|
|
|
|
|
|
|
|
Vue.use(naiveUi)
|
|
|
|
...
|
|
|
|
</code></pre>
|
|
|
|
<h2 id="componentdevelopstatus">Component Develop Status</h2>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Component</th>
|
2019-07-10 15:04:08 +08:00
|
|
|
<th style="text-align:center;">Develop status</th>
|
2019-07-10 14:08:16 +08:00
|
|
|
<th style="text-align:center;">Unit Test</th>
|
2019-07-10 15:04:08 +08:00
|
|
|
<th>Note</th>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>Alert</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Button</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">🆗</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Checkbox</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">🆗</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>DatePicker</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>GradientText</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">🆗</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Icon</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">🆗</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Input</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">🆗</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Message</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td>Code clean in need</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Modal</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td>Code clean in need</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Notification</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td>Code clean in need</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Pagination</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
|
|
|
<td style="text-align:center;">🆗</td>
|
|
|
|
<td>Unit test is not enough</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Select</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">🆗</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td>Multiple search is not done</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Switch</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
|
|
|
<td style="text-align:center;">❌</td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>FormItem</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;">❌</td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Form</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Table</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;">❌</td>
|
|
|
|
<td>Function is not fulfilled</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Tooltip</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-15 10:50:07 +08:00
|
|
|
<td></td>
|
2019-07-10 15:04:08 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-07-11 19:51:59 +08:00
|
|
|
<td>Popover</td>
|
2019-07-10 15:04:08 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 14:08:16 +08:00
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-15 10:50:07 +08:00
|
|
|
<td></td>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tr>
|
2019-07-10 19:07:16 +08:00
|
|
|
<tr>
|
|
|
|
<td>InputNumber</td>
|
2019-07-15 10:50:07 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
|
|
|
<td style="text-align:center;">❌</td>
|
2019-07-10 19:07:16 +08:00
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Radio</td>
|
2019-07-29 17:06:44 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-10 19:07:16 +08:00
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
2019-07-11 19:51:59 +08:00
|
|
|
<tr>
|
|
|
|
<td>Tab</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Breadcrumb</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Badge</td>
|
2019-08-07 14:52:24 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-11 19:51:59 +08:00
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Steps</td>
|
2019-08-07 14:52:24 +08:00
|
|
|
<td style="text-align:center;">😍</td>
|
2019-07-11 19:51:59 +08:00
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
2019-07-29 17:06:44 +08:00
|
|
|
<tr>
|
|
|
|
<td>Tag</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Divider</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Statistic</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>PopConfirm</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Anchor</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>BackTop</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Progress</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Timeline</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Card</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Collapse</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Cascader</td>
|
|
|
|
<td style="text-align:center;">🚧</td>
|
|
|
|
<td style="text-align:center;"></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
2019-07-10 14:08:16 +08:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<ol>
|
|
|
|
<li>Z-index management on <code>Select</code> & <code>Tooltip</code> & <code>Modal</code>(Low Priority)</li>
|
|
|
|
<li>Full featured table component(Medium Priority)</li>
|
|
|
|
<li>Form component(Medium Priority)</li>
|
2019-07-10 14:40:25 +08:00
|
|
|
<li>FormItem component(High Priority)</li>
|
2019-07-10 14:08:16 +08:00
|
|
|
<li>Complete unit test for all existing components(High Priority)</li>
|
2019-07-10 14:40:25 +08:00
|
|
|
<li>Create a Markdown webpack loader to convert documentation(Low Priority)</li>
|
|
|
|
<li>Refactor documentation page(for code clairity)</li>
|
|
|
|
<li>Code refactor for some 😢 messy code(which is my bad…)</li>
|
2019-07-10 19:07:16 +08:00
|
|
|
<li>Refactor CSS use mixins(which means I should learn SCSS hard…)</li>
|
2019-07-10 14:08:16 +08:00
|
|
|
</ol></div>`
|