Browse Source

优化表单样式

xiaohaizhao 1 year ago
parent
commit
8872ac4a3a
3 changed files with 22 additions and 4 deletions
  1. 20 2
      components/my_form.vue
  2. 0 1
      pages/index/cloud/workbench.vue
  3. 2 1
      store/insert/store.vue

+ 20 - 2
components/my_form.vue

@@ -147,7 +147,10 @@
         <view
           class="custom-class-box"
           v-else-if="item.type == 'customClass'"
-          :style="{ marginTop: tovw(item.marginTop || 0) }"
+          :style="{
+            marginTop: tovw(item.marginTop || 0),
+            paddingBottom: item.showBorBot ? 0 : '10px',
+          }"
         >
           <view class="head">
             <view class="label">
@@ -180,6 +183,7 @@
               {{ option.remarks }}
             </view>
           </view>
+          <view class="borBot" v-if="item.showBorBot" style="height: 10px" />
         </view>
         <!-- 选择所在地区 -->
         <picker
@@ -392,7 +396,7 @@
               <text class="must" v-if="item.isMust">*</text>
               {{ item.label }}:
             </view>
-            <view class="content-box">
+            <view class="content-box2">
               <view class="value" v-if="item.showValue.length">
                 {{ item.showValue.join(",") }}
               </view>
@@ -1139,6 +1143,20 @@ export default {
         color: #bbbbbb;
       }
     }
+
+    .content-box2 {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      line-height: 20px;
+
+      .placeholder {
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 14px;
+        color: #bbbbbb;
+      }
+    }
   }
 }
 

+ 0 - 1
pages/index/cloud/workbench.vue

@@ -82,7 +82,6 @@ export default {
     },
     computed: {
         isSign () {
-            console.log(!uni.getStorageSync('authList').资料库,!uni.getStorageSync('authList').资料库.每日一签,11111)
             if (!uni.getStorageSync('authList').资料库) return false
             if (!uni.getStorageSync('authList').资料库.每日一签) return false
             return true

+ 2 - 1
store/insert/store.vue

@@ -99,7 +99,8 @@ export default {
             isMust: true,//是否必填
             isMultipleChoice: false,//是否多选
             value: '',// 多选[] 单选 ""
-            list: await this.getCustomClass('storetype')
+            list: await this.getCustomClass('storetype'),
+            showBorBot: true
         }, {
             key: "selectMap",
             type: "route",