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

查看:404
本文介绍了用于非本地移动Web开发的Ant Design antd vs 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设计..."这样的语句,而阅读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)"

因此,我认为除了基于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构建普通的Web应用程序无法正常工作.例如,显示的是按钮,但没有显示DatePicker.切换到蚂蚁似乎一切正常.

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?

推荐答案

根据我的经验:

蚂蚁:

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

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版本(使用View,Text等...)

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).

原始本机版本:您将使用它来构建位于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 vs antd-mobile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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