doc(get-started): how to add fonts

This commit is contained in:
07akioni 2020-06-01 12:54:51 +08:00
parent d47342af8b
commit 9e629189c7
2 changed files with 19 additions and 0 deletions

View File

@ -16,6 +16,16 @@ Add the following lines in you entry point js file.
import naive from 'naive-ui'
import 'naive-ui/lib/styles/index.css'
// Default CSS bundle doesn't includes external font files.
// If you want to use the built-in fonts of UI. Add the
// following lines on demand.
// Generic Fonts, choose one at most
import 'naive-ui/lib/styles/fonts/Lato.css'
import 'naive-ui/lib/styles/fonts/FiraSans.css'
// Monospace Fonts
import 'naive-ui/lib/styles/fonts/FiraCode.css'
Vue.use(naive)
```

View File

@ -16,6 +16,15 @@ npm install --save-dev naive-ui
import naive from 'naive-ui'
import 'naive-ui/lib/styles/index.css'
// 默认的 CSS 打包不包含字体文件
// 如果需要使用 UI 内置的字体,可以按需添加下面的代码
// 通用字体,多选一
import 'naive-ui/lib/styles/fonts/Lato.css'
import 'naive-ui/lib/styles/fonts/FiraSans.css'
// 等宽字体
import 'naive-ui/lib/styles/fonts/FiraCode.css'
Vue.use(naive)
```