浏览代码

小程序标签处理

kk.shi 3 年之前
父节点
当前提交
83eb6b0146

+ 2 - 2
components/customPage/customPage.wxml

@@ -3,13 +3,13 @@
    <view class="custom-head" style="{{headStyle}}">
         <slot name="head"/>
         <view wx:if="{{headBgImage}}" class="head-bg">
-            <image src="{{headBgImage}}" mode=widthFix" bindload="loadImage"/>
+            <image class="head-bg-img" src="{{headBgImage}}" mode=widthFix" bindload="loadImage"/>
         </view>
    </view>
    <view class="custom-body" style="height: {{bodyHeight}}px;" >
     <scroll-view style="height: {{bodyHeight}}px;" scroll-y bindscrolltolower="handleReachBottom">
      <view wx:if="{{headBgImage}}" class="body-split-bg"  style="height:{{bodyImageHeight}}px;">
-        <image style="top:-{{navHeight}}px" src="{{headBgImage}}" mode="widthFix"/>
+        <image class="body-split-img" style="top:-{{navHeight}}px" src="{{headBgImage}}" mode="widthFix"/>
      </view>
      <view class="body-content" style="top:-{{bodyImageHeight}}px;">
         <slot name="body" />

+ 4 - 4
components/customPage/customPage.wxss

@@ -1,8 +1,8 @@
 /* components/customPage/customPage.wxss */
-page {
+/* page {
     height: 100vh;
     overflow: hidden;
-}
+} */
 .custom-body {
     overflow-y: hidden;
 }
@@ -19,7 +19,7 @@ page {
     top: 0;
     overflow: hidden;
 }
-.head-bg image {
+.head-bg .head-bg-img {
     display: block;
     width: 100%;
 }
@@ -31,7 +31,7 @@ page {
     display: block;
     overflow: hidden;
 }
-.body-split-bg image {
+.body-split-bg .body-split-img {
     width: 100%;
     position: relative;
     display: block;

+ 1 - 1
components/customPreviewImage/customPreviewImage.wxml

@@ -2,7 +2,7 @@
 <view class="preview-body" bindtouchstart="handleStart" bindtouchend="handleEnd" bindlongpress="longPress" bindtap="handleClose">
 
     <view class="preview-box">
-        <image src="{{src}}" mode="aspectFit" />
+        <image class="preview-img" src="{{src}}" mode="aspectFit" />
     </view>
 
 </view>

+ 1 - 1
components/customPreviewImage/customPreviewImage.wxss

@@ -17,7 +17,7 @@
     z-index: 2;
 }
 
-.preview-box image {
+.preview-box .preview-img {
     width: 100%;
     height: 100%;
 }

+ 1 - 1
components/topbar.wxml

@@ -1,7 +1,7 @@
 <!--components/topbar.wxml-->
 <view class="topbar topbar-class" style="top:{{capsuleTop + 3}}px; left: 28rpx;">
    <view class="back" catchtap="handleBack">
-      <image src="/images/back.png" />
+      <image class="back-img" src="/images/back.png" />
    </view>
 
    <view class="title topbar-title-class">{{title}}</view>

+ 1 - 1
components/topbar.wxss

@@ -14,7 +14,7 @@
     left: 0;
     top: 0;
 }
-.topbar .back image {
+.topbar .back-img {
     width: 20rpx;
     height: 36rpx;
 }