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