-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
20 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
递归合并两个对象,可通过回调函数自定义合并逻辑。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { mergeWith } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
递归合并两个对象。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { merge } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
将 `File` 对象转换为 `ArrayBuffer`。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { toArrayBuffer } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
将 `File` 对象转换为 Data URL 字符串。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { toDataURL } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
将 `File` 对象转换为文本字符串。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { toText } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
根据给定条件生成类名列表,或直接返回类名。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { classes } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
创建一个命名空间函数,用于生成 BEM 样式的组件和类名。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { createNamespaceFn } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
获取元素的所有可滚动父级元素,包含 `window` 作为最后一项。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { getAllParentScroller } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
获取元素或窗口的尺寸和位置,返回一个 `DOMRect` 对象。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { getRect } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
获取元素或窗口的水平滚动位置。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { getScrollLeft } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
获取元素或窗口的垂直滚动位置。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { getScrollTop } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
获取给定 DOM 元素的计算 CSS 样式。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { getStyle } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
判断元素是否在视口内可见。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { inViewport } from 'rattail' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
事件调度器,集成了 [mitt](https://github.com/developit/mitt)。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import mitt from 'mitt' | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
阻止事件的默认行为(如果该事件可取消)。 | ||
|
||
### 用法 | ||
### 使用 | ||
|
||
```ts | ||
import { preventDefault } from 'rattail' | ||
|
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