NightCat
NightCat
@szqingt 感谢反馈,后续加上哈
Is there any progress? ```js // store/modules/product export interface ProductState { name: string price: number } const state: ProductState = { name: '', price: 0 } ``` What can I...
主要支持的不止 first/last,还有 before after offset,如果要预处理的话,就得把一整个计算搬出来了。 不过这块还是可以优化一下的。 主要两个地方需要改一下 1. 这里得预先提供总数 https://github.com/NightCatSama/NightCat/blob/6c836a64fa568cc70a2aaa062dcd56113fe44790/graphQL/pagination.js#L123 2. 然后这块得到了一个数据范围(range), 再拿这个 range 去查数据库 https://github.com/NightCatSama/NightCat/blob/6c836a64fa568cc70a2aaa062dcd56113fe44790/graphQL/pagination.js#L162-L169 这样的话就不需要 node 了,也就是不需要 getUsers 了。但是相对的,得提供查询方法。
我记得 mysql(例如Sequelize) 和 mongodb(例如mongoose) 都有相应的 api 直接获取长度 这种没有 before 和 after 的写法,是比较简单也是最通用的分页方法了。就不需要我这种这么复杂了,你那个方法应该就够用了。 我是根据官方的文档的规范写的 如果你想使用这种规范写,又想优化请求效率的话,可以按我之前说的那两点改写一下
@rbecheras In the latest version, it should have been replaced by `* 0.5`
Fixed in version 3.2.23.
I hit a breakpoint to debug, don't know why Super becomes something else. 😿
Because `value` and `min/max` cannot be set to the component at the same time, an error will occur, but it will not affect the use. You can set `silent: true`...
@digEmAll I can't think of a good way to solve it. 😞
Sorry, the component does not support the SSR.