用于非原生移动 Web 开发的 Ant Design antd 与 antd-mobile [英] Ant Design antd vs antd-mobile for non-native mobile web development

查看:75
本文介绍了用于非原生移动 Web 开发的 Ant Design antd 与 antd-mobile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读 Ant Design 时,我对使用哪个库进行移动 Web 开发感到困惑.有两个库,antdantd-mobile.虽然很明显 antd-mobile 支持 iOS 和 Android 上的 react-native,但尚不清楚哪一种最适合纯移动(非原生/SPA)Web 开发.

Reading about Ant Design I am getting confused about which library to use for mobile web development. There are two libraries, antd and antd-mobile. While it is clear that antd-mobile supports react-native on iOS and Android, it is unclear which one is best suited for plain mobile (non-native / SPA) web development.

阅读 antd 介绍,您会看到诸如专门为内部桌面应用程序创建的 Ant Design,..."之类的陈述,而阅读 antd-mobile 介绍时,您将看到支持 Web/iOS/Android 平台(基于 React原生)"

Reading the antd introduction you see statements like "Ant Design which is specially created for internal desktop applications, ...", while reading the antd-mobile introduction you will see "Support Web / iOS / Android platform (Based on React Native)"

因此,我认为 ant 在某种程度上不太适合除基于 Web 的桌面(即 Elektron)应用程序之外的 Web 开发.

From this I would think that ant is somehow not very suitable for web development other than web based desktop (i.e. Elektron) apps.

但是尝试用 ant-mobile 构建一个普通的网络应用程序我无法让它工作.例如 Button 显示但 DatePicker 没有.切换到 ant 似乎一切正常.

But trying to build a normal web app with ant-mobile I couldn't get it to work. For example the Button is showing but DatePicker is not. Switching to ant everything seems to work fine.

我是否认为对于任何非本地移动开发,您都需要使用 ant 而不是 ant-mobile?

Am I right to assume that for any non-native mobile development you need to use ant instead of ant-mobile?

如果是这样,antd-mobile 提到的支持的Web"平台是什么?

If so, what is this supported "Web" platform that antd-mobile is mentioning?

推荐答案

根据我的经验:

蚂蚁:

仅用于完整的浏览器网络(或电子)开发,它们不是移动优先设计,在某些情况下,您必须进行调整才能使您的网页在移动设备中看起来不错.

Intended for full browser web only (or electron) development, they are no mobile first design, some cases you have to tweak to make you web page look good in mobile.

蚂蚁金服:

Antd mobile 导出了 2 个版本的组件,Web 版本(使用 DOM)和 React Native 版本(使用视图、文本等...)

Antd mobile exports 2 versions of components, the web one (which uses DOM) and the react native version (uses View, Text etc...)

网页版:你可以认为它就像 jQuery Mobile、Sencha Touch 等,旨在构建纯移动网页/应用程序,你将在移动设备中看到的应用程序浏览器.例如,使用移动浏览器打开 facebook.com、amazon.com(它们看起来与桌面浏览器非常不同).

Web version: You can think it's like jQuery Mobile, Sencha Touch etc, it's intended to build pure mobile web page/application, the application that you are going to see in a mobile browser. example, go and open facebook.com, amazon.com with a mobile browser (they look really different then the desktop one).

React Native 版本:您将使用它来构建一个位于 Google Play 商店/App Store 中的移动应用(一个混合应用),这是一个需要安装的应用.

React Native version: You will use this to build a Mobile App (a hybrid app) that sits in Google Play store/App Store, an app that needs to be installed.

希望有帮助.如果我犯了错误,请告诉我.

Hope it helps. If I made mistakes please let me know.

这篇关于用于非原生移动 Web 开发的 Ant Design antd 与 antd-mobile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆