提交 852455d2 编写于 作者: VK1688's avatar VK1688

【修复】u-parse在app和微信小程序中preview属性不生效的问题

上级 c41d20b7
......@@ -116,6 +116,7 @@
nodes: Array,
lazyLoad: Boolean,
loading: String,
preview: Boolean,
// #ifdef MP-ALIPAY
c: String,
s: String
......@@ -197,7 +198,7 @@
imgtap(e) {
var attrs = e.currentTarget.dataset.attrs;
if (!attrs.ignore) {
var preview = true,
var preview = this.preview,
data = {
id: e.target.id,
src: attrs.src,
......
......@@ -10,7 +10,7 @@
<div :id="'rtf'+uid"></div>
<!--#endif-->
<!--#ifndef H5 || MP-360-->
<trees :nodes="nodes" :lazyLoad="lazyLoad" :loading="loadingImg" />
<trees :nodes="nodes" :lazyLoad="lazyLoad" :loading="loadingImg" :preview="preview"/>
<!--#endif-->
</view>
<!--#endif-->
......@@ -60,6 +60,7 @@
* @property {Boolean} showWithAnimation 是否使用渐显动画
* @property {Boolean} useAnchor 是否使用锚点
* @property {Boolean} useCache 是否缓存解析结果
* @property {Boolean} preview 点击图片是否自动预览
* @event {Function} parse 解析完成事件
* @event {Function} load dom 加载完成事件
* @event {Function} ready 所有图片加载完毕事件
......@@ -580,6 +581,7 @@
// #endif
// #ifdef APP-PLUS-NVUE
_message(e) {
var _ts = this;
// 接收 web-view 消息
var d = e.detail.data[0];
switch (d.action) {
......@@ -600,7 +602,7 @@
this.imgList.setItem(i, d.imgList[i]);
break;
case 'preview':
var preview = true;
var preview = _ts.preview;
d.img.ignore = () => preview = false;
this.$emit('imgtap', d.img);
if (preview)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册