Giter Site home page Giter Site logo

mpvue-iview-weapp's Introduction

mpvue-iview-weapp

使用mpvue通过usingComponents导入iview-weapp

预览

1. git clone
git clone https://github.com/wkl007/mpvue-iview-weapp.git

2. 安装依赖
cd mpvue-iview-weapp && npm install

3. 启动程序
npm run dev

4. 预览
打开微信开发者工具,新建项目,将目录指向 /dist/wx 即可

问题

若原生组件通过click事件,即this.triggerEvent('click', { index })来进行父子组件通信,mpvue无法从event.mp中读取到正确的detail,原因是因为mpvueclick事件编译为tap导致this.triggerEvent('click', { index })无法找到click句柄

暂时解决方案

修改组件库click事件名称,例如:

this.triggerEvent('click', { index }) => this.triggerEvent('iclick', { index })

对应的模板中:

@click => @iclick

注:本次示例中修改了action-sheetmodal组件

受影响组件(仅传值情况受影响)

  1. action-sheet
  2. modal

mpvue-iview-weapp's People

Contributors

wkl007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mpvue-iview-weapp's Issues

咋打开

微信开发者工具要打开哪个文件夹

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.