mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 23:30:26 +08:00
修复<file-textarea>组件在firefox上无法复制内容的Bug
This commit is contained in:
@@ -12,6 +12,7 @@ Vue.component("file-textarea", {
|
|||||||
mounted: function () {
|
mounted: function () {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
dragover: function () {},
|
||||||
drop: function (e) {
|
drop: function (e) {
|
||||||
let that = this
|
let that = this
|
||||||
e.dataTransfer.items[0].getAsFile().text().then(function (data) {
|
e.dataTransfer.items[0].getAsFile().text().then(function (data) {
|
||||||
@@ -22,5 +23,5 @@ Vue.component("file-textarea", {
|
|||||||
this.realValue = value
|
this.realValue = value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
template: `<textarea @drop.prevent="drop" ref="textarea" v-model="realValue"></textarea>`
|
template: `<textarea @drop.prevent="drop" @dragover.prevent="dragover" ref="textarea" v-model="realValue"></textarea>`
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user