-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add multiple language support (#19)
- Loading branch information
Showing
15 changed files
with
199 additions
and
6 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { NavbarConfig } from 'vuepress' | ||
|
||
export const en: NavbarConfig = [ | ||
{ | ||
text: 'Components', | ||
link: '/en/components/', | ||
}, | ||
] |
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,2 @@ | ||
export * from './zh' | ||
export * from './en' |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { SidebarConfig } from 'vuepress' | ||
|
||
export const en: SidebarConfig = { | ||
'/en/components': [ | ||
{ | ||
text: 'Base Components', | ||
children: [ | ||
{ | ||
text: 'Button', | ||
link: '/en/components/button/', | ||
}, | ||
{ | ||
text: 'BackTop', | ||
link: '/en/components/backtop/', | ||
}, | ||
{ | ||
text: 'BackTopTsx', | ||
link: '/en/components/backtoptsx/', | ||
}, | ||
], | ||
}, | ||
], | ||
} |
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,2 @@ | ||
export * from './zh' | ||
export * from './en' |
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
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,3 +1,3 @@ | ||
# Introduction | ||
|
||
Vue components. | ||
Vue 组件. |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
home: true | ||
title: Home | ||
heroImage: /images/hero.png | ||
actions: | ||
- text: Get Started | ||
link: /components/ | ||
type: primary | ||
features: | ||
- title: Simplicity First | ||
details: Minimal setup with markdown-centered project structure helps you focus on writing. | ||
- title: Vue-Powered | ||
details: Enjoy the dev experience of Vue, use Vue components in markdown, and develop custom themes with Vue. | ||
- title: Performant | ||
details: VuePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded. | ||
- title: Themes | ||
details: Providing a default theme out of the box. You can also choose a community theme or create your own one. | ||
- title: Plugins | ||
details: Flexible plugin API, allowing plugins to provide lots of plug-and-play features for your site. | ||
- title: Bundlers | ||
details: Default bundler is Vite, while Webpack is also supported. Choose the one you like! | ||
footer: MIT Licensed | Copyright © 2018-present Evan You | ||
--- |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Introduction | ||
|
||
Vue components. |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
permalink: /en/components/backtoptsx | ||
--- | ||
|
||
# BackTopTsx | ||
|
||
Back top button. | ||
|
||
## Base usage | ||
|
||
Swipe to view the button in the bottom right corner of the container. | ||
|
||
<demo src="../__demos__/basic.vue"></demo> | ||
|
||
## Component Configuration | ||
|
||
### BackTopTsx Props | ||
|
||
| prop | description | type | default | | ||
| ----------------- | ------------------------------------------------------------------------ | --------------- | ------- | | ||
| target | Objects that trigger scrolling | string | window | | ||
| visibility-height | Only when the rolling height reaches this parameter value will it appear | number / string | 200 | | ||
| right | Control its display position, distance from the right margin of the page | number / string | 40 | | ||
| bottom | Control its display position, distance from the bottom of the page | number / string | 40 | | ||
|
||
### BackTopTsx Events | ||
|
||
| event | description | param | | ||
| ----- | ------------------------------------ | ----------------------------- | | ||
| click | Event triggered by clicking a button | `(event: MouseEvent) => void` | | ||
|
||
### BackTopTsx Slots | ||
|
||
| slot | description | | ||
| ------- | ------------------------- | | ||
| default | Customize default content | | ||
|
||
## type definition | ||
|
||
Component exports the following type definitions | ||
|
||
```ts | ||
import type { BackTopTsxProps } from '@bfehub/vlib-ui' | ||
``` | ||
|
||
## Style variables | ||
|
||
The component provides the following CSS variables that can be used to customize styles | ||
|
||
| name | default | | ||
| ------------------------------- | ------- | | ||
| --vlib-back-top-tsx-right | 40px | | ||
| --vlib-back-top-tsx-bottom | 40px | | ||
| --vlib-back-top-tsx-button-size | 40px | |
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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
permalink: /en/components/backtop | ||
--- | ||
|
||
# BackTopTsx | ||
|
||
Back top button. | ||
|
||
## Base usage | ||
|
||
Swipe to view the button in the bottom right corner of the container. | ||
|
||
<demo src="../__demos__/basic.vue"></demo> | ||
|
||
## Component Configuration | ||
|
||
### BackTopTsx Props | ||
|
||
| prop | description | type | default | | ||
| ----------------- | ------------------------------------------------------------------------ | --------------- | ------- | | ||
| target | Objects that trigger scrolling | string | window | | ||
| visibility-height | Only when the rolling height reaches this parameter value will it appear | number / string | 200 | | ||
| right | Control its display position, distance from the right margin of the page | number / string | 40 | | ||
| bottom | Control its display position, distance from the bottom of the page | number / string | 40 | | ||
|
||
### BackTopTsx Events | ||
|
||
| event | description | param | | ||
| ----- | ------------------------------------ | ----------------------------- | | ||
| click | Event triggered by clicking a button | `(event: MouseEvent) => void` | | ||
|
||
### BackTopTsx Slots | ||
|
||
| slot | description | | ||
| ------- | ------------------------- | | ||
| default | Customize default content | | ||
|
||
## type definition | ||
|
||
Component exports the following type definitions | ||
|
||
```ts | ||
import type { BackTopProps } from '@bfehub/vlib-ui' | ||
``` | ||
|
||
## Style variables | ||
|
||
The component provides the following CSS variables that can be used to customize styles | ||
|
||
| name | default | | ||
| ------------------------------- | ------- | | ||
| --vlib-back-top-tsx-right | 40px | | ||
| --vlib-back-top-tsx-bottom | 40px | | ||
| --vlib-back-top-tsx-button-size | 40px | |
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
permalink: /en/components/button | ||
--- | ||
|
||
# Button | ||
|
||
Normal button. | ||
|
||
## Base usage | ||
|
||
Use `type`, `plain`, `round`, and `circle` to define the style of the button. | ||
|
||
<demo src="../__demos__/basic.vue"></demo> |
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