-
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.
feat: add copyText util function (#25)
* feat: add copyText util function * Update copy-text.md * Update copy-text.md --------- Co-authored-by: liusen <[email protected]>
- Loading branch information
Showing
5 changed files
with
78 additions
and
0 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,23 @@ | ||
# copyText | ||
|
||
Copies text to the clipboard. | ||
|
||
### Usage | ||
|
||
```js | ||
import { copyText } from 'rattail' | ||
|
||
copyText('Hello, clipboard!') // The string will be written to the clipboard | ||
``` | ||
|
||
### Arguments | ||
|
||
| Arg | Type | Defaults | | ||
| ------ | -------- | -------- | | ||
| `text` | `string` | | | ||
|
||
### Return | ||
|
||
| Type | | ||
| ------ | | ||
| `-` | |
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 @@ | ||
# copyText | ||
|
||
复制文本到剪贴板 | ||
|
||
### 用法 | ||
|
||
```js | ||
import { copyText } from 'rattail' | ||
|
||
copyText('Hello, clipboard!') // 字符串会被写入剪切板 | ||
``` | ||
|
||
### 参数 | ||
|
||
| 参数 | 类型 | 默认值 | | ||
| ------ | -------- | ------ | | ||
| `text` | `string` | | | ||
|
||
### 返回值 | ||
|
||
| 类型 | | ||
| ------ | | ||
| `-` | |
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