v-on.vue 463 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <recycle-list for="item in longList" switch="type">
  3. <cell-slot case="A">
  4. <text v-on:click="handler" @longpress="move">A</text>
  5. <text @touchend="move">B</text>
  6. </cell-slot>
  7. </recycle-list>
  8. </template>
  9. <script>
  10. module.exports = {
  11. data () {
  12. return {
  13. longList: [
  14. { type: 'A' },
  15. { type: 'A' }
  16. ]
  17. }
  18. },
  19. methods: {
  20. handler () {},
  21. move () {}
  22. }
  23. }
  24. </script>