npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

example-mobile-client

v0.0.11

Published

示例基础项目

Downloads

5

Readme

af-example-mobile-web

af-example-mobile-web 是基于v4架构和react-base-client脚手架的移动端示例项目,你可以通过 af-example-mobile-web 快速搭建一个基于v4架构的移动端项目。

关于 开发规范 请查看 开发规范

主要功能


  • web前端项目示例

主要引用框架

https://ant.design/index-cn https://mobile.ant.design/zh https://umijs.org/

af-example-mobile-web模块

af-example-mobile-web
    .
    ├── docs //项目文档
    ├── config
    │   └── config.ts //基础配置,非必要请勿修改,https://umijs.org/docs/api/config
    ├── dist //打包文件输出目录
    ├── src
    │   ├── .umi //项目启动后生成,勿动
    │   ├── .umi-production //项目打包时生成,勿动
    │   ├── layouts //基础布局 https://umijs.org/docs/guides/routes#%E5%85%A8%E5%B1%80-layout
    │   ├── models //全局数据 https://umijs.org/docs/max/data-flow#%E5%88%9B%E5%BB%BA-model
    │   ├── pages //页面
    │   │   ├── index.less
    │   │   └── index.tsx
    │   ├── utils 工具类
    │   ├── services // 推荐目录
    │   ├── app.(ts|tsx) //入口文件
    ├── package.json
    ├── tsconfig.json 
    └── typings.d.ts
页面请放在pages目录下,建立文件夹

如何构建

  • 使用最新的nodejs,npm和pnpm版本 af-example-mobile-web 使用 pnpm 来构建,最快的使用方式是将本项目 clone 到idea,然后执行以下脚本
pnpm install
pnpm run dev

如何使用

最快的使用方式是在本项目的gitlab主页点击派生按钮,即可复制一份本项目结构

1.修改AppConfig.tsx

{
  path: 'example',
  key: 'example',
  routes: [
    {
      key: 'example-testpage',
      path: 'testPage',
      component: '../pages/testPage',
      page: page: React.lazy(()=>import('./pages/testPage')),,
    },
  ],
};
example改为自己项目 例如
{
  path: 'safecheck',
  key: 'safecheck',
  routes: [
    {
      key: 'safecheck-testpage',
      path: 'testPage',
      component: '../pages/testPage',
      page: page: React.lazy(()=>import('./pages/testPage')),,
    },
  ],
};

2.修改ImageConfig.ts用来设置每个页面的图标 没有可不设置 最外层页面图标必须设置

export default {
  example: {
    testPage: require('./assets/icon/流程监控.png'),
  },
};

example改为自己项目 例如
export default {
  safecheck: {
    testPage: require('./assets/icon/流程监控.png'),
  },
};

3.修改index.ts

export default {
  ExampleAppConfig: AppConfig,
  ExampleImageConfig: ImageConfig,
};
修改名称,仅为区分在打包项目中的引入

export default {
  SafeCheckAppConfig: AppConfig,
  SafeCheckImageConfig: ImageConfig,
};


4.修改package.json中模块名称