在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ 在vue中的圖片查看組件

在vue中的圖片查看組件

clipboard.png
需要實(shí)現(xiàn)類似的效果,目前嘗試使用vue-preivew,但是沒有提供反轉(zhuǎn)功能而且下載功能有問題。本人目前沒有能力重寫源碼,有沒有其他能實(shí)現(xiàn)類似功能的組件,如果沒有的話只能硬著頭皮重寫了。

回答
編輯回答
萌小萌

1.下載可以直接調(diào)用后臺接口呢,直接就可以實(shí)現(xiàn)下載功能

export const downloadTemplate = function (scheduleType) {
    axios.get('/result/demo/template', {
        params: {
            "scheduleType": scheduleType
        },
        responseType: 'arraybuffer'
    }).then((response) => {
      const blob = new Blob([response.data], { type: 'application/x-xls' })
      const link = document.createElement('a')
        link.href = window.URL.createObjectURL(blob)
        link.download = fileNames[scheduleType] + '_' + response.headers.datestr + '.xls'
        link.click()
    })
}

2.旋轉(zhuǎn)圖片直接用CSS3的transform的rotate值
3.希望可以幫到你

2017年2月6日 01:47