コピー機能を実現VUE

コピー機能を実現VUE

コピー(){
  VAR _Input =のdocument.createElement( "INPUT"); //ビルド直接INPUT
  _input.value = this.egc_token; //セット内容
  document.body.appendChild(_input); //追加の一時的なインスタンス
  _input.select (); //コンテンツの選択例
  document.execCommand( "コピー"); //レプリケーションを実行
  ( 'が正常にコピーされた')アラートを
  document.body.removeChild(_Input); //削除の一時的なインスタンス
}
 

 

おすすめ

転載: www.cnblogs.com/Strangers/p/11949645.html