docs: add component document's dictionary and document template

This commit is contained in:
Sagi 2022-10-04 09:34:37 +08:00
parent a8ae06e5ea
commit 6653d829a5
20 changed files with 129 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import { defineConfig } from 'vitepress';
import head from './head';
import nav from './nav';
import sidebar from './sidebar';
import markdown from './markdown';
const config = defineConfig({
@ -10,6 +11,7 @@ const config = defineConfig({
markdown,
themeConfig: {
nav,
sidebar,
logo: '../../assets/farris_design.jpg'
}
});

View File

@ -1,3 +1,3 @@
const nav = [{ text: '组件', link: '/quick-start/' }];
const nav = [{ text: '组件', link: '/components/' }];
export default nav;

View File

@ -0,0 +1,53 @@
const sidebar = [
{
text: '介绍',
items: [{ text: '快速开始', link: '/guide/quick-start/' }]
},
{
text: '通用',
items: [
{ text: 'Button 按钮', link: '/components/button/' },
{ text: 'Icon 图标', link: '/components/icon/' }
]
},
{
text: '导航',
items: [{ text: 'Accordion 手风琴', link: '/components/accordion/' }]
},
{
text: '布局',
items: [
{
text: 'section 面板',
link: '/components/section/'
},
{ text: 'tabs 标签页', link: '/components/tabs/' }
]
},
{
text: '录入数据',
items: [
{ text: 'Button Edit 按钮输入框', link: '/components/button-edit/' },
{ text: 'Radio Group 单选组', link: '/components/radio-group/' },
{ text: 'Text 静态文本', link: '/components/text/' },
{ text: 'Combo List 选择输入框', link: '/components/combo-list/' },
{ text: 'Swtich 开关', link: '/components/switch/' }
]
},
{
text: '展示数据',
items: [
{ text: 'Avatar 头像', link: '/components/avatar/' },
{ text: 'tooltip 提示信息', link: '/components/tooltip/' }
]
},
{
text: '反馈',
items: [
{ text: 'notify 通知消息', link: '/components/notify/' },
{ text: 'popover 气泡提示', link: '/components/popover/' }
]
}
];
export default sidebar;

View File

@ -0,0 +1 @@
# Accordion

View File

@ -0,0 +1 @@
# Avatar

View File

@ -0,0 +1,23 @@
# Button Edit 按钮输入框
## 基本用法
## 对齐方式
## 状态
## 按钮
## 清空按钮
## 文本标签
## 提示信息
## 类型
## 属性
## 事件
## 插槽

View File

@ -0,0 +1 @@
# Button

View File

@ -0,0 +1 @@
# Combo List

View File

@ -0,0 +1 @@
# Icon

View File

@ -0,0 +1 @@
# 组件集合

View File

@ -0,0 +1 @@
# Notify

View File

@ -0,0 +1 @@
# Popover

View File

@ -0,0 +1 @@
# Radio Group

View File

@ -0,0 +1 @@
# Section

View File

@ -0,0 +1 @@
# Switch

View File

@ -0,0 +1 @@
# Tabs

View File

@ -0,0 +1 @@
# Text

View File

@ -0,0 +1 @@
# Tooltip

View File

@ -0,0 +1,35 @@
# 快速开始
## 开始使用 Farris UI Vue
### 1. 安装@farris/ui-vue
```
npm install @farris/ui-vue
```
```
yarn add @farris/ui-vue
```
### 2. 在应用中引入 Farris UI Vue
在`main.ts`文件中引入`@farris/ui-vue`。
```ts
import { createApp } from 'vue';
import App from './App.vue';
import Farris from '@farris/ui-vue';
createApp(App).use(Farris).mount('#app');
```
### 3. 在应用中使用 Farris UI Vue
在`App.vue`文件中使用 Farris UI Vue 组件。
```vue
<template>
<f-input-group></f-input-group>
</template>
```

View File

@ -10,7 +10,7 @@ hero:
actions:
- theme: brand
text: 快速开始
link: /quick-start/
link: /guide/quick-start/
- theme: Gitee
text: View on Gitee
link: https://gitee.com/ubml/farris-vue