Browse Source

修复粘贴存档无效BUG

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

15
src/views/archive.vue

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