From ade379c26e00929b7295b37d7c274ccbb0026b7d Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期四, 12 六月 2025 12:27:26 +0800 Subject: [PATCH] test --- components/oi-form/list/index.vue | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/components/oi-form/list/index.vue b/components/oi-form/list/index.vue index b2d9f5d..693b9f9 100644 --- a/components/oi-form/list/index.vue +++ b/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> \ No newline at end of file -- Gitblit v1.9.1