chore: fui-preview增加section标题栏功能

This commit is contained in:
Hefeng
2023-10-18 11:32:50 +08:00
parent 51c0d15008
commit e0f96cd5d1
2 changed files with 16 additions and 1 deletions

View File

@ -158,6 +158,10 @@ export default {
type: [Number, String],
default: 8,
},
isSection: {
type: Boolean,
default: false,
},
},
emits: ['click', 'valueClick'],
@ -253,7 +257,9 @@ export default {
:style="{ paddingLeft: `${padding}rpx`, paddingRight: `${padding}rpx` }"
>
<view class="fui-preview__item">
<fui-section v-if="isSection" :title="pvd[label] || ''" is-line line-width="8rpx" :padding="['0','0']" line-color="#0082ff" />
<text
v-else
class="fui-preview__label" style="color: #333;font-weight:600"
:style="{ color: labelColor, fontSize: `${hdLabelSize}rpx`, width: hdLabelWidth > 0 ? `${hdLabelWidth}rpx` : 'auto', marginRight: `${labelRight}rpx` }"
>

View File

@ -1,3 +1,12 @@
<!--
* @Author: Hefeng 1057605508@qq.com
* @Date: 2023-08-23 13:21:50
* @LastEditors: Hefeng 1057605508@qq.com
* @LastEditTime: 2023-10-18 11:28:33
* @FilePath: \FirstUI-vue\pages\component\layout\preview\preview.vue
* @Description:
*
-->
<!--本文件由FirstUI授权予新疆天衡创新研究院有限公司手机号186 1 407 254 9身份证尾号5A07X5专用请尊重知识产权勿私下传播违者追究法律责任-->
<template>
<view class="fui-wrap">
@ -8,7 +17,7 @@
<view class="fui-page__desc">Preview 表单预览常用的布局组件</view>
</view>
<view class="fui-page__bd">
<fui-preview :previewData="previewData"></fui-preview>
<fui-preview :previewData="previewData" isSection></fui-preview>
<!-- 标签文本两端对齐 -->
<fui-preview labelAlign="justify" labelWidth="112" :previewData="previewData2" marginTop="24"
@click="btnClick"></fui-preview>