We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
错误主要是报"TypeError: Cannot read property '(我的集合名)' of undefined"
看了一下, 主要是在extend函数的Array of Each处报错
我的设置信息:
//create.js function pull(cn, where) { return new Promise(function (resolve) { globalStore.db.collection(cn).where(where || {}).get().then(res => { extend(res, cn)//手动注释掉这一条之后能在页面处的调用打印出数据信息 resolve(res) }) }) } function extend(res, cn) { console.log('function extend,res,cn',res,cn);//添加该条之后也能打印出完整的集合数据记录和集合名 但下面的forEach仍然报错 res.data.forEach(item => { const mds = globalStore.methods[cn] mds && Object.keys(mds).forEach(key => { Object.defineProperty(item, key, { enumerable: true, get: () => { return mds[key].call(item) }, set: () => { //方法不能改写 } }) }) }) }
在使用westore cloud的数据库更新功能时,传入了一个数组,同样在Array for Each 处报错:
回顾我对更新功能的调用,在使用westore前的demo里,我是在具体页面的onHide函数,通过云函数来更新数据库。使用westore之后,我仍然需要在onHide函数中获取全局数据,并一次上传到数据库,查看create.js 发现:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
错误主要是报"TypeError: Cannot read property '(我的集合名)' of undefined"
看了一下, 主要是在extend函数的Array of Each处报错
我的设置信息:
在使用westore cloud的数据库更新功能时,传入了一个数组,同样在Array for Each 处报错:
回顾我对更新功能的调用,在使用westore前的demo里,我是在具体页面的onHide函数,通过云函数来更新数据库。使用westore之后,我仍然需要在onHide函数中获取全局数据,并一次上传到数据库,查看create.js 发现:
2.update函数的返回值是diff后的结果
3.我的onHide调用中传入的,已经是最新的数据,diff结果自然为空,于是无法使用push函数更新云数据库
The text was updated successfully, but these errors were encountered: