Преглед изворни кода

1、修改dk-tree-form-more组件样式

zhoux пре 2 година
родитељ
комит
ac117ec041

+ 2 - 2
components/dkbase/dk-list/dk-list.wxss

@@ -39,14 +39,14 @@
 .table-content-row-title-two {
 .table-content-row-title-two {
   display: flex;
   display: flex;
   width: 100%;
   width: 100%;
-  justify-content: space-around;
+  justify-content: space-between;
 }
 }
 
 
 .table-content-row-title {
 .table-content-row-title {
   display: flex;
   display: flex;
   margin-left: 70rpx;
   margin-left: 70rpx;
   width: calc(100% - 70rpx);
   width: calc(100% - 70rpx);
-  justify-content: space-around;
+  justify-content: space-between;
 }
 }
 
 
 .oas-title-value {
 .oas-title-value {

+ 25 - 24
components/dkbase/dk-tree-form-more/dk-tree-form-more.wxml

@@ -1,25 +1,25 @@
 <view wx:for="{{tree}}" class="{{!item[parentIdKey]?'Outer-frame':''}}">
 <view wx:for="{{tree}}" class="{{!item[parentIdKey]?'Outer-frame':''}}">
   <!-- 列表上半部分 -->
   <!-- 列表上半部分 -->
   <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled}}" right-hight="10">
   <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled}}" right-hight="10">
-  
- 
-  <view wx:if="{{!item[parentIdKey]}}" style="display: flex;padding:3vw;background: linear-gradient(180deg, #E2ECFF 0%, #FAFCFF 100%);border-radius: 15rpx 15rpx 0 0 ">
-    <view style="display: flex;flex: 1;" data-item="{{item}}" data-type="fa" bindtap="clickName">
-      <view class="font">{{item[nameKey]}}</view>
-    </view>
 
 
-    <view style="margin-right: 20rpx;" wx:if="{{flgValid}}">
-      <view class="status-detail-class" style="{{item[flgValidKey] ? 'width: 54rpx' : 'background-color:red;width: 54rpx;'}}">{{item[flgValidKey] ? '启用' : '停用'}}
+
+    <view wx:if="{{!item[parentIdKey]}}" style="display: flex;padding:3vw;background: linear-gradient(180deg, #E2ECFF 0%, #FAFCFF 100%);border-radius: 15rpx 15rpx 0 0 ">
+      <view style="display: flex;flex: 1;" data-item="{{item}}" data-type="fa" bindtap="clickName">
+        <view class="font-title">{{item[nameKey]}}</view>
+      </view>
+
+      <view style="margin-right: 20rpx;" wx:if="{{flgValid}}">
+        <view class="status-detail-class" style="{{item[flgValidKey] ? 'width: 54rpx' : 'background-color:red;width: 54rpx;'}}">{{item[flgValidKey] ? '启用' : '停用'}}
+        </view>
+      </view>
+      <view style=" text-align: right;border: none;" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
+        <van-icon wx:if="{{ item.open }}" color="#bdb7b7" name="arrow-down" />
+        <van-icon wx:else color="#bdb7b7" name="arrow" />
       </view>
       </view>
     </view>
     </view>
-    <view style=" text-align: right;" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
-      <van-icon wx:if="{{ item.open }}" color="#bdb7b7" name="arrow-down" />
-      <van-icon wx:else color="#bdb7b7" name="arrow" />
-    </view>
-  </view>
-   <!-- 侧拉 -->
-   <view wx:if="{{!swipeDisabled}}"  data-item="{{item}}" bind:tap="onSwipeBind"  slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view>
-</van-swipe-cell>
+    <!-- 侧拉 -->
+    <view wx:if="{{!swipeDisabled}}" data-item="{{item}}" bind:tap="onSwipeBind" slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view>
+  </van-swipe-cell>
   <!-- 列表下半部分 -->
   <!-- 列表下半部分 -->
   <view class="{{!item[parentIdKey]?'list-below-item':''}}">
   <view class="{{!item[parentIdKey]?'list-below-item':''}}">
     <block>
     <block>
@@ -43,19 +43,22 @@
           </view>
           </view>
 
 
           <view style="flex:1;">
           <view style="flex:1;">
-            <view class="tree_right" wx:if="{{item[itemListKey]}}" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
-              <van-button type="default" size="mini">  <van-icon wx:if="{{!item.open }}" color="#bdb7b7" name="arrow" />
+            <!-- <view class="tree_right" wx:if="{{item[itemListKey]}}" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
+              <van-button type="default" size="mini" custom-style="border:none">  <van-icon wx:if="{{!item.open }}" color="#bdb7b7" name="arrow" />
               <van-icon wx:else name="arrow-down" color="#bdb7b7" /></van-button>
               <van-icon wx:else name="arrow-down" color="#bdb7b7" /></van-button>
-            
+            </view> -->
+            <view class="tree_right" wx:if="{{item[itemListKey]}}" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
+              <van-icon wx:if="{{ item.open }}" color="#bdb7b7" size="15px" name="arrow-down" />
+              <van-icon wx:else color="#bdb7b7" size="15px" name="arrow" />
             </view>
             </view>
           </view>
           </view>
         </view>
         </view>
         <!-- 侧拉 -->
         <!-- 侧拉 -->
-        <view wx:if="{{!swipeDisabled}}"   data-item="{{item}}" bind:tap="onSwipeBind"  slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view>
+        <view wx:if="{{!swipeDisabled}}" data-item="{{item}}" bind:tap="onSwipeBind" slot="right">{{(item[flgValidKey] ? '停用' : '启用')}}</view>
       </van-swipe-cell>
       </van-swipe-cell>
       <block wx:if="{{item[itemListKey]}}">
       <block wx:if="{{item[itemListKey]}}">
         <view hidden="{{!item.open}}">
         <view hidden="{{!item.open}}">
-          <dk-tree-form-more bind:clickName="subclickName"  bind:onSwipe="subonSwipeBind_" treeList="{{item[itemListKey]}}" ischekboxFlag="{{ischekboxFlag}}"   flgValid="{{flgValid}}" swipeDisabled="{{swipeDisabled}}" isNameImgFlag="{{isNameImgFlag}}" flgValidKey="{{flgValidKey}}" nameKey="{{nameKey}}" idKey="{{idKey}}" parentIdKey="{{parentIdKey}}" itemListKey="{{itemListKey}}" id="treeSelect" bind:onclick="click" depth="{{depth+1}}"></dk-tree-form-more>
+          <dk-tree-form-more bind:clickName="subclickName" bind:onSwipe="subonSwipeBind_" treeList="{{item[itemListKey]}}" ischekboxFlag="{{ischekboxFlag}}" flgValid="{{flgValid}}" swipeDisabled="{{swipeDisabled}}" isNameImgFlag="{{isNameImgFlag}}" flgValidKey="{{flgValidKey}}" nameKey="{{nameKey}}" idKey="{{idKey}}" parentIdKey="{{parentIdKey}}" itemListKey="{{itemListKey}}" id="treeSelect" bind:onclick="click" depth="{{depth+1}}"></dk-tree-form-more>
         </view>
         </view>
       </block>
       </block>
 
 
@@ -65,6 +68,4 @@
   </view>
   </view>
 
 
 
 
-</view>
-
-
+</view>

+ 14 - 1
components/dkbase/dk-tree-form-more/dk-tree-form-more.wxss

@@ -1,12 +1,25 @@
 .font {
 .font {
   font-family: PingFang SC;
   font-family: PingFang SC;
-  font-size: 30rpx;
+  font-size: 14px;
   font-weight: 500;
   font-weight: 500;
   line-height: 36rpx;
   line-height: 36rpx;
   letter-spacing: 0em;
   letter-spacing: 0em;
   text-align: left;
   text-align: left;
 }
 }
 
 
+.font-title{
+  font-family: PingFang SC;
+  font-size: 15px;
+  font-weight: bold;
+  color: #1B365D;
+  line-height: 36rpx;
+  letter-spacing: 0em;
+  text-align: left;
+  text-decoration: underline;
+  padding-left: 20rpx;
+}
+
+
 .status-detail-class {
 .status-detail-class {
   height: 49rpx;
   height: 49rpx;
   line-height: 49rpx;
   line-height: 49rpx;