doc(start): refine caveat

This commit is contained in:
07akioni 2020-06-01 01:01:13 +08:00
parent 204c8a4be4
commit 2cc0d85ac7
3 changed files with 10 additions and 15 deletions

View File

@ -11,8 +11,6 @@ tags
text
```
## Props
## Props
### All Typography Components Props
|Name|Type|Default|Description|

View File

@ -20,12 +20,11 @@ Vue.use(naive)
```
## Import on Demand
<n-alert type="warning" title="Caveat">
Importing on demand is designed ahead but it hasn't been completely tested, which may cause some mistakes.
<n-alert type="warning" title="Caveat" style="margin-bottom: 16px;">
<n-ol align-text>
<n-li>Importing on demand is still experimental. If you are facing problems be free to create an issue.</n-li>
<n-li>CSS files start with 'Base' are not guaranteed to be stable for now. If you find importing mistakes after upgrading the package, you may have a look at here.</n-li>
</n-ol>
</n-alert >
If you need to import components on demand, you could use the following tool to generate the code.
> What should be noted is the CSS files start with 'Base' are not guaranteed to be stable (I'll try not to change them). Because they are parts of internal implementation of the library. If you find import mistakes after upgrade the package, you may have a look at here. It is possible to pack these common styles inside every component using it. However, compared to add routines when upgrading package, I perfer not to import duplicate codes. (It doesn't mean this is a better solution. It is only a choice.)
<install-code-generator />

View File

@ -20,12 +20,10 @@ Vue.use(naive)
```
## 按需引入
<n-alert type="warning" title="注意">
组件库虽然设计了按需引入的功能,但还未进行充分测试,这可能导致一些错误。
<n-alert type="warning" title="注意" style="margin-bottom: 16px;">
<n-ol align-text>
<n-li>按需引入的功能仍是试验性的,遇到任何错误都可以反馈给项目。</n-li>
<n-li>以 Base 开头的 CSS 目前不确保随更新保持稳定,如果升级后出现错误,可以来这里检查一下。</n-li>
</n-ol>
</n-alert >
如果你需要按需引入组件,可以使用下面的工具生成按需引入的代码。
> 需要注意的是,以 Base 开头的 CSS 文件并不会确保随着版本的更新保持稳定(我会尽力的保持)。因为它是内部实现的一部分。如果你维持按需引入时升级后样式出现了错误,可以来这里检查一下。虽然把这些公共样式各自打包进每个用到他们的组件是可行的,但是相比于升级的繁琐,我更不喜欢重复的代码。(这不意味着这种解决方案是“更好的”,它只是种选择而已)
<install-code-generator />