blog icon indicating copy to clipboard operation
blog copied to clipboard

复制粘贴功能

Open wuxianqiang opened this issue 5 years ago • 0 comments

        window.getSelection().removeAllRanges()
        const Url2 = this.$refs.linkAddress
        const range = document.createRange()
        range.selectNode(Url2)
        window.getSelection().addRange(range)
        document.execCommand('copy', false, null)

wuxianqiang avatar Nov 18 '19 13:11 wuxianqiang