解决weex点击事件触发两次

时间:2021-08-14 19:33:40

该问题是vue的一个bug,解决方案如下:


修改项目中的/web/index.html文件

-表示删除
+表示新增

<head>
  <meta charset="utf-8">
  <title>weex-vue-demo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-touch-fullscreen" content="yes">
  <meta name="format-detection" content="telephone=no, email=no">
  <!-- <style>body > div { height: 100%; }</style> -->
  <style>body::before { content: "1"; height: 1px; overflow: hidden; color: transparent; display: block; }</style>
- <script src="../node_modules/vue/dist/vue.runtime.js"></script>
+ <script src="https://cdn.bootcss.com/vue/2.3.4/vue.runtime.min.js"></script>
  <script src="../node_modules/weex-vue-render/dist/index.js"></script>
</head>