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
Store
cancelUncompleted
this.store.cancelUncompleted(); // 取消所有的 Actions
@Action()
@Injectable() export class ItemsStore extends Store<ItemsState> { constructor() { super({ items: [] }); } @Action({ cancelCompleted: true }) // 取消当前的 Action fetchItems(type: 1 | 2) { return of(['Item 1', 'Item 2']).pipe( delay(1000), tap((data) => { this.setState({ items: data }); }) ); } }
方案1 新增一个 cancelScope: 'self' | 'store' | 'all' | 某个类别
cancelScope: 'self' | 'store' | 'all' | 某个类别
方案2: cancelUncompleted 支持支持范围字符串: 'none' | 'self' | 'store' | 'list'(初步确定使用)
'none' | 'self' | 'store' | 'list'
讨论问题:
category
The text was updated successfully, but these errors were encountered:
feat: add cancel uncompleted action draft version #41
85c1330
feat: add cancel uncompleted action draft version #41 (#42)
678a187
feat: add cancel uncompleted action #41
e7d244c
No branches or pull requests
Store
addcancelUncompleted
method that cancel all uncompleted actionscancelUncompleted
parameter to@Action()
方案1
新增一个
cancelScope: 'self' | 'store' | 'all' | 某个类别
方案2:
cancelUncompleted
支持支持范围字符串:'none' | 'self' | 'store' | 'list'
(初步确定使用)讨论问题:
cancelUncompleted
都设置上,这样做风险有点大,如果一个页面同时调用某个 Actions 多次会出问题。category
把相关的 Actions 标记为一类,这样取消的时候一起取消,后期再实现The text was updated successfully, but these errors were encountered: