<button type="primary" bind:tap="click">123</button>
只需将bind改为catch就可以阻止事件冒泡,点击子元素影响父元素的问题。
<button type="primary" catch:tap="click">123</button>
与 bind
不同, catch
会阻止事件向上冒泡。
<button type="primary" bind:tap="click">123</button>
只需将bind改为catch就可以阻止事件冒泡,点击子元素影响父元素的问题。
<button type="primary" catch:tap="click">123</button>
与 bind
不同, catch
会阻止事件向上冒泡。