Skip to content

Commit

Permalink
docs: add algolia search (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol authored Dec 4, 2024
1 parent 5a3433a commit c53a740
Show file tree
Hide file tree
Showing 22 changed files with 180 additions and 102 deletions.
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/webdoc/develop-demo-en.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!--anchor:on-->

## Development Example
# Development Example

This article is based on[Vite](https://cn.vitejs.dev/) Project example to show how to use`TinyVue`components.

### Building the Vite project
## Building the Vite project

Create a`Vite`Works:

Expand All @@ -30,7 +30,7 @@ After the browser is started, if the following interface is displayed, it indica

<img src="@demos/resource/vite-vue.png" class="image" style="box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14)" ><br><br>

### Install and use`TinyVue`Components
## Install and use`TinyVue`Components

Run the following command to install the`Vue 3.0`version of`TinyVue`Component library:

Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/webdoc/develop-demo.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!--anchor:on-->

## 开发示例
# 开发示例

本文以 [Vite](https://cn.vitejs.dev/) 工程为例,展示如何使用 `TinyVue` 组件。

### 搭建 Vite 项目
## 搭建 Vite 项目

使用以下命令创建 `Vite` 工程:

Expand All @@ -30,7 +30,7 @@ npm run dev

<img src="@demos/resource/vite-vue.png" class="image" style="box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14)" ><br><br>

### 安装并使用 `TinyVue` 组件
## 安装并使用 `TinyVue` 组件

执行以下命令安装 `Vue 3.0` 版本的 `TinyVue` 组件库 :

Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/webdoc/envpreparation-open-en.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
## Environment Preparation
# Environment Preparation

TinyVue is a`Vue`UI component library, which can also support`Vue 2.0`and`Vue 3.0`.

Browser compatibility`TinyVue`The latest versions of mainstream browsers are supported: Chrome, Edge, Firefox, Opera, and Safari. No longer supported`Internet Explorer`.

### Installing Node.js
## Installing Node.js

Recommended Installation`v16.13.0`version, if the local`Node.js`, run the following command to check whether the version is correct:

```bash
node -v
```

### Installing Yarn
## Installing Yarn

management`npm`There are two main tools for the package. One is the installation.`Node.js`When it comes`npm`, the other is the faster`yarn`, run the following command to install:

Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/webdoc/envpreparation-open.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
## 环境准备
# 环境准备

TinyVue 是一个基于 `Vue` 的 UI 组件库,可以同时支持 `Vue 2.0``Vue 3.0`

浏览器兼容性 `TinyVue` 支持主流浏览器的最新版本:Chrome、Edge、Firefox、Opera、Safari 不支持 IE 浏览器

### 安装 Node.js
## 安装 Node.js

推荐安装 `v16.13.0` 及以上版本,如果本地已经安装了 `Node.js`,可以通过以下命令检查版本是否正确:

```bash
node -v
```

### 安装 Yarn
## 安装 Yarn

管理 `npm` 包的工具主要有两种,一种是安装 `Node.js` 时自带的 `npm` ,另一种是速度更快的 `yarn`,通过以下命令安装:

Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/webdoc/faq-en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## FAQ
# FAQ

### 1、Popup element misaligned and flipped in wujie micro front-end
## 1、Popup element misaligned and flipped in wujie micro front-end

_Reason:_ The popup element has a boundary detection logic, and in sub applications, the width and height of 'window' may be much smaller than that of the viewport,
therefore, it can misjudge boundaries, leading to issues such as flipping and misalignment.
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/webdoc/faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 常见问题
# 常见问题

### 1、弹出元素在无界微前端中发生错位、翻转
## 1、弹出元素在无界微前端中发生错位、翻转

_原因:_ 弹出类的元素,存在一个边界检测逻辑,在子应用中,`window` 的宽高可能会比视口小得多,
因此会错误判断边界,导致翻转和错位等问题。
Expand Down
38 changes: 19 additions & 19 deletions examples/sites/demos/pc/webdoc/form-valid-en.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Form Verification Configuration
# Form Verification Configuration

<br>
<br>

Form validation is based on`async-validator`Encapsulated, mainly used`validate`Function and`rules`Configuration rules of the.

### API
## API

#### validate
### validate

When submitting a form, the system verifies the fields to be verified in the entire form to obtain the verification result. The following is an example:

Expand All @@ -21,11 +21,11 @@ Parameter description:

- `error`: Array type, including fields that do not pass the verification.

### Rules
## Rules

Used to set the verification rules for each field to be verified in the form, including the verification type of each field, whether it is mandatory, and the prompt information indicating that the verification fails.

#### type
### type

through`type`Set the verification type of the field to be verified. With this function, we can verify some specific fields without writing regular rules and making judgments. The following is an example:

Expand Down Expand Up @@ -67,15 +67,15 @@ The values that can be set are as follows:

- `any`: any type

#### required
### required

`required`The attribute value of is of the Boolean type, which is used to set whether a field is mandatory, that is, non-empty verification.

- `true`: Set to`true`, indicates that the field is mandatory and the label is marked with a red asterisk \*.

- `false`: default value, indicating that the field is not mandatory. The label does not contain red asterisks \*.

#### pattern
### pattern

Configure the regular expression used to verify the field. The following is an example:

Expand All @@ -85,7 +85,7 @@ rules: {
}
```

#### min
### min

For the string and array types, the lengths are compared. For the number type, the number cannot be less than`min`. An example is as follows:

Expand All @@ -95,7 +95,7 @@ rules: {
}
```

#### max
### max

For the string and array types, the lengths are compared. For the number type, the number cannot be greater than`max`. An example of the use is as follows:

Expand All @@ -105,7 +105,7 @@ rules: {
}
```

#### len
### len

To verify the exact length of the field, specify`len`Property. For string and array types, the length property is compared. For type number, this property indicates an exact match for that number, that is, it can only be strictly equal to`len`. If`len`Attribute vs.`min`and`max`Attributes are used together, then`len`Preferred. Examples of usage are as follows:

Expand All @@ -115,7 +115,7 @@ rules: {
}
```

#### trigger
### trigger

Configure the way to trigger the verification rules through `trigger`. When it is `change`, the verification is triggered when the input box value changes. When it is `blur`,
the verification is triggered after the input box value is out of focus. Can be set to an array `['change', 'blur']` to trigger both scenarios. The default is to trigger both scenarios.
Expand All @@ -137,7 +137,7 @@ The configurable values are as follows:
- `change`: The verification is triggered when the value in the input box changes.
#### enum
### enum
Enumerated value validation, which verifies whether the value of the field is in`enum`Attribute configuration array`['admin', 'user', 'guest']`Medium. For example:
Expand All @@ -147,7 +147,7 @@ rules: {
}
````

#### whitespace
### whitespace

Verify that mandatory fields have only spaces. Mandatory fields that contain only blanks are generally considered an error. To treat a string consisting only of spaces as an error, you can set`whitespace`for`true`If this parameter is not configured, the input value of all spaces is valid.

Expand All @@ -157,7 +157,7 @@ rules: {
}
```

#### fields
### fields

deep rule. If you need to validate deep object properties, you can assign nested rules to the rule's`fields`Attribute to validate an object or array validation rule. Note that if you do not specify on the parent rule`required`Property, the field is not declared to be fully valid on the source object, and the deep validation rule will not be enforced because there are no verifiable objects. For example:

Expand Down Expand Up @@ -192,7 +192,7 @@ rules: {
}
```

#### defaultField
### defaultField

`defaultField`Attributes can be used with array or object types to validate all values of the container. It can be an object or an array containing validation rules. For example:

Expand All @@ -205,7 +205,7 @@ rules: {
}
```

#### transform
### transform

Sometimes it is necessary to convert values before validation to force or in some way clean them up.`transform`, add a feature to the validation rule. Before validation, the attribute is converted and then reassigned to the source object to change the value of the attribute. For example, the space entered by the user is removed.

Expand All @@ -222,7 +222,7 @@ rules: {
}
```

#### messages
### messages

This parameter is used to configure the message displayed when field verification fails. Internationalization is supported.

Expand Down Expand Up @@ -250,7 +250,7 @@ rules: {
}
```

#### validator
### validator

By`validator`The options are customized for a field.`callback`Must be invoked.

Expand Down Expand Up @@ -278,7 +278,7 @@ rules: {
}
```

#### asyncValidator
### asyncValidator

By`asyncValidator`The option is to perform custom asynchronous validation for a field.`callback`Must be invoked.

Expand Down
Loading

0 comments on commit c53a740

Please sign in to comment.