v-on-inline.vue 631 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <recycle-list :list-data="longList" template-key="type" alias="item">
  3. <cell-slot template-type="A">
  4. <text v-on:click="toggle()" @longpress="toggle(item.key)"></text>
  5. <text @appear="onappear(item.index, 'static', item.type, $event)">Button</text>
  6. <text @disappear="onappear(25, 'static')">Tips</text>
  7. </cell-slot>
  8. </recycle-list>
  9. </template>
  10. <script>
  11. module.exports = {
  12. data () {
  13. return {
  14. longList: [
  15. { type: 'A' },
  16. { type: 'A' }
  17. ]
  18. }
  19. },
  20. methods: {
  21. hide () {},
  22. toggle () {},
  23. onappear () {}
  24. }
  25. }
  26. </script>