copy
第一步:
npm install copy-to-clipboard --save
使用方法:package.json内
"dependencies": {"copy-to-clipboard": "^3.0.5"
}
控制台:
npm install
webpack
webpack-dev-server
使用:
import copy from 'copy-to-clipboard';
//复制cdk
export const copyCdk = (cdk?: string[]) => {if (!cdk) {return;}const text = cdk.reduce((a, c) => {a += `${c}\n`;return a;}, '');Copy(text);toast('已复制成功');
};
copy
第一步:
npm install copy-to-clipboard --save
使用方法:package.json内
"dependencies": {"copy-to-clipboard": "^3.0.5"
}
控制台:
npm install
webpack
webpack-dev-server
使用:
import copy from 'copy-to-clipboard';
//复制cdk
export const copyCdk = (cdk?: string[]) => {if (!cdk) {return;}const text = cdk.reduce((a, c) => {a += `${c}\n`;return a;}, '');Copy(text);toast('已复制成功');
};