Skip to content

Commit

Permalink
docs: update information and add rollback logical tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
qmhc committed Jan 17, 2024
1 parent 88058c5 commit 3ea362d
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ Almost all **default property values** of each component can be easily customize

Meanwhile, the component code pays great attention to reducing the threshold of **source code reading**, and the code layout is as close as possible to the habits of daily business code, avoiding fancy and showy code.

Currently, there are **70+** components, some of which may be familiar to you, and even better, while others may brighten your eyes.
Currently, there are **78** components, some of which may be familiar to you, and even better, while others may brighten your eyes.

## Features

- 📦 70+ out-of-box high quality Vue 3 components
- 📦 Out-of-box high quality Vue 3 components
- 📐 Intuitive, minimalistic Api design
- 🔧 Configurable default value of props, quickly complete global/local modifications
- ⚡ Composition Api, good performance base
- 🔨 With TypeScript, fully types
- 💪 1000+ unit tests to provide good stability
- 💪 1100+ unit tests to provide good stability
- 🎨 Support CSS variable, built-in dark theme
- 🚩 Support i18n
- 🛫 Provide resolver, support unplugin
Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ Vexip (发音为 `/ˈvesɪp/`) UI 提供了一系列开箱即用的组件。

同时,组件代码的编写非常注重降低 **源码阅读** 的门槛,代码的排布尽可能的贴近平时的业务代码的习惯,拒绝花里胡哨。

目前有 **70+** 个组件,一些你几乎看烂了的组件这里都有并且更优秀,也有一些新颖的组件。
目前有 **78** 个组件,一些你几乎看烂了的组件这里都有并且更优秀,也有一些新颖的组件。

## 特性

- 📦 70+ 高质量的开箱即用 Vue 3 组件
- 📦 高质量的开箱即用 Vue 3 组件
- 📐 遵循直觉的、简约的 Api 设计
- 🔧 自由配置的属性默认值,快速完成全局/局部修改
- ⚡ 组合式 Api,良好的性能基础
- 🔨 TypeScript 编写,完整的类型
- 💪 1000+ 单元测试,为组件的提供良好的稳定性
- 💪 1100+ 单元测试,为组件的提供良好的稳定性
- 🎨 支持 CSS 变量,内置暗黑主题
- 🚩 支持国际化
- 🛫 配套 Resolver,支持 unplugin 插件
Expand Down
16 changes: 16 additions & 0 deletions docs/en-US/guide/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,19 @@ export default defineNuxtConfig({
}
})
```

### Internationalization

After using the Nuxt module, since `app.use` is not used, locale configuration needs to be provided via the ConfigProvider component:

```vue
<template>
<VConfigProvider :locale="enUSLocale()">
<App></App>
</VConfigProvider>
</template>
<script setup lang="ts">
import { enUSLocale } from 'vexip-ui'
</script>
```
32 changes: 32 additions & 0 deletions docs/en-US/guide/style-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,35 @@ The list of common transition effects is as follows:
- `vxp-move-bottom` moves in from bottom to top
- `vxp-move-left` moves in from left to right
- `vxp-zoom` fades in and out and zooms in and out significantly

## Rollback Logical

In order to support i18n, Vexip UI provides RTL (right-to-left) features, and the style of components is wrote in [logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values).

However, some [older modern browsers](https://caniuse.com/css-logical-props) do not support logical properties. To work on these browsers, you need to use the PostCSS plugin to restore logical properties to normal properties.

Install plugin:

```sh
pnpm i -D @vexip-ui/plugins
```

Add following in `vite.config.ts`:

```ts
import { defineConfig } from 'vite'
import { transformLogical } from '@vexip-ui/plugins'

export default defineConfig({
css: {
postcss: {
plugins: [
transformLogical({
// rtl: true,
replace: true
})
]
}
}
})
```
6 changes: 3 additions & 3 deletions docs/en-US/guide/vexip-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Almost all the **default value of props** for each component can be quickly modi

And, the writing of component codes pay great attention to lowering the threshold of **source codes reading**, and the style of code is as close to the usual business code habits as possible to avoid dazzling encapsulation.

There are currently **70+** components, many you see everywhere are here and are better, and a few may brighten your eyes.
There are currently **78** components, many you see everywhere are here and are better, and a few may brighten your eyes.

## Features

- 📦 70+ out-of-box high quality Vue 3 components
- 📦 Out-of-box high quality Vue 3 components
- 📐 Intuitive, minimalistic Api design
- 🔧 Configurable default value of props, quickly complete global/local modifications
- ⚡ Composition Api, good performance base
- 🔨 With TypeScript, fully types
- 💪 1000+ unit tests to provide good stability
- 💪 1100+ unit tests to provide good stability
- 🎨 Support CSS variable, built-in dark theme
- 🚩 Support i18n
- 🛫 Provide resolver, support unplugin
Expand Down
16 changes: 16 additions & 0 deletions docs/zh-CN/guide/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,19 @@ export default defineNuxtConfig({
}
})
```

### 国际化

在使用 Nuxt 模块后,由于没有使用 `app.use`,所以需要通过 ConfigProvider 组件提供国际化配置:

```vue
<template>
<VConfigProvider :locale="enUSLocale()">
<App></App>
</VConfigProvider>
</template>
<script setup lang="ts">
import { enUSLocale } from 'vexip-ui'
</script>
```
32 changes: 32 additions & 0 deletions docs/zh-CN/guide/style-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,35 @@ export default defineConfig({
- `vxp-move-bottom` 从下往上移入
- `vxp-move-left` 从左往右移入
- `vxp-zoom` 渐隐渐显并伴随明显的放大缩小

## 回退逻辑属性

为了更友好地支持国际化,Vexip UI 提供了 RTL(从右向左排版)特性,组件样式也采用了 [逻辑属性](https://developer.mozilla.org/zh-CN/docs/Web/CSS/CSS_logical_properties_and_values) 编写。

但是一些 [旧版现代浏览器](https://caniuse.com/css-logical-props) 不支持逻辑属性,为了能在这些浏览器上正常运行,需要借助 PostCSS 插件将逻辑属性还原成普通属性。

安装插件:

```sh
pnpm i -D @vexip-ui/plugins
```

`vite.config.ts` 中拓展以下内容:

```ts
import { defineConfig } from 'vite'
import { transformLogical } from '@vexip-ui/plugins'

export default defineConfig({
css: {
postcss: {
plugins: [
transformLogical({
// rtl: true,
replace: true
})
]
}
}
})
```
6 changes: 3 additions & 3 deletions docs/zh-CN/guide/vexip-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Vexip(发音为 `/ˈvesɪp/` <AudioButton src="/vexip-pron.wav"></AudioButton>

同时,组件代码的编写非常注重降低 **源码阅读** 的门槛,代码的排布尽可能的贴近平时的业务代码的习惯,拒绝花里胡哨。

目前有 **70+** 个组件,一些你几乎看烂了的组件这里都有并且更优秀,也有一些新颖的组件。
目前有 **78** 个组件,一些你几乎看烂了的组件这里都有并且更优秀,也有一些新颖的组件。

## 特性

- 📦 70+ 高质量的开箱即用 Vue 3 组件
- 📦 高质量的开箱即用 Vue 3 组件
- 📐 遵循直觉的、简约的 Api 设计
- 🔧 自由配置的属性默认值,快速完成全局/局部修改
- ⚡ 组合式 Api,良好的性能基础
- 🔨 TypeScript 编写,完整的类型
- 💪 1000+ 单元测试,为组件的提供良好的稳定性
- 💪 1100+ 单元测试,为组件的提供良好的稳定性
- 🎨 支持 CSS 变量,内置暗黑主题
- 🚩 支持国际化
- 🛫 配套 Resolver,支持 unplugin 插件
Expand Down

0 comments on commit 3ea362d

Please sign in to comment.