Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uni-section 组件如何设置 type竖线的样式?比如高度 #762

Closed
dong-lufei opened this issue May 30, 2023 · 1 comment
Closed

Comments

@dong-lufei
Copy link

dong-lufei commented May 30, 2023

<uni-section titleFontSize="1.2rem" :title="index" type="line" padding='0'> </uni-section>

我不设置 titleFontSize 属性值时,type 竖线 和主标题字体高度一样,比如是1rem,结果我设置主标题字体大小为1.2rem,但是竖线的高度还是不变,这样很丑,我也没找到设置竖线的css选择器

@dong-lufei dong-lufei reopened this May 30, 2023
@dong-lufei dong-lufei changed the title 给组件添加类名也改不了样式,因为添加类名的组件标签会生成多个子标签 uni-section 组件如何设置 type竖线的样式?比如高度 May 30, 2023
@18148764734
Copy link
Contributor

对自带的type不满意的话,可通过插槽的方式传入,示例:

<uni-section class="mb-10" title="装饰器插槽" sub-title="副标题">
        <template v-slot:decoration>
          <view class="decoration"></view>
        </template>
      </uni-section>
//style
.decoration{
    width: 6px;
    height: 6px;
		margin-right: 4px;
    border-radius: 50%;
		background-color: green;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants