@@ -88,6 +88,14 @@ export default{
}
},
methods:{
+ testPaste(e,item){
+ //不触发input
+ e.preventDefault()
+ //只获取文字
+ const text = e.clipboardData.getData('text/plain')
+ e.target.innerHTML = text
+ item.title = text
+ },
testInput(e,item){
const text = e.target.innerHTML
item.title = text
@@ -99,6 +99,7 @@
}:{ color:'#333',fontSize:'22px',fontFamily:'helvetica',outline:0}"
v-click-title-outside="exitEditTitle"
@click.stop="handleEditTitle(item)"
+ @paste.stop="(e)=>testPaste(e,item)"
@input="(e)=>testInput(e,item)"></div>
</div>
<!-- 内容 -->
@@ -85,6 +85,7 @@