📅  最后修改于: 2022-03-11 15:03:38.453000             🧑  作者: Mango
#note that this will prompt the user to allow acces to clipboard
navigator.clipboard.readText().then(text => {
console.log('Clipboard content is: ', text);
})
.catch(err => {
console.error('Failed to read clipboard contents: ', err);
});