Skip to content

前端常用的工具函数。Common JavaScript functions。

License

Notifications You must be signed in to change notification settings

kt007007/KFunc.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KFunc.js

前端常用的函数集合。

以NPM方式安装

npm install kfunc --save

在模块中调用(以拷贝文字函数举例)

import Kfunc from 'kfunc'

let success = Kfunc.copyText('hello')

按需引入

import copyText from 'kfunc/copyText'

let success = copyText('hello')

以静态文件方式引入

<script src="kfunc.js"></script>

<script>
    let success = Kfunc.copyText('hello')
    console.log(success)
</script>

函数列表

copyText(string)

复制文本到剪贴板

接收的参数

  • <string> 传入要复制的字符串

返回

  • <bool> 成功或失败的布尔值

About

前端常用的工具函数。Common JavaScript functions。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published