cuiqian2004
2025-06-19 619b47962e41f506baf7ce2b535b2de1fecc719e
components/oi-form/list/index.vue
@@ -1,8 +1,8 @@
<template>
   <view :class="viewMode ? 'oi-form-item-view':'oi-form-item'">
   <view class="oi-form-item" :class="largeMode?'large-mode':''">
      <uni-forms-item v-show="!hiddenIds.includes(data.fieldId)"
         :label="data.labelWidth === 0 ? '' : data.label? data.label+':':''"
         :label-width="data.labelWidth || data.labelWidth === 0 ? data.labelWidth : 100+'px'"
         :label-width="largeMode?'100%': data.labelWidth || data.labelWidth === 0 ? data.labelWidth : 100+'px'"
         :style="{ textAlign: data.setting.align }">
         <OIFormText v-if="viewMode && data.disabled" :data="data" :model="model">
         </OIFormText>
@@ -85,6 +85,11 @@
            default: () => [],
         },
      },
      data() {
         return {
            largeMode: getApp().globalData?.largeMode || false,
         }
      },
      methods: {
         onChange(e) {
            this.$emit("on-change", this.data)
@@ -105,23 +110,17 @@
   };
</script>
<style lang="scss" scoped>
<style lang="less" scoped>
   .oi-form-item {
      .uni-forms-item {
         margin-bottom: 11rpx;
         margin-bottom: 15rpx;
      }
   }
   .oi-form-item-view {
   .oi-form-item.large-mode {
      .uni-forms-item {
         padding-bottom: 5rpx;
         margin-bottom: 0;
         .uni-forms-item__label {
            height: 20px !important;
            padding: 0 10rpx 0 0 !important;
         }
         margin-left: 10rpx;
         margin-right: 10rpx;
      }
   }
</style>