wepy icon indicating copy to clipboard operation
wepy copied to clipboard

warning console when bind event with wxs

Open chenyu445 opened this issue 4 years ago • 0 comments

Description

[问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚] 在.wpy文件中使用wxs绑定事件,

<wxs module="test" lang="babel">
  module.exports.tap = ()=>{
    console.log('tap')
  }
</wxs>
<template>
  <div class="container">
    <div class="userinfo" @tap.wxs="test.tap">
      <button>测试wxs点击</button>
    </div>
  </div>
</template>

然后进行打包的时候,不管有没有在事件后面增加.wxs的修饰符控制台都会报错

 seems 'test' is a wxs module, please manully add a  .wxs modifier for the event.

Environment

  • wepy-cli version: [wepy-cli] 所有版本
  • wepy version: [在package.json里] 所有版本
  • other version: [如果是插件问题,请列出问题插件的版本号]

Reproduce

[如何重现问题]

[How to reproduce the issue]

Observed Results

[实际表现]

[Observed Results]

Expected Results

[期望表现]

使用wxs绑定事件,使用.wxs修饰符的时候不报错,没有使用.wxs修饰符的时候报错

Relevant Code / Logs

<wxs module="test" lang="babel">
 module.exports.tap = ()=>{
   console.log('tap')
 }
</wxs>
<template>
 <div class="container">
   <div class="userinfo" @tap.wxs="test.tap">
     <button>测试wxs点击</button>
   </div>
 </div>
</template>

chenyu445 avatar Jun 11 '20 16:06 chenyu445