Skip to content

Commit e96e194

Browse files
committed
release v2.0.4
1 parent b032b9a commit e96e194

File tree

57 files changed

+248
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+248
-179
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules/
22
coverage/
3+
dev/
34
yarn.lock
45
*.yml
56
*.psd

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules/
22
coverage/
3+
dev/
34
yarn.lock
45
*.yml
56
*.psd

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,17 @@
217217
![支持](https://gitee.com/jin-yufeng/mp-html/raw/master/docs/assets/sponsor.png)
218218

219219
## 更新日志
220+
- v2.0.4 (20210131)
221+
1. `A` `editable` 插件增加下划线和图片超链接的功能 [详细](https://github.com/jin-yufeng/mp-html/issues/254)
222+
2. `U` 支付宝和头条小程序原生包直接通过 `template` 递归实现渲染
223+
3. `F` 修复了 `img` 标签设置 `data-src` 可能导致图片不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/257)
224+
4. `F` 修复了 `script` 标签中的 `<` 会被解析为标签的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/259)
225+
5. `F` 修复了 `uni-app` 包的 `app` 端播放视频时可能高度突然变小的问题
226+
6. `F` 修复了 `uni-app` 包的 `app` 端长按图片会报错的问题
227+
7. `F` 修复了 `uni-app` 包的 `nvue` 端使用 `editable` 插件后无法显示的问题
228+
8. `F` 修复了 `editable` 插件删除图片和切换内容时可能出现错误选择框的问题
229+
9. `F` 修复了 `editable` 插件无法编辑链接文本内容的问题
230+
220231
- v2.0.3 (20210115)
221232
1. `U` 图片被点击时不冒泡(可以与整体的点击区分开,不影响链接中的图片)
222233
2. `F` 修复了图片链接缺省协议名时可能无法预览的问题
@@ -225,19 +236,6 @@
225236
5. `F` 修复了 `highlight` 插件部分情况下样式不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/231)
226237
6. `F` 修复了文档首页跳转到快速开始页时 `404` 的问题 by [@AnsonZnl](https://github.com/AnsonZnl)
227238

228-
- v2.0.2 (20210108)
229-
1. `U` `uni-app` 包微信端利用 `virtualHost` 去除夹层,加快渲染
230-
2. `F` 修复了部分情况下 `flex` 布局显示不正确的问题
231-
3. `F` 修复了设置 `loading-img` 会导致懒加载失效的问题
232-
4. `F` 修复了头条原生包部分情况下表格显示不正确的问题
233-
5. `F` 修复了 `uni-app``h5``app` 端部分插件样式无法应用的问题
234-
6. `F` 修复了 `uni-app` 包没有自动将 `data-src` 设置为 `src` 的问题
235-
7. `F` 修复了 `uni-app` 包的 `nvue``getRect` 方法无法使用的问题
236-
8. `F` 修复了 `uni-app` 包运行到华为快应用可能报错的问题
237-
9. `F` 修复了在低版本 taro 中使用可能无法正确解析的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/248)
238-
10. `F` 修复了 `highlight` 插件 `pre``code` 之间有空白符时无法高亮的问题
239-
11. `F` 修复了 `editable` 插件清空内容后插入可能报错的问题
240-
241239
`1.x` 的升级方法可见 [更新指南](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog?id=v200)
242240

243241
查看 [更新日志](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog) 了解更多

dist/mp-alipay/index.acss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
._root{display:block;overflow:auto;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
1+
._root{overflow:auto;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}

dist/mp-alipay/index.axml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<slot a:if="{{!nodes[0]}}"/><node class="_root {{selectable?'_select':''}}" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu]}}" onAdd="_add"/>
1+
<view class="_root {{selectable?'_select':''}}"><slot a:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu]}}" onAdd="_add"/></view>

dist/mp-alipay/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mp-alipay/node/node.axml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<template name="el"><block a:if="{{n.name=='img'}}"><image a:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]==-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{n.h?'':'widthFix'}}" lazy-load="{{opts[0]}}" data-i="{{i}}" onLoad="imgLoad" onError="mediaError" catchTap="imgTap" onLongTap="noop"/></block><text a:elif="{{n.type=='text'}}" decode>{{n.text}}</text><text a:elif="{{n.name=='br'}}">\n</text><view a:elif="{{n.name=='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchTap="linkTap"><rich-text nodes="{{n.children}}" style="display:inline"/></view><video a:elif="{{n.name=='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><audio a:elif="{{n.name=='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><rich-text a:else id="{{n.attrs.id}}" style="{{n.f}};display:inline" nodes="{{[n]}}"/></template><view id="{{id}}" class="{{className}}" style="{{style}}"><block a:for="{{childs}}" a:for-item="n1" a:for-index="i1" a:key="i1"><template a:if="{{!n1.c}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view a:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block a:for="{{n1.children}}" a:for-item="n2" a:for-index="i2" a:key="i2"><template a:if="{{!n2.c}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view a:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block a:for="{{n2.children}}" a:for-item="n3" a:for-index="i3" a:key="i3"><template a:if="{{!n3.c}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view a:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block a:for="{{n3.children}}" a:for-item="n4" a:for-index="i4" a:key="i4"><template a:if="{{!n4.c}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view a:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block a:for="{{n4.children}}" a:for-item="n5" a:for-index="i5" a:key="i5"><template a:if="{{!n5.c}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node a:else id="{{n5.attrs.id}}" class="_n _{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}" onAdd="add"/></block></view></block></view></block></view></block></view></block></view>
1+
<template name="el"><block a:if="{{n.name=='img'}}"><image a:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]==-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{n.h?'':'widthFix'}}" lazy-load="{{opts[0]}}" data-i="{{i}}" onLoad="imgLoad" onError="mediaError" catchTap="imgTap" onLongTap="noop"/></block><text a:elif="{{n.type=='text'}}" decode>{{n.text}}</text><text a:elif="{{n.name=='br'}}">\n</text><view a:elif="{{n.name=='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchTap="linkTap"><template is="node" data="{{childs:n.children,path:i+'_',opts:opts,ctrl:ctrl}}"></template></view><video a:elif="{{n.name=='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><audio a:elif="{{n.name=='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><rich-text a:else id="{{n.attrs.id}}" style="{{n.f}};display:inline" nodes="{{[n]}}"/></template><template name="node"><block a:for="{{childs}}" a:for-item="n" a:for-index="i" a:key="i"><template a:if="{{!n.c}}" is="el" data="{{n:n,i:path+i,opts:opts,ctrl:ctrl}}"/><view a:else id="{{n.attrs.id}}" class="_{{n.name}} {{n.attrs.class}}" style="{{n.attrs.style}}"><template is="node" data="{{childs:n.children,path:path+i+'_',opts:opts,ctrl:ctrl}}"></template></view></block></template><template is="node" data="{{childs:childs,path:'',opts:opts,ctrl:ctrl}}"></template>

dist/mp-alipay/node/node.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)