mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
docs: import on demand
This commit is contained in:
parent
661631be52
commit
ba35a17e19
@ -30,4 +30,30 @@ const app = createApp()
|
||||
app.use(naive)
|
||||
```
|
||||
|
||||
## Import on Demand (Working in Progress)
|
||||
## Import on Demand
|
||||
|
||||
Here is a minimal example.
|
||||
|
||||
```js
|
||||
import { createApp } from 'vue'
|
||||
import {
|
||||
// create naive ui
|
||||
create,
|
||||
// component
|
||||
NButton,
|
||||
// component style
|
||||
buttonLight,
|
||||
// locale
|
||||
zhCN
|
||||
} from 'naive-ui'
|
||||
|
||||
const naive = create({
|
||||
locales: [zhCN],
|
||||
styles: [buttonLight],
|
||||
components: [NButton]
|
||||
})
|
||||
|
||||
const app = createApp()
|
||||
|
||||
app.use(naive)
|
||||
```
|
||||
|
@ -30,4 +30,30 @@ const app = createApp()
|
||||
app.use(naive)
|
||||
```
|
||||
|
||||
## 按需引入(正在开发)
|
||||
## 按需引入
|
||||
|
||||
下面是一个按需引入的最小例子。
|
||||
|
||||
```js
|
||||
import { createApp } from 'vue'
|
||||
import {
|
||||
// create naive ui
|
||||
create,
|
||||
// component
|
||||
NButton,
|
||||
// component style
|
||||
buttonLight,
|
||||
// locale
|
||||
zhCN
|
||||
} from 'naive-ui'
|
||||
|
||||
const naive = create({
|
||||
locales: [zhCN],
|
||||
styles: [buttonLight],
|
||||
components: [NButton]
|
||||
})
|
||||
|
||||
const app = createApp()
|
||||
|
||||
app.use(naive)
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user