Skip to content

Commit e30b60d

Browse files
committed
docs: fix install guide
1 parent d39820e commit e30b60d

File tree

12 files changed

+645
-10
lines changed

12 files changed

+645
-10
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Install
3+
---
4+
5+
### Install Dependencies
6+
7+
```sh
8+
# use yarn
9+
yarn add casual-ui-vue
10+
11+
# use npm
12+
npm install casual-ui-vue
13+
14+
# use pnpm
15+
pnpm install casual-ui-vue
16+
```
17+
18+
### Global Usage
19+
20+
- Import Styles & Use as a Plugin
21+
22+
```js
23+
import { createApp } from 'vue'
24+
import CasualUIVue from '@casual-ui/vue' // import global plugin
25+
import App from './App.vue'
26+
import 'casual-ui-vue/dist/style.css' // import styles
27+
28+
const app = createApp(App)
29+
30+
app.use(CasualUIVue, { /** plugin options */ }) // use plugin
31+
```
32+
33+
- Directly use in vue files
34+
35+
```vue
36+
<template>
37+
<c-button label="A Button" />
38+
</template>
39+
```
40+
41+
### Usage on Demand
42+
43+
- Import styles in client entry file
44+
45+
```js
46+
import 'casual-ui-vue/style.css'
47+
```
48+
49+
- Use in vue files
50+
51+
```vue
52+
<script setup>
53+
import { CButton } from '@casual-ui/vue'
54+
</script>
55+
56+
<template>
57+
<CButton label="A Button" />
58+
</template>
59+
```
60+
61+
### Plugin Options
62+
63+
* locale - The i18n locale.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Install
3+
---
4+
5+
### Install Dependencies
6+
7+
```sh
8+
# use yarn
9+
yarn add @casual-ui/vue
10+
11+
# use npm
12+
npm install @casual-ui/vue
13+
14+
# use pnpm
15+
pnpm install @casual-ui/vue
16+
```
17+
18+
### Global Usage
19+
20+
- Import Styles & Use as a Plugin
21+
22+
```js
23+
import { createApp } from 'vue'
24+
import CasualUIVue from '@casual-ui/vue' // import global plugin
25+
import App from './App.vue'
26+
import '@casual-ui/vue/dist/style.css' // import styles
27+
28+
const app = createApp(App)
29+
30+
app.use(CasualUIVue, { /** plugin options */ }) // use plugin
31+
```
32+
33+
- Directly use in vue files
34+
35+
```vue
36+
<template>
37+
<c-button label="A Button" />
38+
</template>
39+
```
40+
41+
### Usage on Demand
42+
43+
- Import styles in client entry file
44+
45+
```js
46+
import 'casual-ui-vue/style.css'
47+
```
48+
49+
- Use in vue files
50+
51+
```vue
52+
<script setup>
53+
import { CButton } from '@casual-ui/vue'
54+
</script>
55+
56+
<template>
57+
<CButton label="A Button" />
58+
</template>
59+
```
60+
61+
### Plugin Options
62+
63+
* locale - The i18n locale.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Install
3+
---
4+
5+
### Install Dependencies
6+
7+
```sh
8+
# use yarn
9+
yarn add @casual-ui/vue
10+
11+
# use npm
12+
npm install @casual-ui/vue
13+
14+
# use pnpm
15+
pnpm install @casual-ui/vue
16+
```
17+
18+
### Global Usage
19+
20+
- Import Styles & Use as a Plugin
21+
22+
```js
23+
import { createApp } from 'vue'
24+
import CasualUIVue from '@casual-ui/vue' // import global plugin
25+
import App from './App.vue'
26+
import '@casual-ui/vue/dist/style.css' // import styles
27+
28+
const app = createApp(App)
29+
30+
app.use(CasualUIVue, { /** plugin options */ }) // use plugin
31+
```
32+
33+
- Directly use in vue files
34+
35+
```vue
36+
<template>
37+
<c-button label="A Button" />
38+
</template>
39+
```
40+
41+
### Usage on Demand
42+
43+
- Import styles in client entry file
44+
45+
```js
46+
import '@casual-ui/vue/style.css'
47+
```
48+
49+
- Use in vue files
50+
51+
```vue
52+
<script setup>
53+
import { CButton } from '@casual-ui/vue'
54+
</script>
55+
56+
<template>
57+
<CButton label="A Button" />
58+
</template>
59+
```
60+
61+
### Plugin Options
62+
63+
* locale - The i18n locale.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Install
3+
---
4+
5+
### Install Dependencies
6+
7+
```sh
8+
# use yarn
9+
yarn add @casual-ui/vue
10+
11+
# use npm
12+
npm install @casual-ui/vue
13+
14+
# use pnpm
15+
pnpm install @casual-ui/vue
16+
```
17+
18+
### Global Usage
19+
20+
- Import Styles & Use as a Plugin
21+
22+
```js
23+
import { createApp } from 'vue'
24+
import CasualUIVue from '@casual-ui/vue' // import global plugin
25+
import App from './App.vue'
26+
import '@casual-ui/vue/dist/style.css' // import styles
27+
28+
const app = createApp(App)
29+
30+
app.use(CasualUIVue, { /** plugin options */ }) // use plugin
31+
```
32+
33+
- Directly use in vue files
34+
35+
```vue
36+
<template>
37+
<c-button label="A Button" />
38+
</template>
39+
```
40+
41+
### Usage on Demand
42+
43+
- Import styles in client entry file
44+
45+
```js
46+
import '@casual-ui/vue/dist/style.css'
47+
```
48+
49+
- Use in vue files
50+
51+
```vue
52+
<script setup>
53+
import { CButton } from '@casual-ui/vue'
54+
</script>
55+
56+
<template>
57+
<CButton label="A Button" />
58+
</template>
59+
```
60+
61+
### Plugin Options
62+
63+
* locale - The i18n locale.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Install
3+
---
4+
5+
### Install Dependencies
6+
7+
```sh
8+
# use yarn
9+
yarn add @casual-ui/vue
10+
11+
# use npm
12+
npm install @casual-ui/vue
13+
14+
# use pnpm
15+
pnpm install @casual-ui/vue
16+
```
17+
18+
### Global Usage
19+
20+
- Import Styles & Use as a Plugin
21+
22+
```js
23+
import { createApp } from 'vue'
24+
import CasualUIVue from '@casual-ui/vue' // import global plugin
25+
import App from './App.vue'
26+
import '@casual-ui/vue/dist/style.css' // import styles
27+
28+
const app = createApp(App)
29+
30+
app.use(CasualUIVue, { /** plugin options */ }) // use plugin
31+
```
32+
33+
- Directly use in vue files
34+
35+
```vue
36+
<template>
37+
<c-button label="A Button" />
38+
</template>
39+
```
40+
41+
### Usage on Demand
42+
43+
- Import styles in client entry file
44+
45+
```js
46+
import '@casual-ui/vue/dist/style.css'
47+
```
48+
49+
- Use in vue files
50+
51+
```vue
52+
<script setup>
53+
import { CButton } from '@casual-ui/vue'
54+
</script>
55+
56+
<template>
57+
<CButton label="A Button" />
58+
</template>
59+
```
60+
61+
### Plugin Options
62+
63+
* locale - The i18n locale.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: 安装
3+
---
4+
5+
### 安装依赖
6+
7+
```sh
8+
# use yarn
9+
yarn add casual-ui-vue
10+
11+
# use npm
12+
npm install casual-ui-vue
13+
14+
# use pnpm
15+
pnpm install casual-ui-vue
16+
```
17+
18+
### 全局使用
19+
20+
- 入口文件引入样式以及注册全局插件
21+
22+
```js
23+
import { createApp } from 'vue'
24+
import CasualUIVue from '@casual-ui/vue' // 引入全局Vue3插件
25+
import App from './App.vue'
26+
import 'casual-ui-vue/dist/style.css' // 引入样式文件
27+
28+
const app = createApp(App)
29+
30+
app.use(CasualUIVue) // 使用插件
31+
```
32+
33+
- 组件中使用
34+
35+
```vue
36+
<template>
37+
<c-button label="按钮" />
38+
</template>
39+
```
40+
41+
### 局部使用
42+
43+
- 入口文件引入样式
44+
45+
```js
46+
import 'casual-ui-vue/style.css'
47+
```
48+
49+
- 组件中使用
50+
51+
```vue
52+
<script setup>
53+
import { CButton } from '@casual-ui/vue'
54+
</script>
55+
56+
<template>
57+
<CButton label="按钮" />
58+
</template>
59+
```
60+
61+
62+
### 插件选项
63+
64+
* locale - 国际化语言

0 commit comments

Comments
 (0)