mobx-miniprogram-bindings icon indicating copy to clipboard operation
mobx-miniprogram-bindings copied to clipboard

typescipt 在page绑定一个方法怎么帮这个方法写回WechatMiniprogram.Page.Constructor

Open callmesoul opened this issue 4 years ago • 2 comments

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”

callmesoul avatar Nov 23 '20 08:11 callmesoul

是的,一年多了,还没修复这个问题

ShmilyLin avatar Jun 21 '22 04:06 ShmilyLin

3年了,还没处理

ace0109 avatar Sep 11 '23 02:09 ace0109

这个是做不到的。只能通过类似 #47 的那种处理方式。

LastLeaf avatar May 15 '24 08:05 LastLeaf