Git Product home page Git Product logo

Comments (4)

iZaiZaiA avatar iZaiZaiA commented on August 12, 2024

您好,<ui-swiper>如何增加跳转页面呢?目前我是在ui-swiper.js的toTap()函数中增加跳转代码wx.navigateTo({url: e.currentTarget.dataset.item.url }),直接改动组件显然是不合理的,请问该如何操作实现<ui-swiper>跳转页面呢?

您好,非常抱歉,暂时还不支持设置跳转或返回点击事情,今天晚上我完善下,完善后,我会回复您。

from mp-cu.

iZaiZaiA avatar iZaiZaiA commented on August 12, 2024

您好,<ui-swiper>如何增加跳转页面呢?目前我是在ui-swiper.js的toTap()函数中增加跳转代码wx.navigateTo({url: e.currentTarget.dataset.item.url }),直接改动组件显然是不合理的,请问该如何操作实现<ui-swiper>跳转页面呢?

您好,已经修复了。

使用方式如下:

//type: switchTab/reLaunch/redirectTo/navigateTo/eve
swiperList: [
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg',
          url: '/pages/document/system/system',
          type: 'navigateTo' //直接跳转类型
      },
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big37006.jpg',
          url: '/pages/custom/home',
          type: 'switchTab' //直接跳转类型
      },
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg',
          type: 'eve' //事件方式
      },
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg',
          type: 'eve'
      },
]

加事件

<ui-swiper info="{{swiperList}}" dotCur="ui-BG-Main" bind:uiTap="swiperTap"/>

注意type: switchTab/reLaunch/redirectTo/navigateTo/eve

类型为eve时,为点击事件,不会跳转,其它类型会跳转。

from mp-cu.

XiaokangLei avatar XiaokangLei commented on August 12, 2024

您好,<ui-swiper>如何增加跳转页面呢?目前我是在ui-swiper.js的toTap()函数中增加跳转代码wx.navigateTo({url: e.currentTarget.dataset.item.url }),直接改动组件显然是不合理的,请问该如何操作实现<ui-swiper>跳转页面呢?

您好,已经修复了。

使用方式如下:

//type: switchTab/reLaunch/redirectTo/navigateTo/eve
swiperList: [
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg',
          url: '/pages/document/system/system',
          type: 'navigateTo' //直接跳转类型
      },
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big37006.jpg',
          url: '/pages/custom/home',
          type: 'switchTab' //直接跳转类型
      },
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg',
          type: 'eve' //事件方式
      },
      {
          img: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg',
          type: 'eve'
      },
]

加事件

<ui-swiper info="{{swiperList}}" dotCur="ui-BG-Main" bind:uiTap="swiperTap"/>

注意type: switchTab/reLaunch/redirectTo/navigateTo/eve

类型为eve时,为点击事件,不会跳转,其它类型会跳转。

感谢,我试一下

from mp-cu.

iZaiZaiA avatar iZaiZaiA commented on August 12, 2024

from mp-cu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.