chore(components): 所有diy组件,添加data-component-name属性
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton type="list" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-article" type="list" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="article-wrap" :style="warpCss">
|
||||
<view :class="['list-wrap', value.style]" :style="warpCss">
|
||||
<view :class="['item', value.ornament.type]" v-for="(item, index) in list" :key="index" @click="toDetail(item)" :style="itemCss">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view>
|
||||
<view data-component-name="diy-audio">
|
||||
<view class="fui-audio style1" :style="{background:value.background}" v-if="value.type == 'style-2'">
|
||||
<view class="content" style="padding-top: 20rpx;">
|
||||
<view class="name" :style="{color:value.textcolor}">{{value.text}}</view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-bargain" :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-bargain" :class="[value.template, value.style]" :style="warpCss">
|
||||
|
||||
<!-- 商品头部 -->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view v-if="tabBarList && tabBarList.list">
|
||||
<view data-component-name="diy-bottom-nav" v-if="tabBarList && tabBarList.list">
|
||||
<view class="tab-bar" :style="{ backgroundColor: tabBarList.backgroundColor }">
|
||||
<view class="tabbar-border"></view>
|
||||
<view class="item" v-for="(item, index) in tabBarList.list" :key="item.id" @click="redirectTo(item.link)">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="item-wrap" :class="type">
|
||||
<view data-component-name="diy-category-item" class="item-wrap" :class="type">
|
||||
<block v-if="type == 'category' && category.child_list && category.child_list.length">
|
||||
<view class="category-adv" v-if="category.image_adv" @click="diyRedirectTo(category.link_url)">
|
||||
<image :src="$util.img(category.image_adv)" mode="widthFix"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :class="['category-page-wrap', 'category-template-' + value.template]"
|
||||
<view data-component-name="diy-category" :class="['category-page-wrap', 'category-template-' + value.template]"
|
||||
:style="{height: 'calc(100vh - '+ tabBarHeight +')' }">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- <block v-if="value.template == 4">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view></view>
|
||||
<view data-component-name="diy-comp-extend"></view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton type="banner" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-coupon" type="banner" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="coupon-wrap" :class="'coupon-box-' + value.style" :style="[
|
||||
value.couponType == 'img' && { backgroundImage: 'url(' + $util.img(value.couponBgUrl) + ')' },
|
||||
value.couponType == 'color' && { backgroundColor: value.couponBgColor }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-fenxiao" v-if="list.length" :class="['goods-list', value.template, value.style]" :style="goodsListWarpCss">
|
||||
<view data-component-name="diy-fenxiao-goods-list" class="diy-fenxiao" v-if="list.length" :class="['goods-list', value.template, value.style]" :style="goodsListWarpCss">
|
||||
<view class="goods-item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" :class="[value.ornament.type]" :style="goodsItemCss">
|
||||
<view class="goods-img" :style="{ borderRadius: value.imgAroundRadius * 2 + 'rpx' }">
|
||||
<image :style="{ borderRadius: value.imgAroundRadius * 2 + 'rpx' }" :src="$util.img(item.goods_image, { size: 'mid' })" mode="widthFix" @error="imgError(index)"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="float-btn" :class="{ left_top: value.bottomPosition == 1, right_top: value.bottomPosition == 2, left_bottom: value.bottomPosition == 3, right_bottom: value.bottomPosition == 4 }" :style="style">
|
||||
<view data-component-name="diy-float-btn" class="float-btn" :class="{ left_top: value.bottomPosition == 1, right_top: value.bottomPosition == 2, left_bottom: value.bottomPosition == 3, right_bottom: value.bottomPosition == 4 }" :style="style">
|
||||
<block v-for="(item, index) in value.list" :key="index">
|
||||
<view class="button-box" @click="$util.diyRedirectTo(item.link)" :style="{ width: value.imageSize + 'px', height: value.imageSize + 'px', fontSize: value.imageSize + 'px' }">
|
||||
<image v-if="!item.iconType || item.iconType == 'img'" :src="$util.img(item.imageUrl)" mode="aspectFit" :show-menu-by-longpress="true"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- #ifdef MP -->
|
||||
<view v-if="value.isShow">
|
||||
<view data-component-name="diy-follow-official-account" v-if="value.isShow">
|
||||
<official-account></official-account>
|
||||
</view>
|
||||
<!--#endif -->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-from" :style="style">
|
||||
<view data-component-name="diy-form" class="diy-from" :style="style">
|
||||
<view class="fui-cell-group">
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label ">您的姓名</view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton type="waterfall" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-goods-brand" type="waterfall" :loading="loading" :configs="skeletonConfig">
|
||||
<view :class="['brand-wrap', value.ornament.type]" :style="warpCss">
|
||||
<view :class="[value.style]">
|
||||
<view class="title-wrap" v-show="value.title" :style="{ color: value.textColor, fontWeight: value.fontWeight ? 'bold' : '' }">{{ value.title }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-goods-list" :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<view :class="['goods-list', goodsValue.template, goodsValue.style]" :style="goodsListWarpCss">
|
||||
<template v-if="goodsValue.template != 'horizontal-slide'">
|
||||
<view class="goods-item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" :class="[goodsValue.ornament.type]" :style="goodsItemCss">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton type="waterfall" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-goods-recommend" type="waterfall" :loading="loading" :configs="skeletonConfig">
|
||||
<view v-if="list.length" :class="['goods-list', goodsValue.style]" :style="goodsListWarpCss">
|
||||
<view class="top-wrap" v-if="goodsValue.topStyle.support">
|
||||
<text :class="['js-icon', goodsValue.topStyle.icon.value]" :style="{ backgroundColor: goodsValue.topStyle.icon.bgColor, color: goodsValue.topStyle.icon.color }"></text>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :style="componentStyle">
|
||||
<view data-component-name="diy-graphic-nav" :style="componentStyle">
|
||||
<block v-if="value.showStyle == 'pageSlide'">
|
||||
<swiper :class="['graphic-nav', 'pageSlide', value.carousel.type]" circular :indicator-dots="false" :style="swiperHeight" @change="swiperChange">
|
||||
<swiper-item class="graphic-nav-wrap"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-group">
|
||||
<view data-component-name="diy-group" class="diy-group">
|
||||
<view v-for="(item, index) in diyDataArray" :key="index" :style="item.pageStyle">
|
||||
<view v-if="addonIsExist.store && item.componentName == 'StoreShow'">
|
||||
<!-- 门店展示 -->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-groupbuy" :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-groupbuy" :class="[value.template, value.style]" :style="warpCss">
|
||||
<template v-if="value.template == 'row1-of1'">
|
||||
<view class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :style="horzBlankGaugeWrap"></view>
|
||||
<view data-component-name="diy-horz-blank" :style="horzBlankGaugeWrap"></view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :style="{ borderTop: '2rpx ' + value.borderStyle + ' ' + value.color }"></view>
|
||||
<view data-component-name="diy-horz-line" :style="{ borderTop: '2rpx ' + value.borderStyle + ' ' + value.color }"></view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :style="hotAreaWarp" class="hot-area-box">
|
||||
<view data-component-name="diy-hot-area" :style="hotAreaWarp" class="hot-area-box">
|
||||
<view class="simple-graph-wrap">
|
||||
<image :style="{ height: value.imgHeight }" :src="$util.img(value.imageUrl)" mode="widthFix" :show-menu-by-longpress="true"/>
|
||||
<!-- 热区功能 -->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-icon" :style="iconBgStyle">
|
||||
<view data-component-name="diy-icon" class="diy-icon" :style="iconBgStyle">
|
||||
<text class="js-icon" :class="iconClass" :style="iconStyle"></text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="single-graph">
|
||||
<view data-component-name="diy-img-ads" class="single-graph">
|
||||
<view :style="imgAdsMarginWarp" class="swiper-box">
|
||||
<block v-if="imgAdsValue.list.length == 1">
|
||||
<view class="simple-graph-wrap" :style="imgAdsSwiper" @click="$util.diyRedirectTo(imgAdsValue.list[0].link)">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view>
|
||||
<view data-component-name="diy-index-page">
|
||||
<view class="bg" :style="warpCss">
|
||||
<view class="index-page-content">
|
||||
<view class="nav-top-category" :style="categoryCss">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-kefu" :style="style">
|
||||
<view data-component-name="diy-kefu" class="diy-kefu" :style="style">
|
||||
<view class="fui-list-group merchgroup" v-for="(item,index) in value.list">
|
||||
<view class="fui-list jump" v-if="index == 0">
|
||||
<view class="fui-list-media">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-picture" :style="style">
|
||||
<view data-component-name="diy-picture" class="diy-picture" :style="style">
|
||||
<view class="fui-cell-group">
|
||||
<!-- <image mode="widthFix" style="width: 100%;" :src="$util.img(item.imageUrl)"></image> -->
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton type="banner" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-live" type="banner" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="live-wrap" @click="entryRoom(liveInfo.roomid)" v-if="liveInfo">
|
||||
<view class="banner-wrap">
|
||||
<image :src="liveInfo.banner != '' ? $util.img(liveInfo.banner) : $util.img('public/uniapp/live/live_default_banner.png')"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="many-goods-list">
|
||||
<view data-component-name="diy-many-goods-list" class="many-goods-list">
|
||||
<scroll-view scroll-x="true" class="many-goods-list-head" :scroll-into-view="'a' + cateIndex" :style="manyWrapCss">
|
||||
<view v-for="(item, index) in value.list" class="scroll-item" :class="{ active: index == cateIndex }" :id="'a' + index" :key="index" @click="changeCateIndex(item, index)">
|
||||
<view class="split-line" v-if="index > 0"></view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-map" :style="style">
|
||||
<view data-component-name="diy-map" class="diy-map" :style="style">
|
||||
<view class="fui-list-group merchgroup" style="margin-top:0" v-for="(item,index) in value.list">
|
||||
<map
|
||||
id="map"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="container" :style="warpCss">
|
||||
<view data-component-name="diy-member-info" class="container" :style="warpCss">
|
||||
<!-- 会员信息 -->
|
||||
<view class="common-wrap info-wrap" :class="[`data-style-${value.style}`]">
|
||||
<view class="member-info" :style="memberInfoStyle">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="common-wrap" :style="warpCss">
|
||||
<view data-component-name="diy-member-my-order" class="common-wrap" :style="warpCss">
|
||||
<view class="order-wrap">
|
||||
<view class="status-wrap">
|
||||
<view class="item-wrap" @click="redirect('/pages/order/list?status=waitpay')" style="margin-right: 10rpx;">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="diy-merch-list">
|
||||
<x-skeleton type="list" :loading="loading" :configs="skeletonConfig" v-if="value.ornament.type == 'default'">
|
||||
<view class="merch-wrap" :style="warpCss">
|
||||
<view :class="['list-wrap', value.style]" :style="warpCss">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton type="list" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-notes" type="list" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-notes" :style="{ backgroundColor: value.componentBgColor }">
|
||||
<view class="diy-notes-top">
|
||||
<view class="notes-title" :style="{ color: value.titleTextColor }">{{ value.title }}</view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-notice">
|
||||
<view data-component-name="diy-notice" class="diy-notice">
|
||||
<view :class="['notice', value.contentStyle]" :style="noticeWrapCss">
|
||||
|
||||
<image v-if="value.iconType == 'img'" class="notice-img" :src="$util.img(value.imageUrl)" mode="heightFix"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="payment-qrocde-wrap" :style="warpCss">
|
||||
<view data-component-name="diy-payment-qrcode" class="payment-qrocde-wrap" :style="warpCss">
|
||||
<view class="payment-qrocde-box">
|
||||
<view class="qrocde-left">
|
||||
<view class="qrocde-desc">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-picture" :style="style">
|
||||
<view data-component-name="diy-picture" class="diy-picture" :style="style">
|
||||
<view class="fui-picture">
|
||||
<view v-for="(item,index) in value.list" style="line-height: 0;">
|
||||
<image mode="widthFix" style="width: 100%;height:auto" :src="$util.img(item.imageUrl)" v-if="item.link.wap_url" @click="handlerClick(item)" @tap="handlerClick(item)"></image>
|
||||
@@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import minx from './minx.js'
|
||||
import DiyMinx from './minx.js'
|
||||
export default {
|
||||
name: 'diy-picture',
|
||||
props: {
|
||||
@@ -35,7 +35,7 @@
|
||||
// this.getDataList();
|
||||
}
|
||||
},
|
||||
mixins: [minx],
|
||||
mixins: [DiyMinx],
|
||||
computed: {
|
||||
style() {
|
||||
var css = '';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-pinfan" :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-pinfan" :class="[value.template, value.style]" :style="warpCss">
|
||||
<template v-if="value.template == 'row1-of1'">
|
||||
<view class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" :class="[value.ornament.type]" :style="goodsItemCss">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-pintuan" :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-pintuan" :class="[value.template, value.style]" :style="warpCss">
|
||||
<view v-if="value.titleStyle.isShow && list && list.length" :class="[value.titleStyle.style, 'pintuan-head']" :style="{
|
||||
backgroundImage:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-presale" :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-presale" v-if="list.length" :class="[value.template, value.style]" :style="warpCss">
|
||||
<template v-if="value.template == 'row1-of1'">
|
||||
<view class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)" :class="[value.ornament.type]" :style="goodsItemCss">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :style="componentStyle">
|
||||
<view data-component-name="diy-quick-nav" :style="componentStyle">
|
||||
<scroll-view class="quick-nav" scroll-x="true">
|
||||
<!-- #ifdef MP -->
|
||||
<view class="uni-scroll-view-content">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="rich-text-box" :style="richTextWarpCss">
|
||||
<view data-component-name="diy-rich-text" class="rich-text-box" :style="richTextWarpCss">
|
||||
<rich-text :nodes="html"></rich-text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view>
|
||||
<view data-component-name="diy-rubik-cube">
|
||||
<!-- 自定义 -->
|
||||
<view v-if="value.mode == 'custom-rubik-cube'">
|
||||
<view style="position: relative;"><rich-text :nodes="customHtml"></rich-text></view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-search">
|
||||
<view data-component-name="diy-search" class="diy-search">
|
||||
<view class="diy-search-wrap" :class="value.positionWay" :style="fixedCss">
|
||||
<view :class="['search-box','search-box-'+value.searchStyle]" :style="searchWrapCss" @click="search()">
|
||||
<block v-if="[1,2].includes(value.searchStyle)">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-seckill" :type="skeletonType" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-seckill" v-if="timeList.length > 1 || (timeList.length == 1 && dataList.length)" :class="[value.template, value.style]" :style="wrapStyle">
|
||||
<view v-if="value.titleStyle.isShow && dataList && dataList.length" :class="['title-wrap', value.titleStyle.style]" :style="{
|
||||
backgroundImage:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-skeleton type="banner" :loading="loading" :configs="skeletonConfig">
|
||||
<x-skeleton data-component-name="diy-store-label" type="banner" :loading="loading" :configs="skeletonConfig">
|
||||
<view class="diy-store-label">
|
||||
<block v-if="businessConfig.store_business == 'store'">
|
||||
<scroll-view scroll-x="true" :class="[value.contentStyle, { between: list.length == 3 }]" :style="storeLabelWrapCss" :enable-flex="true">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="store-wrap">
|
||||
<view data-component-name="diy-store" class="store-wrap">
|
||||
<block v-if="value.style == 1">
|
||||
<view class="store-box store-one">
|
||||
<view class="store-info">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="diy-text" @click="$util.diyRedirectTo(value.link)" :style="warpCss">
|
||||
<view data-component-name="diy-text" class="diy-text" @click="handlerClick(value.link)" @tap="handlerClick(value.link)" :style="warpCss">
|
||||
<view :class="value.style == 'style-8' ? 'title2' : 'title'" :style="{ fontSize: value.fontSize * 2 + 'rpx', color: value.textColor }">
|
||||
<block v-if="value.style == 'style-0'" style="height: 40rpx; line-height: 40rpx;">
|
||||
<text :style="{ fontWeight: value.fontWeight}">{{ value.text }}</text>
|
||||
@@ -75,7 +75,7 @@
|
||||
{{ value.text }}
|
||||
</text>
|
||||
<view class="right-img"><image :src="$util.img('public/uniapp/diy/style9-2.png')"/></view>
|
||||
<view class="style9-more" v-if="value.more.isShow" :style="{ color: value.more.color }" @click.stop="$util.diyRedirectTo(value.more.link)">
|
||||
<view class="style9-more" v-if="value.more.isShow" :style="{ color: value.more.color }" @click.stop="handlerClick(value.more.link)" @tap="handlerClick(value.more.link)">
|
||||
{{ value.more.text }}
|
||||
<view class="iconfont icon-right" :style="{ color: value.more.color }"></view>
|
||||
</view>
|
||||
@@ -105,7 +105,7 @@
|
||||
{{ value.text }}
|
||||
</text>
|
||||
<view class="right-img"><image :src="$util.img('public/uniapp/diy/style10-2.png')"></image></view>
|
||||
<view class="style10-more" v-if="value.more.isShow" :style="{ color: value.more.color }" @click.stop="$util.diyRedirectTo(value.more.link)">
|
||||
<view class="style10-more" v-if="value.more.isShow" :style="{ color: value.more.color }" @click.stop="handlerClick(value.more.link)" @tap="handlerClick(value.more.link)">
|
||||
{{ value.more.text }}
|
||||
<view class="iconfont icon-right" :style="{ color: value.more.color }"></view>
|
||||
</view>
|
||||
@@ -257,6 +257,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DiyMinx from './minx.js';
|
||||
// 标题
|
||||
export default {
|
||||
name: 'diy-text',
|
||||
@@ -269,6 +270,7 @@ export default {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
mixins: [DiyMinx],
|
||||
watch: {
|
||||
// 组件刷新监听
|
||||
componentRefresh: function(nval) {}
|
||||
@@ -286,7 +288,14 @@ export default {
|
||||
return obj;
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
async handlerClick(link) {
|
||||
await this.__$emitEvent({eventName: 'textTap', data: link, promiseCallback: (event, handler, awaitedResult) => {
|
||||
if (!awaitedResult) return;
|
||||
$util.diyRedirectTo(link);
|
||||
}})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<video class="diy-video" :src="$util.img(value.videoUrl)" :poster="$util.img(value.imageUrl)" :style="videoWarpCss" objectFit="cover"></video>
|
||||
<video data-component-name="diy-video" class="diy-video" :src="$util.img(value.videoUrl)" :poster="$util.img(value.imageUrl)" :style="videoWarpCss" objectFit="cover"></video>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,6 +2,7 @@ export default {
|
||||
methods: {
|
||||
// 异步触发事件
|
||||
async __$emitEvent(payload = {eventName: '__unnamedEvent', data: {}, promiseCallback: null}) {
|
||||
// console.log('__$emitEvent', payload)
|
||||
await this.$eventBus?.emit(payload.eventName, payload.data, payload.promiseCallback)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user