mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
doc(get-started): how to add fonts
This commit is contained in:
parent
d47342af8b
commit
9e629189c7
@ -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)
|
||||
```
|
||||
|
||||
|
@ -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)
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user