Browse Source

修复粘贴存档无效BUG

v1.0
许孟阳 6 days ago
parent
commit
d5c48da08d
  1. 9
      src/views/archive.vue

9
src/views/archive.vue

@ -107,11 +107,16 @@ const downArchive = () => { @@ -107,11 +107,16 @@ const downArchive = () => {
}
const pasteArchive = () => {
navigator.clipboard.readText().then((text) => {
const name: any = 'clipboard-read';
navigator.permissions.query({ name: name }).then(result => {
if (result.state === 'granted') {
navigator.clipboard.readText().then(text => {
archive.value = text;
commit('set_sys_info', { msg: t('pasteArchive.1'), type: 'win' })
}, () => {
});
} else {
commit('set_sys_info', { msg: t('pasteArchive.2'), type: 'waring' })
}
});
}

Loading…
Cancel
Save