Skip to content

Commit

Permalink
feat: 导入,书源管理操作后更新发现页面
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-boide committed Jul 21, 2024
1 parent 4938b66 commit ea0ac10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions entry/src/main/ets/componets/import/ImportCommon.ets
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default struct ImportCommon {
@State updateNameMap: Record<string, boolean> = {}
@State fullActive: boolean = false
@State waringActive: boolean = false
@StorageLink('refreshCount') refreshCount: number = 0
private scroll: Scroller = new Scroller()
private secondScroll = new Scroller()

Expand Down Expand Up @@ -190,6 +191,7 @@ export default struct ImportCommon {
this.show = false;
this.resetState()
showMessage('添加成功')
this.refreshCount += 1
})
}
.width('100%')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default struct SourceView {
private scroll: Scroller = new Scroller()
private secondScroll = new Scroller()
@State dialogItem: Partial<BookSourcePart> = {}
@StorageLink('refreshCount') refreshCount: number = 0
private dialogController: CustomDialogController = new CustomDialogController({
builder: CustomContentDialog({
primaryTitle: '书源评分',
Expand Down Expand Up @@ -92,9 +93,7 @@ export default struct SourceView {
}

getList() {
// axios.get('https://node.wisdoms.xin/static/file/20240704/sy.json').then((res: AxiosResponse) => {
// const bookSource: BookSource[] = res.data ?? []
// FileHandler.readJsonFile<BookSource[]>(this.pathBookSource)
this.refreshCount += 1
BookSourceDao.flowSearch({
type: this.index,
searchKey: this.searchValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default struct BodyContent {
@Prop currentIndex: number
@StorageLink(CommonConstants.HAS_EXPLORE_URL) @Watch('getList') hasExploreUrl?: boolean = undefined
tabsBodyController: TabsController = new TabsController();
@State @Watch('getList')refreshCount: number = 0
@StorageLink('refreshCount') @Watch('getList')refreshCount: number = 0

aboutToAppear() {
this.getList()
Expand Down

0 comments on commit ea0ac10

Please sign in to comment.