当前位置:网站首页>微信小程序开发(原生和uniapp)DOM标签对比介绍
微信小程序开发(原生和uniapp)DOM标签对比介绍
2022-06-11 06:45:00 【四肢发达的猿】
时间线
vue 2014年对外发布
uniapp 2015年对外发布
微信小程序,2017公测,对外发布
题主2013年毕业,从事互联网开发,这几个刚好碰上。从前后端不分离到分离,Html4到html5时代。
技术栈
作为前端技术,核心为html+css+js,html+css没啥难度,各百来个单词,之前的文系美工就能做的,俗称“页面仔”,上手方便。现在叫“前端工程师”,主要是前后端分离时代。
html+css+js扎实,对于很多开源的UI框架,如WeUi(腾讯官方UI)、UViev、TouchUI WX、IView(TalkingData)、lin-ui、vant(有赞),colorUI、TaroUI(京东)、WuxUI、MinUI(蘑菇街)
开发就区分两种:
原生小程序和uniapp搭配上面的UI框架。
DOM标签对比
| 标签 | 微信小程序 | uniapp | Html5 | 备注 |
| 块标签 | view | view、div | div、section、【dl,dt】、【ol,li】【ul、li】、【h1-h6】 | 微信小程序和uniapp比较少和SEO有关系(除了移动端h5)没有html那么多的花里胡哨 |
| 行内标签 | text | text | span、em、strong、a、font | 通用span,微信和uniapp的text就够用,html5比较花哨,<aaa></aaa><bbb></bbb>都可以,基于语义化,常用几个标签即可 一般的,块元素包行内元素,行内元素不包行块元素、行内元素 |
| 链接导航 | <navigator url="/pages/index/index" hover-class=“none” open-type="navigate" ></navigator> | <navigator url="../component/Header" ” ></navigator> | <a href="url"></a> | 原生和uniapp的一样 hover-class=“none” 默认去点击(hover)的样式 open-type="navigate" 跳转方式,对应js的wx.switchTab、wx.navigateto、wx.redirectTo uniapp的就是 uni.switchTab,uni.redirectTo,uni.redirectTo 这个三个区别就是一个跳非自定义底部菜单tabbar,一个是最多跳10次的,再点就点不动,对应返回 一个是redirectTo,直接一次层级,不存在返回 |
| 图片 | image | image | img | 原生和uniapp一样,提供mode13个情况,图片的显示方式,图片变形的low表现方式,总有一个适合的,看业主接受方式 |
| 表单 | form、button、lable、input、checkbox、radio、picker、picker-view、slider、switch、textarea | form、button、lable、input、checkbox、radio、picker、picker-view、slider、switch、textarea | input、button、textarea、label大致相同 | 差异较多 |
| 外嵌 | web-view | web-view | iframe | |
| 滑动标签 | scroll-view | scroll-view | - | 支持横向竖向滑动 |
| 轮播 | swiper | swiper | - | |
| 拖动 | movable-area | movable-area | - | 一个按钮全屏拖动,侧边拖动效果 |
| 媒体标签 | audio、map、video、canvas、camera、live-player、live-pusher、void-room | audio、map、video、canvas、camera、live-player、live-pusher、void-room | video、audio、enbed、source、track | img也是媒体标签,频率高放上面了 |
| 覆盖原生的视图 | cover-view cover-image | cover-view cover-image | - | 想做个按钮覆盖video,小程序和uniapp的这个标签就上场了 map、video、canvas、camera、live-player、live-pusher |
| 开放数据-关注公众号 | official-account | official-account | - | 关注公众号组件 基于扫码场景,不扫码就没有展示这个组件 |
| 开放数据-广告 | ad-custom | ad-custom | - | 广告模板 |
| 微信客服 | <button open-type="contact"></button> | <button open-type="contact"></button> | - | 需要微信小程序后台设置才能收到用户发的消息 |
边栏推荐
- Oracle提示无效数字
- 22年五月毕设
- SQL language - query statement
- 关于组织开展2022年宁波市重点首版次软件申报工作的通知
- Redux learning (III) -- using Redux saga, writing middleware functions, and splitting reducer files
- 022 basic introduction to redis database 0
- 统计某次操作(函数)耗时时长
- Who is stronger, zip or 7-Zip, and how to choose?
- Count the time-consuming duration of an operation (function)
- 关于SIoU的原理和代码实现(回顾IoU、GIoU、DIoU、CIoU)
猜你喜欢

During unity panoramic roaming, AWSD is used to control lens movement, EQ is used to control lens lifting, and the right mouse button is used to control lens rotation.

开源漫画服务器Mango

Do you use typescript or anyscript

Vulhub 8.1-backdoor vulnerability recurrence

关于SIoU的原理和代码实现(回顾IoU、GIoU、DIoU、CIoU)

socket. IO cross domain stepping pit

Metasploitabile2 target learning

Sohu employees encounter wage subsidy fraud. What is the difference between black property and gray property and how to trace the source?

Flat design, blog website (VIII) code source code

EasyGBS接入的设备视频直播突然全部无法播放是为什么?数据库读写不够
随机推荐
617. 合并二叉树
Aircraft battle from scratch (III) flight between player aircraft and enemy aircraft
Post exam summary
【Matlab图像加密解密】混沌序列图像加密解密(含相关性检验)【含GUI源码 1862期】
QT script document translation (I)
socket. IO cross domain stepping pit
SQL语言-查询语句
021-MongoDB数据库从入门到放弃
[]==! []
数组去重。。。。
核查医药代表备案信息是否正确
022-Redis数据库0基础入门
洛谷P1091合唱队形(最长上升子序列)
617. merge binary tree
SQL language - query statement
On cursor in MySQL
不引入第三个变量,交换两个值
Alias the path with the help of craco
347. top k high frequency elements
动态import