【问题标题】:Clarity Angular Vertical Timeline enum清晰角度垂直时间线枚举
【发布时间】:2021-09-10 11:37:03
【问题描述】:

我安装了 Clarity Design System 并添加了一个时间轴组件

<clr-timeline>
  <clr-timeline-step>
    <clr-timeline-step-header>11:59 am</clr-timeline-step-header>
  </clr-timeline-step>
</clr-timeline>

我想在第一个 HTML 标记上将布局更改为垂直。 &lt;clr-timeline [clrLayout]="'VERTICAL'"&gt; 但是输入是一个枚举,我不能给出字符串值。

我在一个类字段中导入

import { ClrTimelineLayout } from '@clr/angular/timeline';
..
orientation = ClrTimelineLayout.VERTICAL;

错误如下:Module not found: Error: Can't resolve '@clr/angular/timeline'

【问题讨论】:

    标签: angular input enums timeline vmware-clarity


    【解决方案1】:

    首先检查你是否安装了@clr/core@next

    参考这个来检查正确的安装 https://clarity.design/documentation/get-started https://github.com/vmware/clarity/issues/4244

    <clr-timeline [clrLayout]="orientation"><!--add this-->
      <clr-timeline-step>
        <clr-timeline-step-header>11:59 am</clr-timeline-step-header>
      </clr-timeline-step>
    </clr-timeline>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-08-15
      • 1970-01-01
      • 2019-09-21
      • 1970-01-01
      • 1970-01-01
      • 2018-03-04
      • 1970-01-01
      相关资源
      最近更新 更多