mobx-miniprogram-bindings
mobx-miniprogram-bindings copied to clipboard
typescipt 在page绑定一个方法怎么帮这个方法写回WechatMiniprogram.Page.Constructor
createStoreBindings(this, {
store,
fields: ['classId'],
actions: ['changeCurrentClassId']
})
// 选择班级
chooseClass (e: any) {
const id = e.currentTarget.dataset.id
this.changeCurrentClassId(id)
},
any
类型“Instance<{}, { data: {}; onLoad: (options: Record<string, string | undefined>) => void; onReady: () => void; onShow: () => void; onHide: () => void; onUnload: () => void; onPullDownRefresh: () => void; onReachBottom: () => void; onShareAppMessage: () => void; chooseClass(e: any): void; }>”上不存在属性“changeCurrentClassId”
是的,一年多了,还没修复这个问题
3年了,还没处理
这个是做不到的。只能通过类似 #47 的那种处理方式。