gallery.js 846 B

123456789101112131415161718192021222324252627282930313233
  1. import CustomPage from '../../../base/CustomPage'
  2. CustomPage({
  3. onShareAppMessage() {
  4. return {
  5. title: 'gallery',
  6. path: 'page/weui/example/gallery/gallery'
  7. }
  8. },
  9. data: {
  10. imgUrls: [
  11. 'https://res.wx.qq.com/op_res/0TZreUFL8sWsS1cFx5_f7MF5aY767_cWsd9JiKdHxL9Ktu6O6JLAJwvF-jLVxpB3',
  12. 'https://res.wx.qq.com/op_res/0TZreUFL8sWsS1cFx5_f7MF5aY767_cWsd9JiKdHxL9Ktu6O6JLAJwvF-jLVxpB3',
  13. 'https://res.wx.qq.com/op_res/0TZreUFL8sWsS1cFx5_f7MF5aY767_cWsd9JiKdHxL9Ktu6O6JLAJwvF-jLVxpB3'
  14. ],
  15. show: true
  16. },
  17. change(e) {
  18. console.log('current index has changed', e.detail)
  19. },
  20. delete(e) {
  21. console.log('delete', e.detail)
  22. },
  23. hide() {
  24. console.log('component hide')
  25. setTimeout(() => {
  26. console.log('component show')
  27. this.setData({
  28. show: true
  29. })
  30. }, 1000)
  31. }
  32. })