1. 抽离底部导航归属逻辑为纯函数resolveEntryTab,优化分包页面高亮规则,对齐iOS HIG规范 2. 新增页面Tab通配符映射,简化PAGE_TAB_MAP维护 3. 修复鸿蒙平台webview返回按钮适配问题 4. 新增pages.json校验与导航标题自动注入脚本 5. 优化启动页动画性能,提升合成渲染效率 6. 修复diy-picture组件v-for缺少key的警告 7. 清理鸿蒙平台多余的分包构建配置 8. 更新统计数据与store注释说明
84 lines
2.7 KiB
Vue
84 lines
2.7 KiB
Vue
<template>
|
|
<view data-component-name="diy-picture" class="diy-picture" :style="style">
|
|
<view class="fui-picture">
|
|
<view v-for="(item, index) in value.list" :key="index" style="line-height: 0;">
|
|
<image mode="widthFix" style="width: 100%;height:auto" :src="$util.img(item.imageUrl)"
|
|
v-if="item.link.wap_url" @tap.stop="handlerClick(item)" show-menu-by-longpress></image>
|
|
<image mode="widthFix" style="width: 100%;height:auto" :src="$util.img(item.imageUrl)" v-else
|
|
@tap.stop="handlerClick(item)" show-menu-by-longpress></image>
|
|
</view>
|
|
<!-- <view wx:if="{{!childitem.linkurl}}" bindtap="previewImg" data-src="{{childitem.imgurl}}" style="padding:{{diyitem.style.paddingtop==0?0:diyitem.style.paddingtop+'rpx'}} {{diyitem.style.paddingleft==0?0:diyitem.style.paddingleft+'rpx'}}" wx:for="{{diyitem.data}}" wx:for-index="childid" wx:for-item="childitem" wx:key="{{childid}}">
|
|
<image mode="widthFix" src="{{childitem.imgurl}}" style="{{bannerheight?'height:'+bannerheight+'px':'height:auto'}}"></image>
|
|
</view> -->
|
|
</view>
|
|
<ns-login ref="login"></ns-login>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import DiyMinx from './minx.js'
|
|
export default {
|
|
name: 'diy-picture',
|
|
props: {
|
|
value: {
|
|
type: Object
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
loading: true,
|
|
};
|
|
},
|
|
created() {
|
|
// this.getDataList();
|
|
},
|
|
watch: {
|
|
// 组件刷新监听
|
|
componentRefresh: function (nval) {
|
|
// this.getDataList();
|
|
}
|
|
},
|
|
mixins: [DiyMinx],
|
|
computed: {
|
|
style() {
|
|
var css = '';
|
|
css += 'background-color:' + this.value.contentBgColor + ';';
|
|
if (this.value.elementAngle == 'round') {
|
|
css += 'border-top-left-radius:' + this.value.topElementAroundRadius * 2 + 'rpx;';
|
|
css += 'border-top-right-radius:' + this.value.topElementAroundRadius * 2 + 'rpx;';
|
|
css += 'border-bottom-left-radius:' + this.value.bottomElementAroundRadius * 2 + 'rpx;';
|
|
css += 'border-bottom-right-radius:' + this.value.bottomElementAroundRadius * 2 + 'rpx;';
|
|
}
|
|
return css;
|
|
}
|
|
},
|
|
methods: {
|
|
redirectTo(link) {
|
|
if (link.wap_url) {
|
|
if (this.$util.getCurrRoute() == this.$util.MEMBER_PAGE_URL && !this.storeToken) {
|
|
this.$refs.login.open(link.wap_url);
|
|
return;
|
|
}
|
|
}
|
|
this.$util.diyRedirectTo(link);
|
|
},
|
|
|
|
async handlerClick(item) {
|
|
await this.__$emitEvent({
|
|
eventName: 'picture-tap', data: item, promiseCallback: (event, handler, awaitedResult) => {
|
|
if (!awaitedResult) return;
|
|
|
|
const link = item.link;
|
|
if (link?.name || link?.wap_url || link?.appid) {
|
|
this.redirectTo(item.link);
|
|
} else {
|
|
this.previewImg(item.imageUrl);
|
|
}
|
|
}
|
|
})
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss"></style> |