{"id":22705266,"url":"https://github.com/hecom-rn/loadwrapper","last_synced_at":"2025-03-29T20:25:15.485Z","repository":{"id":57115540,"uuid":"182037722","full_name":"hecom-rn/LoadWrapper","owner":"hecom-rn","description":"加载队列的封装高阶组件。","archived":false,"fork":false,"pushed_at":"2023-06-05T03:22:51.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-20T08:09:54.142Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hecom-rn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-18T07:24:45.000Z","updated_at":"2022-08-23T05:58:47.000Z","dependencies_parsed_at":"2024-10-05T12:11:25.707Z","dependency_job_id":null,"html_url":"https://github.com/hecom-rn/LoadWrapper","commit_stats":{"total_commits":32,"total_committers":6,"mean_commits":5.333333333333333,"dds":0.59375,"last_synced_commit":"480480523bd6cf5b71b22396f6ff590c3252c08a"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2FLoadWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2FLoadWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2FLoadWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2FLoadWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hecom-rn","download_url":"https://codeload.github.com/hecom-rn/LoadWrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246239263,"owners_count":20745681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T09:09:51.207Z","updated_at":"2025-03-29T20:25:15.460Z","avatar_url":"https://github.com/hecom-rn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LoadWrapper\n\n[![npm version](https://img.shields.io/npm/v/@hecom/wrapper-load.svg?style=flat)](https://www.npmjs.com/package/@hecom/wrapper-load)\n[![Build Status](https://travis-ci.org/hecom-rn/LoadWrapper.svg?branch=master)](https://travis-ci.org/hecom-rn/LoadWrapper)\n\n这是对于通用加载队列的封装高阶组件。\n\n默认导出为一个用于封装的高阶组件，`(WrappedComponent, options) =\u003e React.PureComponent`，其中`WrappedComponent`是待封装的组件，`options`是配置参数对象，属性如下：\n\n* `canBack`：是否可以回退到上一页，如果为导航栈第一页，则设置为`false`。\n* `initFunc`：初始化方法，根据调用后的队列大小，来决定是否启动加载队列。`param`的格式如下：\n  * `props`：导航内部的参数，是`navigation.state.params`。\n  * `item`：当前正在处理的任务项。\n  * `push`：在队列中增加一项任务，`key`是等待队列判重的键，`value`是任务队列的任务项。\n  * `isWaiting`：判断键`key`是否正在等待队列中等待。\n  * `finish`：结束当前任务，`status`表示任务是否成功，`isStop`表示是否停止加载进程。\n* `processFunc`：处理任务的方法，`param`与`initFunc`的相同格式和含义。\n* `componentFunc`：最后渲染`WrappedComponent`之前，对于`navigation.state.params`这个导航内部参数的处理，返回处理后的内部参数。\n* `errorTitle`：错误页面的标题。\n* `errorPageOptions`：参照`ErrorPage`的属性。\n* `loadingViewStyle`：加载视图的样式。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecom-rn%2Floadwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhecom-rn%2Floadwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecom-rn%2Floadwrapper/lists"}