-
-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
affects: @varlet/ui
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
# 快速开始 | ||
# 快速开始 | ||
|
||
## 介绍 | ||
|
||
这里为您介绍常见开发模式下接入组件库的最基本方式。 | ||
|
||
## 安装 | ||
|
||
### CDN | ||
varlet.js包含组件库的所有样式和逻辑, 引入即可。 | ||
|
||
```html | ||
<div id="app"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/vue@next"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@varlet/ui/umd/varlet.js"></script> | ||
<script> | ||
const app = Vue.createApp({ | ||
template: '<var-button>按钮</var-button>' | ||
}) | ||
app.use(Varlet).mount('#app') | ||
</script> | ||
``` | ||
|
||
### Webpack/Vite | ||
```shell | ||
# 通过npm或yarn安装 | ||
# npm | ||
npm i @varlet/ui -S | ||
# yarn | ||
yarn add @varlet/ui | ||
``` | ||
|
||
```js | ||
import Vue from 'vue' | ||
import Varlet from '@varlet/ui' | ||
|
||
``` |
File renamed without changes.