Touch evt to listingitem
Former-commit-id: e0b99fff671f5f2e17494593eba5390349063e33 [formerly 8a66a38707b36248b03efcc1678b53005a23349f] [formerly 87802b40b37545b81f9bf4c66225ca1f937f12ac [formerly 8a8ddbec20
]]
Former-commit-id: fc1c31af884b8dce98898fcc5f530c9a2c6c3101 [formerly 8374ff2b099bae13ed32d6b8e242dce34d2a235f]
Former-commit-id: c33fccc656fbb0c3ac5844075fa028f48a3c4ab2
pull/726/head
parent
efd1fdc1f4
commit
1cdb791aaa
|
@ -6,6 +6,7 @@
|
||||||
@drop="drop"
|
@drop="drop"
|
||||||
@click="click"
|
@click="click"
|
||||||
@dblclick="open"
|
@dblclick="open"
|
||||||
|
@touchstart="touchstart"
|
||||||
:aria-selected="isSelected">
|
:aria-selected="isSelected">
|
||||||
<div>
|
<div>
|
||||||
<i class="material-icons">{{ icon }}</i>
|
<i class="material-icons">{{ icon }}</i>
|
||||||
|
@ -32,6 +33,11 @@ import api from '@/utils/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'item',
|
name: 'item',
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
touches: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
props: ['name', 'isDir', 'url', 'type', 'size', 'modified', 'index'],
|
props: ['name', 'isDir', 'url', 'type', 'size', 'modified', 'index'],
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['selected', 'req']),
|
...mapState(['selected', 'req']),
|
||||||
|
@ -115,6 +121,16 @@ export default {
|
||||||
|
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
|
touchstart (event) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.touches = 0
|
||||||
|
}, 300)
|
||||||
|
|
||||||
|
this.touches++
|
||||||
|
if (this.touches > 1) {
|
||||||
|
this.open()
|
||||||
|
}
|
||||||
|
},
|
||||||
open: function (event) {
|
open: function (event) {
|
||||||
this.$router.push({path: this.url})
|
this.$router.push({path: this.url})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue