Feature: add uploading image from URL support

This commit is contained in:
Molunerfinn
2020-02-23 15:20:07 +08:00
parent 23ba2338c6
commit a28c67848d
4 changed files with 8 additions and 8 deletions

View File

@@ -155,10 +155,10 @@ export default class extends Vue {
}
handleInputBoxValue (val: string) {
if (val === '') return false
if (val.includes('http://') || val.includes('https://')) {
ipcRenderer.send('uploadChoosedFiles', {
if (val.startsWith('http://') || val.startsWith('https://')) {
ipcRenderer.send('uploadChoosedFiles', [{
path: val
})
}])
} else {
this.$message.error('请输入合法的URL')
}