shareTitle: { handler(newVal) { console.log(newVal,'shareTitle') this.sharemessage = newVal }, deep: true }, 我是在watch中赋值的
send-message-title,send-message-img属性失效? <button @contact="toggleService" :key="sharemessage" open-type="contact" :send-message-title="sharemessage" :send-message-img="shareImg" :show-message-card="code ? 'true' : 'false'"> 这样写,而且我里边的那几个值是双向绑定的,但是为什么发送过去的一直都是默认的呢
11-12解决了,这个定义的<view :id="scrollIntoview"></view>必须和我的component同一层级,不能是他的子级
scroll-view中的属性scroll-into-view失效?<scroll-view scroll-y scroll-with-animation class="scroll-view scroll-view-content" @scroll="viewScroll" :scroll-top='scrollTop' :scroll-into-view="scrollIntoViewId" enable-passive > ... <component @changeTab="changeTab"> <view :id="scrollIntoViewId"></view> </component> </scroll-view> ... <script> data() { return { ... scrollIntoViewId: "", }; }, methods:{ changeTab(value) { this.scrollIntoViewId = value;//另一个页面通过$emit传过来的值,可以取到 }, } </script>
2024-12-11