Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

copypanel

hanyi3ISC0.0.1

copy

readme

copyPanel


api

copy(str,[callback])

参数:

  • {String} str:复制文本
  • {Function} [callback]:回调函数,res [object] {status:boolean,msg:string}

返回值: {boolean} status;调用copy之后,会有返回值,返回复制的状态

if(copyPanel.copy('abc')){
    //copy success  do something
}else{
    //copy fail do sommething
}

//or

copyPanel.copy('123',function(res){
    //res   {status:xx,msg:xx}
});

注意
  • 不能直接通过js去复制,必须有交互动作