我確實有一個圖像 url 讓我們說http://localhost/sample.jpg。我想File在創建組件時將此圖像 url 保存到對象類型中。我如何使用本機 js api 實現此目的?export default { created () { const imageUrl = 'http://localhost/sample.jpg' const file = this.getFileFromUrl(imageUrl) }, methods: { getFileFromUrl (url) { // ... what should i return? } }}
如何從vuejs中的url(圖像)獲取文件類型對象
慕田峪4524236
2023-05-25 17:23:13